Description Usage Arguments Details Value Examples
View source: R/get_pollution_history.R
Given a specified date range, the function makes an API request to the OpenWeather Air Pollution API and fetches historic pollution data for a given location.
1 | get_pollution_history(start_date, end_date, lat, lon, api_key)
|
start_date |
The start date as a UNIX timestamp, e.g. 1606488670 |
end_date |
The end date as a UNIX timestamp, e.g. 1606747870 |
lat |
Latitude coordinate for a given location as a double |
lon |
Longitude coordinate for a given location as a double |
api_key |
The API key for OpenWeather as a string |
Note: Historical data is accessible from 27th November 2020
data frame containing pollution history
1 | get_pollution_history(1606488670, 1606747870, 49.28, 123.12, "APIKEY_example")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.