Description Usage Arguments Value Examples
View source: R/get_air_pollution.R
The function makes an API request to the OpenWeather Air Pollution API and fetches pollution data for a given location, then transforms the returned JSON object from the request into a ggplot chart.
1 | get_air_pollution(lat, lon, api_key, fig_title = "")
|
lat |
Latitude for a given location as a double |
lon |
Longitude for a given location as a double |
api_key |
The API key for OpenWeather as a string |
fig_title |
The title of the returned ggplot as a string |
plotly object
1 | get_air_pollution(49.28, 123.12, "APIKEY_example", "example title")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.