Learn R Programming

⚠️There's a newer version (1.7.4) of this package.Take me there.

neotoma

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 is also available on CRAN as of 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

Development

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.

  • Simon Goring - University of Wisconsin-Madison, Department of Geography

Contributors

  • Gavin Simpson - University of Regina, Department of Biology
  • Jeremiah Marsicek - University of Wyoming, Department of Geology and Geophysics
  • Karthik Ram - University of California - Berkely, Berkeley Institue for Data Science.
  • Luke Sosalla - University of Wisconsin, Department of Geography

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

  • CRAN:
install.packages('neotoma')
  • Development version from GitHub:
install.packages("devtools")
library(devtools)
install_github("ropensci/neotoma")
library(neotoma)

Currently implemented in neotoma

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

  • get_site - obtain information on sites in the Neotoma dataset (which may contain multiple datasets). API
  • get_dataset - obtain dataset metadata from Neotoma. API
  • get_download - obtain full datasets (pollen or mammal) from Neotoma. API
  • compile_list - using established pollen-related taxonomies from the literature, take the published taxon list and standardize it to allow cross site analysis.
  • get_contact - find contact information for data contributors to Neotoma. API
  • get_publication - obtain publication information from Neotoma. API
  • get_table - return matrices corresponding to one of the Neotoma database tables. tables
  • get_taxa - Get taxon information from Neotoma. API
  • get_chroncontrol - Get chronological information used to build the age-depth model for the record. API

Recent Changes

  • 1.6.2: Improved the basic plot method based on tests against Tilia files in the Neotoma Holding Tank & built more robust interpolation in read_bacon so that age models without interpolated dates can still be imported. browse now opens multiple datastes in the Neotoma Explorer at once.
  • 1.6.1: New Stratiplot method, using the analogue package to plot dataset diagrams from download and download_list objects, bug fixes for write_agefile and a new function, read_bacon, to read in and integrate Bacon chronologies into download objects.
  • 1.6.0: Support for vector inputs in the gpid selection. Added a get_closest function to find the closest sample site. Mostly clean-up of reported bugs by users. Revised examples for faster check speed.
  • 1.5.1: Minor fix to the get_dataset for site level data to account for some datasets with empty submission data. Some style changes to code (non-functional changes)
  • 1.5.0: More extensive testing to support multiple dataset types. Water chemistry datasets still unsupported. Function read.tilia added to read Tilia (http://tiliait.com) style XML files. Moved to using xml2, httr and jsonlite to support parsing.
  • 1.4.1: Small changes to get_geochron to address bug reports and improve object printing methods.
  • 1.4.0: Added plot method for datasets, sites & downloads. Fixed a bug with records missing chronologies.

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')

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))

Cumulative plot of record uploads to Neotoma since 1998.

Found at this gist

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.

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.


Copy Link

Version

Install

install.packages('neotoma')

Monthly Downloads

145

Version

1.6.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

September 22nd, 2016

Functions in neotoma (1.6.2)

bind

Function to bind objects together into a longer object.
get_chroncontrol.download_list

Function to return chronological control tables from a download_list object.
counts

Access proxy count data
get_chroncontrol.download

Function to return chronological control tables from a download object.
get_chroncontrol.dataset_list

Function to return chronological control tables from a dataset_list.
get_chroncontrol.default

Function to return chronological control tables from a chronologic ID.
download

A class for download objects.
get_chroncontrol

Function to return chronological control tables used to build age models.
get_chroncontrol.dataset

Function to return chronological control tables from a dataset.
get_closest

Find the closest dataset records to a site, dataset or long/lat pair in Neotoma
get_contact

Get contact information.
get_dataset.geochronologic

Obtain dataset information from an object of class geochronologic.
get_dataset.geochronologic_list

Obtain dataset information from an object of class geochronologic_list.
get_dataset.download_list

Obtain dataset information from a download_list.
get_dataset

Obtain dataset information from the Neotoma Paleoecological Database or an existing object.
get_dataset.download

Obtain dataset information from an existing download object.
get_dataset.site

Obtain dataset information from an existing site object.
get_dataset.default

Obtain dataset information from the Neotoma Paleoecological Database or an existing object.
get_download.dataset_list

Function to return full download records using a dataset_list.
get_download.dataset

Function to return full download records using a dataset.
get_download.default

Function to return full download records using numeric dataset IDs.
get_publication.dataset

A function to get publications for datasets in the Neotoma Database using the API.
get_publication

A function to get publications for sites or datasets in the Neotoma Database using the API.
get_download

Function to return full download records using sites, datasets, or dataset IDs.
get_download.site

Function to return full download records using a site.
get_publication.default

A function to get publications for sites or datasets in the Neotoma Database using the API.
get_publication.download_list

A function to get publications for datasets in the Neotoma Database using the API.
get_publication.download

A function to get publications for downloads in the Neotoma Database using the API.
get_geochron

Function to return geochronological data from records.
get_publication.dataset_list

A function to get publications for dataset_lists in the Neotoma Database using the API.
get_site.dataset_list

Return Site Information from a dataset_list
get_table

Get Neotoma value tables.
get_site.download_list

Return Site Information from a download_list
get_site.download

Return Site Information from a download
get_site.geochronologic_list

Return Site Information from a geochronologic_list
get_site.default

Return Site Information.
get_site.dataset

Return Site Information from a dataset
get_site.geochronologic

Return Site Information from a geochronologic
get_taxa

Get taxon information from Neotoma.
gp.table

A list of all the geopolitical entities in the Neotoma database.
get_site

Return Site Information.
translate.table

A table to convert the original taxa to standardized lists.
taxon.list

Neotoma taxon list
read.tilia

Read proxy data from Tilia TLX files
read_bacon

Function to read in defined Bacon outputs.
param_check

Internal function to check passed parameters.
Stratiplot.download_list

Palaeoecological stratigraphic diagrams
pollen.equiv

A table to convert the pollen taxa identified by investigators to standardized lists.
Stratiplot.download

Palaeoecological stratigraphic diagrams
write_agefile

Write age control file to disk formatted for either Bacon or Clam
browse.download_list

Open a browser window to display a Neotoma dataset within the Neotoma Explorer
browse

Open a browser window to display a Neotoma dataset within the Neotoma Explorer
ages

Access proxy age data
browse.dataset_list

Open a browser window to display a Neotoma dataset within the Neotoma Explorer
compile_taxa

Function to convert assemblage taxa to standardized lists.
browse.default

Open a browser window to display a Neotoma dataset within the Neotoma Explorer
browse.dataset

Open a browser window to display a Neotoma dataset within the Neotoma Explorer
compile_downloads

Function to convert multiple downloads into a single large table.
browse.download

Open a browser window to display a Neotoma dataset within the Neotoma Explorer