Giter VIP home page Giter VIP logo

epair's Introduction

epair

DOI R-CMD-check

A package designed to aid in getting data from the Environmental Protection Agency (EPA) API at https://aqs.epa.gov/aqsweb/documents/data_api.html.

Overview

The epair package helps you determine what data you want and how to get that data from the EPA API. It provides loaded in variables that help you navigate services in the API, and a simple way to query the data.

Broadly, you can explore possible calls by typing epair::get_ and seeing what autocomplete offers in R. Most of these functions require a start and end date along with a geographical boundary type (like CBSA code or bounding box). For more details, we recommend looking at the help docs ?epair::get_[type]() for the function you're interested in using to see the exact required params.

Installation

You can download the package simply by using r-universe.

install.packages("epair", repos = "https://ropensci.r-universe.dev")

Alternativately, you can download the latest release from this repo using devtools.

devtools::install_github("ropensci/epair")

Or, download these files, and in your working directory run the following.

devtools::install("ropensci/epair")

epair depends on httr for making its data calls and rvest for creating the variables loaded in with the package. We recommend having httr installed (automatically taken care of through package dependencies), and only installing rvest if you're curious about how package variables were made.

Usage notes

Note that currently a single call to AQS allows for at maximum a single year's worth of data. You'll need to create separate calls to get multiple year's worth of data.

ropenaq

You may want to check out ropenaq instead depending on the goals behind your study. ropenaq is an R wrapper for accessing the OpenAQ API - see its website here. Here are a few differences:

  • epair will get data from a single source (EPA AQS API), while ropenaq will be more useful if you’re trying to compare data from different sources.

  • If you're interested in data for the US only, epair would be an appropriate choice. For more locations across the world, ropenaq would work better.

  • epair’s data source does offer more granularity than OpenAQ for US data. The EPA AQS API can give over 500 parameters/pollutants of interest (as opposed to OpenAQ’s 5), county level coverage, and unaggregated raw data. By default, OpenAQ will give aggregated data so if you're only interested in aggregations, then OpenAQ is the way to go.

Terms of Service

Make sure you also see the Usage Tips and Terms of Service associated with using this API at https://aqs.epa.gov/aqsweb/documents/data_api.html.

epair's People

Contributors

glorozcom avatar mmlawrence avatar ogilani avatar

Stargazers

 avatar Fernando Aristizabal avatar Benjamin avatar Tobias Augspurger avatar Logan Piepmeier avatar  avatar Gavin Rozzi avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.