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
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.
neotoma
neotoma
install.packages("devtools")
require(devtools)
install_github("neotoma", "ropensci")
require(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)
> # 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))
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.