Comments (10)
Sorry! I'm looking to download pangaea data to a specified local directory and then load the data into R and be able to work with it offline. I'm running the below function (and data set):
data.df <- pangaear::pg_data(doi = '10.1594/PANGAEA.863689')
from pangaear.
Thanks for this. Are you talking about a specific function?
from pangaear.
@ktoddbrown what "environmental variables" are you talking about?
from pangaear.
we store the base path to save files to in env$path
, so in theory you could change that path, but it's not exported to the user right now. i can see about letting the user set the working directory
from pangaear.
Yep, this is what I was interested in.
from pangaear.
can you reinstall remotes::install_github("ropensci/pangaear@cache-path")
, restart R session, and try again. See pg_cache$cache_path_set()
to set the cache path
from pangaear.
changes in caa3cb3
from pangaear.
This is not quite what I was looking for. I would like to download the files to a specified directory. For example right now
> pg_cache$cache_path_set('/Users/name/Documents/Datasets')
[1] "/Users/name/Library/Caches/R//Users/name/Documents/Datasets"
> pg_cache$cache_path_get()
[1] "/Users/name/Library/Caches/R//Users/name/Documents/Datasets"
but I would like to point the director to: the folder "/Users/name/Documents/Datasets"
from pangaear.
I've been planning to make it easier to set the path directly ropensci/hoardr#12 but not done yet. for now try this:
x = pg_cache
x
#> <hoard>
#> path: pangaear
#> cache path: /Users/sckott/Library/Caches/R/pangaear
iset_the_path <- function(path) x$.__enclos_env__$private$hoard_env$cache_path <- path
iset_the_path("/Users/name/Documents/Datasets")
x
#> <hoard>
#> path: pangaear
#> cache path: /Users/name/Documents/Datasets
from pangaear.
@ktoddbrown sorry for the very long wait on this - done now - can install from github master branch. just set your own path with pg_cache$cache_path_set(full_path = "/Foo/Bar")
from pangaear.
Related Issues (20)
- some datasets require login HOT 1
- Datasets with png files failing HOT 7
- Add a vignette
- Add GitHub topics HOT 3
- `pg_data` bug: Pangaea I think switched many datasets download setup
- parse metadata in data text files
- response content type header changed - causing pg_data to fail HOT 1
- vcr-ify tests where possible
- pg_search: searching for datasets that cross 180/-180 HOT 14
- test fixture problem, related to yaml pkg HOT 1
- Vignette is missing title
- vcr cache pg_data tests
- consistent event handling HOT 3
- error on oldrel macos
- Column names in data almost always contain spaces/special characters, are sometimes not unique HOT 6
- Support passing bearer token for authorization (allows downloading protected datasets) and use HTTP content negotiation HOT 1
- Maintenance status / help needed? HOT 4
- read_meta fails with large multi event data sets
- Search by lat/lon without defining query? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pangaear.