Description Usage Arguments Value available pollutants Note See Also Examples
View source: R/read_measures.R
get measurements of pollutants as a data.frame. All measures are using unit microgram per cubic meter.
1 2 3 |
pollutant |
one of the following values: 'o3', 'pm10', 'pm25', 'nox', 'no2', 'so2'. |
granularity |
one of the following values: 'hour', 'day'. |
dt_start, dt_end |
limit dates (character formated as ' is mandatory. |
station_id |
station_id. If NULL, measures from all stations
are retrieved. The stations are described in dataset |
record_max |
maximum number of records to read |
a data.frame with the following columns:
code_station_ue
: (character), station code where measurements have been carried out.
value
: (double), measurements (unit: microgram per cubic meter)
date_time
: (POSIXct with time zone set to Europe/Paris
), date-time of measurement
pollutant
: (character), pollutant
The following pollutants are available :
o3
: ozone
pm10
: Particulate matter with a diameter of 10 micrometers or less
pm25
: Particulate matter with a diameter of 2.5 micrometers or less
nox
: Nitrogen oxide
no2
: Nitrogen dioxide
The API of airparif is limiting the number of records to 2000; it is necessary to loop over dates or stations when more rows are needed.
stations, is_magellan_available()
Other functions about Paris air quality: read_alert
,
read_atmo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | if( is_magellan_available() ){
read_measures()
read_measures(pollutant = "pm10", station_id = "4002")
read_measures(pollutant = "pm25", station_id = "4002")
read_measures(pollutant = "o3", station_id = "4049")
read_measures(pollutant = "nox", station_id = "4002")
read_measures(pollutant = "no2", station_id = "4002")
read_measures(pollutant = "nox",
dt_start = as.Date("2018-09-01"),
station_id = "4323")
read_measures(pollutant = "pm10", station_id = "4181",
dt_start = as.Date("2019-06-01"), granularity = "hour")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.