Description Usage Arguments Details Author(s) Examples
Reads in the content and the metadata of both the recent and historical files corresponding to a single station, combines its data, and converts it into a format R can handle.
1 2 3 | extract.content.climate(station.id, files.list, download.folder.recent,
download.folder.historical, time.series.format = c("xts",
"data.frame"))
|
station.id |
String specifying a station. |
files.list |
Named list of character vectors containing absolute paths pointing towards the .zip files downloaded from the DWD FTP server. The names correspond to recent and historical. |
download.folder.recent |
Folder, which will contain the extracted recent archive. |
download.folder.historical |
Folder, which will contain the extracted historical archive. |
time.series.format |
Format of the extracted time series. They can either be of type data.frame and contain two columns, "date" and "value", or a time series provided by the xts package. Default = "xts". |
The station is specified by its station.id
. The
extraction will take place in either
download.folder.recent
or
download.folder.historical
. Before extraction all its
content will be removed.
Philipp Mueller
1 2 3 4 5 6 7 8 9 10 11 12 | ## The \pkg{dwd2r} provides some mock data so its internal
## functions can be tested and developed without downloading
## any content from the DWD server. At the package's root
## directory call this function in the following way.
dwd2r:::extract.content.climate( "03987",
list( historical = file.path(
system.file( "inst", package = "dwd2r" ), "res",
"produkt_03987_potsdam_historical_mock.zip" ),
recent = file.path(
system.file( "inst", package = "dwd2r" ), "res",
"produkt_potsdam_recent_03987_mock.zip" ) ),
"tmpRecent", "tmpHistorical", "xts" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.