Title: | Switzerland's Data Series in One Place |
---|---|
Description: | Download and import time series from <http://www.dataseries.org>, a comprehensive and up-to-date collection of open data from Switzerland. |
Authors: | Christoph Sax |
Maintainer: | Christoph Sax <[email protected]> |
License: | GPL-3 |
Version: | 0.2.0 |
Built: | 2024-11-20 05:04:54 UTC |
Source: | https://github.com/christophsax/dataseries |
ds
downloads time series from
www.dataseries.org. Data can be imported as a
data.frame
or an xts
object.
ds(id, class = c("data.frame", "ts", "xts")) cache_ls() cache_rm()
ds(id, class = c("data.frame", "ts", "xts")) cache_ls() cache_rm()
id |
one ore more IDs, as given by www.dataseries.org. |
class |
class of the return value, either a |
Downloaded series are cached in memory as long as the
R session is open. If you want to force an update, either restart the R
session or run cache_rm
to emtpy the cache. cache_ls
is a utility
function that lists all cached objects (see examples).
## Not run: ds(c("CCI.AIK", "CCI.ASSS")) # data.frame ds(c("CCI.AIK", "CCI.ASSS"), "ts") # "ts" object ds(c("CCI.AIK", "CCI.ASSS"), "xts") # "xts" object # list cached objects cache_ls() # empty in-memory cache, which forces a fresh download cache_rm() ## End(Not run)
## Not run: ds(c("CCI.AIK", "CCI.ASSS")) # data.frame ds(c("CCI.AIK", "CCI.ASSS"), "ts") # "ts" object ds(c("CCI.AIK", "CCI.ASSS"), "xts") # "xts" object # list cached objects cache_ls() # empty in-memory cache, which forces a fresh download cache_rm() ## End(Not run)
Read latest time series inventory from
www.dataseries.org as a data.frame
.
inventory()
inventory()
The downloaded data are cached in memory as long as the
R session is open. If you want to force an update, either restart the R
session or run cache_rm
to emtpy the cache. cache_ls
is a utility
function that lists all cached objects.
## Not run: inv <- inventory() # will be cached # search in the inventory inv[grepl("consumer conf", inv$description, ignore.case = TRUE), ] ## End(Not run)
## Not run: inv <- inventory() # will be cached # search in the inventory inv[grepl("consumer conf", inv$description, ignore.case = TRUE), ] ## End(Not run)