yr_hour_by_hour: Get hourly forecast from YR.no

Description Usage Arguments Examples

View source: R/yr_hour_by_hour.R

Description

Function to get the hourly forecast from YR.no, by supplying a city name or a place_url copied from YR.no.

Usage

1
2
yr_hour_by_hour(place = NULL, country = NULL, place_url = NULL,
  search_no = 1)

Arguments

place

Place name. Ex 'Copenhagen', 'Frederiksberg' 'New York'. The place name is used to find the place_url by using the yr_search function. The search results are dependent on your location and language, so if you want to be certain that you get the correct forecast, then supply a place_url that you get from either the yr_search function or directly from the YR.no website.

country

The two digit country code. Ex 'US', 'DK', 'SE'

place_url

The place_url can be copied directly from the YR.no website and used instead of the place param.

search_no

The row number from the yr_search data.frame that is used as place_url.

Examples

1
2
3
4
5
6
7
8
## Not run: 
library(yrno)

yr_hour_by_hour(place = "Copenhagen")
yr_hour_by_hour(place = "Copenhagen", country = "DK")
yr_hour_by_hour(place_url = yr_search(place = "Copenhagen")$url[1])

## End(Not run)

krose/yrno documentation built on May 20, 2019, 6:42 p.m.