ABSTRACT

Dates are important in geographical data science because most environmental measurements are repeated over time. This chapter provides an overview of how to work with dates in R using the lubridate package. The testdates.csv file contains daily temperature measurements from an Oklahoma Mesonet station. Environmental datasets use a wide variety of date formats. It is common to store different date elements, such as year, month, and day, in different database columns. These differences are especially problematic when data must be imported from multiple sources and joined by date. The lubridate functions can be used to combine data from multiple columns into a single date object. It is common to store different date elements, such as year, month, and day, in different database columns.