knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

superfundr

Build Status MIT license Jason Heppler

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.

Installation

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

Loading the data

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

Usage

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)

Contributing

This is an open source project and is open to contributions. There are several ways to get involved:

To get started, take a look at CONTRIBUTING.md.

Code of Conduct

superfundr is committed to creating and supporting an inclusive community of practice. Please see our Code of Conduct.

Project Lead

Jason Heppler, PhD / University of Nebraska / t: @jaheppler g: @hepplerj
https://jasonheppler.org



hepplerj/superfundr documentation built on Dec. 4, 2019, 3:14 p.m.