| IMDStations | R Documentation |
Gets the India Meteorological Department (IMD) city-weather station list.
As an option, it also gets the latitude and longitude of each station. The
legacy IMD endpoints give only the station names. The responsive IMD site
gives a JSON record for each station (api/fetchCity_static.php). This record
contains lat and lon. The function adds these values to the station list.
You can use the returned coordinates directly as input to era5ify_point().
You can also use them to make maps.
IMDStations(...)
imd_stations(
with_coordinates = TRUE,
cores = if (.Platform$OS.type == "windows") 1L else 2L
)
... |
Not used. This argument is necessary for compatibility with the aliases. |
with_coordinates |
Logical. If |
cores |
Integer. The number of parallel workers that get the
coordinates (the function sends this value to |
A data.frame with the columns station_id and name. If
with_coordinates = TRUE, the data frame also has the columns latitude
and longitude. The value is NA if IMD has no coordinate for a station.
stations <- tryCatch(
imd_stations(with_coordinates = FALSE),
error = function(e) message("IMD server unavailable: ", conditionMessage(e))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.