Description Usage Arguments Details Value Examples
View source: R/get-forecast-for.r
Query for a specific time, past or future (for many places, 60 years in the past to 10 years in the future).
1 2 3 |
latitude |
forecast latitude (character, decimal format) |
longitude |
forecast longitude (character, decimal format) |
timestamp |
should either be a UNIX time (that is, seconds since midnight GMT on 1
Jan 1970) or a string formatted as follows: |
units |
return the API response in units other than the default Imperial unit |
language |
return text summaries in the desired language |
exclude |
exclude some number of data blocks from the API response. This is useful
for reducing latency and saving cache space. This should be a comma-separated string
(without spaces) including one or more of the following: ( |
add_json |
add the raw JSON response to the object? |
add_headers |
add the return headers to the object? |
... |
pass through parameters to |
If you wish to have results in something besides Imperial units, set units
to
one of (si
, ca
, uk
). Setting units
to auto
will have
the API select the relevant units automatically, based on geographic location. This
value is set to us
(Imperial) units by default.
If you wish to have text summaries presented in a different language, set
language
to one of (ar
, bs
, de
, es
, fr
,
it
, nl
, pl
, pt
, ru
, sv
, tet
,
tr
, x-pig-latin
, zh
). This value is set to en
(English) by
default.
See the Options section of the official Forecast API documentation for more information.
an rforecastio
object that contains the original JSON response object (optionally), a
list of named 'tbl_df' 'data.frame' objects corresponding to what was returned by
the API and (optionally) relevant response headers (cache-control
, expires
,
x-forecast-api-calls
, x-response-time
).
1 | tmp <- get_forecast_for(37.8267,-122.423, "2013-05-06T12:00:00-0400")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.