Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get better demo data and code #8

Closed
danlwarren opened this issue Sep 2, 2016 · 8 comments
Closed

Get better demo data and code #8

danlwarren opened this issue Sep 2, 2016 · 8 comments

Comments

@danlwarren
Copy link
Owner

No description provided.

@rdinnager
Copy link
Collaborator

I could probably contribute some Banksia and Hakea data from SW Australia if that would help?

@danlwarren
Copy link
Owner Author

I was thinking something with two species on a relatively small island, maybe two environmental layers. Something a lot like the ahli/allogus data that's already in there, but with more occurrence points. Size of test data gets to be a real issue when you're submitting packages to CRAN.

@nahuron
Copy link
Contributor

nahuron commented Nov 17, 2017

What sort of island size are we talking? Depending on when I can get my Brachymeles manuscript shipped off, there might be a species pair that would work well for one of the islands in the Philippines.

@danlwarren
Copy link
Owner Author

It's more about file size than geographic size, so of course resolution can be a huge component of that.

Actually, the ideal situation would be:

A small clade (maybe ~5 species)
Decent amount of occurrence data
Around four climate layers
Phylogeny

Ideally all would compress into about 4 MB.

@rdinnager
Copy link
Collaborator

Perhaps we should also include some simulated data? Then we can make it whatever size we want, and make it demonstrate whatever functionality we want. Plus it would probably make sense to have some simulated data for making testthat tests..

@danlwarren
Copy link
Owner Author

Yeah, actually that might be the most size-efficient way to do it. We could set up some code to specify some simple niches and a tree for a small clade of organisms, and then for "environments" have some spatially-autocorrelated random fields in a raster stack. That way we could just generate the demo data on the fly as we write example code, storing nothing.

That is, of course, as long as the demo data can be simulated quickly. CRAN also has a requirement about runtime for sample code.

@danlwarren
Copy link
Owner Author

Okay so we may not want to do this bit on the fly, but we can simulate spatially autocorrelated rasters and zip those up as part of the sample data. Simulating the species with base R code and stuff we're already importing should be significantly easier.

image

Based on code from here: http://santiago.begueria.es/2010/10/generating-spatially-correlated-random-fields-with-r/

Along with some janky post-processing to generate correlations between predictors.

@danlwarren
Copy link
Owner Author

I've actually attached some demo data to the Cranify branch. It's a clade of Iberian lizards and a low-res European set of Worldclim layers. I'm rewriting demo code now to work with the included data set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants