Publications by jonathanscallahan

How NOT to format time series data

26.09.2023

I work with lots of environmental time series data from stationary instruments. This post describes why you should avoid mixing data and metadata in a single file and instead suggests an easy-to-implement, easy-to-use, maximally compact format consisting of two .csv files linked by unique identifiers. EPA Air Quality System The world of air qualit...

7427 sym R (2153 sym/5 pcs)

Systematic error messages

21.07.2022

Anyone writing code for use in data processing systems needs to have a well thought-out protocol for generating error messages and logs. When a complex pipeline breaks, good logs and recognizable error messages are key to debugging the problem. This post describes improvements to the MazamaCoreUtils package that help you create systematic error...

3361 sym R (977 sym/4 pcs)

Basic Error Handing in R with tryCatch()

08.10.2020

The R language definition section on Exception Handling describes a very few basics about exceptions in R but is of little use to anyone trying to write robust code that can recover gracefully in the face of errors. In fact, if you do a little searching you will find that quite a few people have read through the ?tryCatch documentation but co...

3803 sym R (2261 sym/4 pcs)

Easier Error Handling in R with try()

09.10.2020

In a previous post, we looked at error handling in R with the tryCatch() function and how this could be used to write Java style try-catch-finally blocks. This time we’ll look at what can be done with the try() function and how we can easily process warning and error messages to take appropriate action when something goes wrong. The try() func...

2869 sym R (2013 sym/2 pcs)

Standard Latitudes and Longitudes

14.10.2020

What?  Where?  When? These are key questions that every scientist or other collector of environmental data must answer. What is the value of the thing we are measuring?Where are we taking the measurement?When are we taking the measurement? In a previous post we discussed how to standardize “when”.  But what about “where”? It shoul...

6437 sym R (2820 sym/2 pcs) 4 img

When is a number not a number?

03.11.2020

Have you ever asked yourself whether your telephone number is really a number?  It’s got numbers in it but does it measure anything? How about your credit card number?  PO Box?  Social Security Number?  Zip code? What would happen if you subtracted one of these from another? As it turns out, many of the “numbers” we deal with every day ...

8518 sym R (3708 sym/4 pcs)

MazamaSpatialUtils R package

03.12.2020

Version 0.7 of the MazamaSpatialUtils is now available on CRAN and includes an expanded suite of spatial datasets with even greater cleanup and harmonization than in previous versions. If your work involves environmental monitoring of any kind, this package may be of use. Here is the description: A suite of conversion functions to create interna...

13774 sym R (3461 sym/4 pcs) 2 img