Closed antagomir closed 2 years ago
I see no harm in doing this, but on the other hand, how often is the path expected to change? Furthermore, if implemented, it would enable using multiple versions of the same data. Not sure if this a good idea.
More generally, since the OKFI server is down, ropengov_storage_path
needs to be fixed. Changing the storage path to point to GitHub is easy, but since what used to be a subdir is now repo, formulating a common storage path becomes tricky. Or rather, it's just "https://github.com/avoindata/"
. Few examples of full paths:
https://github.com/avoindata/mml/blob/master/rdata/Yleiskartta-1000/HallintoAlue_DataFrame.RData?raw=true
https://github.com/avoindata/louhos/blob/master/kuntarajat.maa.shp.rda?raw=true
Either ropengov_storage_path()
needs to be modified so that it knows what to do with GitHub URL's, or it uses e.g. a key-value list to return correct URLs. Latter is now implemented in 4c256011461b034e5272e5a7b52a5e6b4f82d24c
# Used internally
url <- ropengov_storage_path("mml")
url <- ropengov_storage_path("louhos")
Would be useful to have the generic data path in function arguments so user can change it when necessary.