ropensci / neotoma

Programmatic R interface to the Neotoma Paleoecological Database.
https://docs.ropensci.org/neotoma
Other
30 stars 16 forks source link
cran neotoma neotoma-apis neotoma-database nsf paleoecology r r-package rstats

neotoma

Build Status Build status codecov.io rstudio mirror downloads cran version NSF-1550707 NSF-1948926

NOTE The package neotoma has now been deprecated. Unfortunately our wnapi.neotomadb.org server reached end of life and was no longer operable. The package has been replaced by neotoma2. As much as possible we have kept many of the same patterns, but there are new data structures. The wnapi server was only passing along data submitted before June 2020. The new package accesses all data up until the present. Please contact us directly either by email (goring@wisc.edu) or on our slack workspace (there is an it_r channel) and we can help assist you in migrating to neotoma2.

The neotoma package is a programmatic R interface to the Neotoma Paleoecological Database. The package is intended to both allow users to search for sites and to download data for use in analyical workflows of paleoecological research.

neotoma is part of the rOpenSci project and is also hosted on Figshare. The neotoma package has been available on CRAN since May 3, 2015.

For more information on the package please refer to:

Goring, S., Dawson, A., Simpson, G. L., Ram, K., Graham, R. W., Grimm, E. C., & Williams, J. W.. (2015). neotoma: A Programmatic Interface to the Neotoma Paleoecological Database. Open Quaternary, 1(1), Art. 2. DOI: 10.5334/oq.ab

For ongoing news, issues or information please join the Neotoma Slack server (and add the #r channel). Slack is a real time chat application and collaboration hub with mobile and desktop applications.

Development

We expect no further development of this package, however, we welcome contributions from any individual, whether code, documentation, or issue tracking. All participants are expected to follow the code of conduct for this project.

Contributors

Package functions resolve various Neotoma APIs and re-form the data returned by the Neotoma database into R data objects. The format of the Neotoma data, and the actual API functions can be accessed on the Neotoma API website.

If you have used the package please consider providing us feedback through a short survey.

Install neotoma

Currently implemented in neotoma

More functions are available through the package help. These represent the core functions:

Recent Changes

A few examples:

Find the distribution of sites with Mammoth fossils in Neotoma

#  Example requires the mapdata package:
library('mapdata')

#  You may use either '%' or '*' as wildcards for search terms:
test <- get_dataset(taxonname='Mammuthus*')

The API call was successful, you have returned  3273 records.

site.locs <- get_site(test)

# A crude way of making the oceans blue.
plot(1, type = 'n',
     xlim=range(site.locs$long)+c(-10, 10),
     ylim=range(site.locs$lat)+c(-10, 10),
     xlab='Longitude', ylab = 'Latitude')
rect(par("usr")[1],par("usr")[3],par("usr")[2],par("usr")[4],col = "lightblue")
map('world',
    interior=TRUE,
    fill=TRUE,
    col='gray',
    xlim=range(site.locs$long)+c(-10, 10),
    ylim=range(site.locs$lat)+c(-10, 10),
    add=TRUE)

points(site.locs$long, site.locs$lat, pch=19, cex=0.5, col='red')

thing

Plot the proportion of publications per year for datasets in Neotoma

# Requires ggplot2
library('ggplot2')
library('plyr')
pubs <- get_publication()

pub.years <- ldply(pubs, "[[", "meta")

ggplot(data=pub.years, aes(x = year)) +
     stat_bin(aes(y=..density..*100, position='dodge'), binwidth=1) +
     theme_bw() +
     ylab('Percent of Publications') +
     xlab('Year of Publication') +
     scale_y_continuous(expand = c(0, 0.1)) +
     scale_x_continuous(breaks = seq(min(pub.years$year, na.rm=TRUE), 2014, by=20))

thing

Cumulative plot of record uploads to Neotoma since 1998.

Found at this gist

cumulativerecords

Obtain records & Rebuild Chronologies with Bacon

Found at this gist. Prepared in part for a Bacon (Blaauw & Christen, 2011) workshop at the 2015 International Limnogeology Conference in Reno-Tahoe, Nevada led by Amy Myrbo (University of Minnesota).

Simple paleo-data visualization

Simple paleo-data visualization in R, linking the rioja, neotoma and dplyr packages. Found at this gist.

gif

Find all site elevations in California:

Found at Simon Goring's gist..

Match all Neotoma taxa to external databases using taxize:

Found at Simon Goring's gist..

Other Resources Using neotoma

neotoma Workshops

We have provided a set of educational tools through the NeotomaDB GitHub repository in the Workshops repository. These are free to share, and can be modified as needed.