For the purpose of demonstration we load the Keeling Curve data. Revisit the section on Data sets used to remind yourself how to download and extract the data of interest.


The data set (co2) shows carbon dioxide (CO2) measurements taken at the Mauna Loa Observatory in Hawaii. The data is provided by Dr. Pieter Tans, NOAA/ESRL and Dr. Ralph Keeling, Scripps Institution of Oceanography.

Let us get aware of the location by plotting the Mauna Loa Observatory on an interactive map (You may click on the blue dot).

pnt <- data.frame(x = 204.4239, y = 19.53611)
pnt <- st_as_sf(pnt, coords = c("x", "y"), crs = 4326)

img <- ""

mapview(pnt, map.types = "Esri.WorldImagery",
        popup = popupImage(img, src = "remote"), 
        label = "Mauna Loa Observatory")

Let us now plot the actual time series data.

plot(co2, main = "Keeling Curve")