Description Usage Arguments Details Value Author(s) Examples
View source: R/locationforecast.R
Obtaining weather forecasts from api.met.no Locationforecast service. Note that using this function you are agreeing to the Norwegian Meteorologisk Institutt conditions of service at http://api.met.no/conditions_service.html. Also, using the location query option you are agreeing to the Google Maps API Terms of Service at https://developers.google.com/maps/terms.
1 | locationforecast(lat,lon,elevation=NULL,location=NULL,exact=TRUE,tz=Sys.timezone())
|
lat, lon |
numeric objects. latitude and longitude of a location in decimal degrees |
elevation |
optional numeric object. metres above sea level |
location |
optional character object. query latitude, longitude and elevation of the location using Google map service |
exact |
logical, indicating an exact time or an interval period forecasts |
tz |
time zone format. system time zone by default |
If exact=FALSE, precipitation and temperature range can be obtained since these are computed as interval quantities.
If exact=TRUE, A data frame is returned with the following quantities:
time |
time of the forecasts |
temperature |
temperature (Celcius) |
windDirection |
wind direction (degree) |
windSpeed_mps |
wind speed (mps) |
windSpeed_beaufort |
wind speed (Beaufort scale) |
windSpeed_name |
wind speed category |
windGust |
gust (mps) |
humidity |
humidity (percentage) |
pressure |
atomospheric pressure (hPa) |
cloudiness |
clouds cover (percentage) |
lowClouds |
low clouds cover (percentage) |
mediumClouds |
medium clouds cover (percentage) |
highClouds |
high clouds cover (percentage) |
dewpointTemperature |
dewpoint temperature (Celcius) |
If exact=FALSE, A data frame is returned with the following quantities:
timefrom |
the start time of interval for the forecasts |
timeto |
the end time of interval for the forecasts |
precipitation |
precipitation amount (mm) |
minTemperature |
minimum temperature in the interval (Celcius) |
maxTemperature |
maximum temperature in the interval (Celcius) |
weather_id |
weather category |
Stan Yip
1 2 3 4 5 6 7 8 9 | ## Not run:
# Get exact time location forecast of Hong Kong
locationforecast(lat=22.39643,lon=114.1095)
# Get time interval location forecast of Malta
locationforecast(lat=35.9375,lon=14.37542,exact=FALSE)
# Get exact time location forecast of Cape Town, South Africa with timezone 'Africa/Johannesburg'
locationforecast(location='Cape Town, South Africa', tz='Africa/Johannesburg')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.