if(!require(remotes)){install.packages('remotes'); require(remotes)} remotes::install_github("energyandcleanair/rcrea")
library(rcrea)
Collecting measurements at the city level:
meas_cities <- rcrea::measurements(city=c('Jaipur','Mumbai', 'Delhi'), source="cpcb", poll=c(rcrea::NO2, rcrea::PM25), date_from="2020-01-01") meas_cities
Getting data at the station level (i.e. more granular than city).
meas_stations <- rcrea::measurements(city=c('Beijing'), source="mee", aggregate_level = "station", poll=rcrea::NO2, date_from="2018-01-01") meas_stations
rcrea::plot_recents(meas_raw=meas_cities, subplot_by="poll", color_by="location_name", running_days = 30)
rcrea::plot_recents(meas_raw=meas_stations, subplot_by="location_id", color_by="year", running_days = 30)
Heatmap of standardized air quality level:
rcrea::plot_measurements(meas_cities, poll=PM25, subplot_by='location_name', type='heatmap', average_by='day')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.