knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
The superfundr
package contains data on U.S. Superfund sites established by the Environmental Protection Agency.
The data is processed with a combination of the tabulizer
package and various tidyverse
methods using the most recent available PDF and Excel data from the Environmental Protection Agency.
superfundr
is a data package containing a dataset of Superfund sites in the United States. The best way to install it is through devtools
. You can install superfundr from GitHub with:
library(devtools) devtools::install_github("hepplerj/superfundr")
The package works best with the tidyverse libraries and the simple features package for mapping.
library(tidyverse)
Load the data:
library(superfundr)
Look at it:
superfunds
The data is structured just as it comes from the Environmental Protection Agency, which lists out each contaminant at each site. superfundr
adds additional information from the EPA's basic spreadsheet, including latitude and longitude coordinates and addresses, and converts data as necessary (title case for text, dates as date objects, etc).
The data can be used in a variety of ways. You can count the total number of contaminants across all sites.
superfunds %>% group_by(contaminant) %>% tally(sort = TRUE)
You can count the number of active, inactive, and deleted sites.
superfunds %>% distinct(site_name, .keep_all = TRUE) %>% group_by(npl_status) %>% tally(sort = TRUE)
You can also map the locations of sites using Leaflet, which may also lend itself to further spatial analysis using Census or demographic information.
library(leaflet) library(superfundr) leaflet(data = superfunds %>% distinct(site_name, .keep_all = T)) %>% addProviderTiles("CartoDB.Positron") %>% addCircleMarkers(radius = 3, stroke = FALSE, fillOpacity = 0.5)
This is an open source project and is open to contributions. There are several ways to get involved:
superfundr
uses roxygen2, which provides documentation at the top of any function definition. Please submit improvements as a pull request.To get started, take a look at CONTRIBUTING.md.
superfundr
is committed to creating and supporting an inclusive community of practice. Please see our Code of Conduct.
Jason Heppler, PhD / University of Nebraska / t: @jaheppler g: @hepplerj
https://jasonheppler.org
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.