README.md

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

Development by

Simon Goring - University of Wisconsin-Madison, 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.

Currently implemented in neotoma

Coming soon

Install neotoma

install.packages("devtools")
require(devtools)
install_github("neotoma", "ropensci")
require(neotoma)

A few examples

Find the distribution of sites with Mammoth fossils in Neotoma

#  Example requires the plyr package and the mapdata package:
> require(plyr)
> test <- get_datasets(taxonname='Mammuthus*')
The API call was successful, you have returned  3273 records.
> site.locs <- ldply(test, function(x)x$Site)
> map('world', xlim=range(site.locs$LongitudeWest)+c(-10, 10), ylim=range(site.locs$LatitudeNorth)+c(-10, 10))
> points(site.locs$LongitudeWest, site.locs$LatitudeNorth, pch=19, cex=0.5)

thing

Plot the proportion of publications per year for datasets in Neotoma

> # Requires ggplot2
> library(ggplot2)
> pubs <- get_publication()
The API call was successful, you have returned  3693 records.
Warning message:
In getForm(base.uri, .params = cl) : No inputs passed to form
> pub.years <- as.numeric(as.character(pubs$Year))
Warning message:
NAs introduced by coercion
> ggplot(data=data.frame(x = pub.years), aes(x)) +
+     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, na.rm=TRUE), 2013, by=20))

thing



Try the neotoma package in your browser

Any scripts or data that you put into this service are public.

neotoma documentation built on May 2, 2019, 5:55 p.m.