*I have used the following code and extracted the data for the "hour" subplot from the tibble. However, I have forgotten how to do it now. I am not sure if I am missing any code at the bottom. Please modify the below and let me know how to get the data in CSV or text format. *
**
library(readxl)
library(tidyverse)
library(openair)
library(dplyr)
Georgia <- read_excel("C:/Users/TT/Desktop/FT/AA/Daily Average/Georgia.xlsx",
sheet = "Refined Data", col_types = c("text",
"text", "date", "numeric", "numeric",
"numeric", "numeric", "numeric",
"numeric", "text", "numeric", "text",
"text", "text"))
tail(timeVariation(selectByDate(Georgia, year = 2017), pollutant = "pm2.5", group = "month"), subset ="hour")
**
The
openairpackage comes with test data. Here is an example on how to extract the data for the hour plot.Here we create a
tvobject which is the result oftimeVariationfunction using the example data:To access the plotted data including mean and confidence intervals, you can then use:
Or, to store in a .csv file, try (include filename of interest):