Comments (1)
Okay playing with this further I was able to determine that:
-The trait IDs aren't the problem, at least I don't think so
-rather, I didn't realize that BIEN_trait_mean is only intended to return one trait at a time. I had been inputting a vector of traits like so:
trait_list <- BIEN_trait_list()
BIEN_trait_mean(species, trait_list)
to pull everything. This returns the warning:
In if (!trait %in% traits_available$trait_name) { :
the condition has length > 1 and only the first element will be used
Then returned traits all have the same value.
1 Pentaclethra macrophylla 15.7878787878788 flower color
2 Pentaclethra macrophylla 15.7878787878788 flower pollination syndrome cm
3 Pentaclethra macrophylla 15.7878787878788 fruit type
4 Pentaclethra macrophylla 15.7878787878788 inflorescence length cm
level_used sample_size
1 Family 533
2 Family 533
3 Family 533
4 Family 533
I think it will be common for people to want to pull every trait and to call the function as I did above. Right now you have to write a for-loop to do it one at a time (which works great and is pretty fast). However, it might be better to prevent putting multiple traits into BIEN_trait_mean, or make sure it supports vectorized trait lists.
-Finally, Querying DBH also tends to be extremely slow as you suggested and I think you're right about this crashing the console. In particular, calculating mean DBH at the Family level could be drawing many thousands of records without being very informative. Additionally, the trait 'whole plant height' seems to behave the same way. The R process gets 'Killed' probably because the SQL query returns way too much stuff. Maybe DBH data should only be available through the stem.R module? These are traits that take > 15 minutes to query data then eventually just crash the console, so maybe higher density measurements need some special treatment. The other traits return values in less than 30 seconds.
from rbien.
Related Issues (20)
- Bulk download speed-up
- Clarify "ID" field in BIEN_traits_traits output
- Can't download plot data with specific sampling protocol HOT 4
- Consistency in species name
- Some species names are not capitalized HOT 4
- all "BIEN_taxonomy_*()" queries list class as "Equisetopsida" HOT 3
- vignette("BIEN") responds with vignette 'BIEN' not found HOT 1
- Feature Request: A trait table conversion between BIEN traits and TRY trait IDs HOT 5
- Error in an observation of whole plant vegetative phenology
- BIEN out of CRAN HOT 4
- How can we match all the traits for each species at each site? HOT 8
- BIEN_ranges_load_species fails with hardcoded proj4string
- Comparison BIEN4/GBIF
- Strange values for leaf dry mass
- One trait name is capitalized in database
- Species occurrence download from a list does not work HOT 3
- get the species list (spp) for a given genus
- Unable to complete queries HOT 4
- markdown formatting error in vignettes HOT 2
- There was a problem with the query... HOT 4
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 rbien.