Access paleoecological datasets from the Neotoma Paleoecological Database using the published API (< http://api.neotomadb.org/>). The functions in this package access various pre-built API functions and attempt to return the results from Neotoma in a usable format for researchers and the public.
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.
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
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.
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.
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
get_dataset(gpid=123)was returning an error, fix corrects the error to allow unassigned
xvariables. Updated the allowable dataset types for searching to reflect the larger set of dataset types within Neotoma.
get_dataset()functions so that a vector of dataset or siteids can be passed to improve more general workflow methods.
taxa()function to easily extract taxa from one or multiple download objects.
compile_download(), single sample downloads were failing to compile properly, added the
taxa()function to extract taxa lists from large download objects.
plot_leaflet()to allow interactive exploration of downloaded Neotoma data. Integrates with the Neotoma Explorer. Minor bugfix for
get_download()to allow records to be sent to Neotoma and to be filtered.
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.
Stratiplot()method, using the
analoguepackage to plot dataset diagrams from
download_listobjects, bug fixes for
write_agefile()and a new function,
read_bacon(), to read in and integrate Bacon chronologies into
gpidselection. 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.
get_dataset()for site level data to account for some datasets with empty submission data. Some style changes to code (non-functional changes)
read.tilia()added to read Tilia (http://tiliait.com) style XML files. Moved to using
jsonliteto support parsing.
get_geochron()to address bug reports and improve object
plot()method for datasets, sites & downloads. Fixed a bug with records missing chronologies.
# 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"),par("usr"),par("usr"),par("usr"),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')
# Requires ggplot2library('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))
Found at this gist
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 in R, linking the
dplyr packages. Found at this gist.
Found at Simon Goring's gist..
Found at Simon Goring's gist..
o Bug fix:
get_dataset(gpid=123) was returning an error, fix corrects the error to allow unassignedx` variables.
o Updated the allowable dataset types for searching to reflect the larger set of dataset types within Neotoma.
o Added numeric/integer methods to the
get_dataset functions so that a vector of dataset or siteids can be passed to improve more general workflow methods.
o Bugfixes, added the
taxa function to easily extract taxa from one or multiple download objects.
o Bugfix for
compile_download, single sample downloads were failing to compile properly.
plot_leaflet to allow interactive exploration of downloaded Neotoma data. Integrates with the Neotoma Explorer.
o Minor bugfix for
get_download to allow records to be sent to Neotoma and to be filtered.
o Bugfix in
read.tilia based on experience in extensive testing. Improved the basic
plot method based on tests against Tilia files in the Neotoma Holding Tank.
o 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.
Stratiplot method, using the
analogue package to plot dataset diagrams from
o Bug fixes for
o New function
read_bacon to read in and integrate Bacon chronologies into
o Support for vector inputs in the
o Added a
get_closest function to find the closest datasets to a sample site.
o Mostly clean-up of reported bugs by users.
o Revised examples for faster check speed.
o Fix for datasets with empty submission dates. o Some minor (non-functional) code cleaning. o Added extra tests.
o More extensive testing to support multiple dataset types. Water chemistry datasets still unsupported.
read.tilia added to read Tilia (http://tiliait.com) style XML files.
o Moved to using
jsonlite to support parsing.
o The few records without chronologies were causing errors when
get_download was applied.
o Added plot method.
o Critical bug fix:
get_download now correctly assigns the default chronology to
sample.meta. All other chronologies (including the default) are stored in the
chronologies list for the
o Bugfix for issue #187, empty
dataset_lists now return a NULL value, rather than breaking the
o Bugfix for
get_download, assignment to the
dataset.id was incorrectly placed causing the columns to be out of place relative to the data.
o Bugfix for
o Added a
browse method for datasets, that will open a browser window for a specific dataset or download.
o The deprecated
compile_list function has now been removed. Use
o Improved functionality of get_chroncontrol to allow it to deal with empty tables and work directly with download and download_list objects.
o Added new datasettypes for records, including water chemistry, charcoal, XRD and others.
o Publication of 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, 1(1), Art. 2. DOI: http://doi.org/10.5334/oq.ab
o continued development of API implementation and working toward a common standard for data output.
o Continued development of tests for the package.
o Changed function names to singular.