Science Score: 33.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (20.4%) to scientific vocabulary
Keywords
data
epa
r
r-package
rstats
water-quality
Keywords from Contributors
survey
Last synced: 5 months ago
·
JSON representation
Repository
:droplet: Access EPA ATTAINS data in R :droplet:
Basic Info
- Host: GitHub
- Owner: mps9506
- License: other
- Language: R
- Default Branch: main
- Homepage: https://mps9506.github.io/rATTAINS/
- Size: 14.6 MB
Statistics
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 5
Topics
data
epa
r
r-package
rstats
water-quality
Created about 6 years ago
· Last pushed 8 months ago
Metadata Files
Readme
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
dev = "ragg_png",
dpi = 200
)
```
# rATTAINS
[](https://cran.r-project.org/package=rATTAINS)
[](https://mps9506.r-universe.dev)
[](https://www.repostatus.org/#active)
[](https://github.com/mps9506/rATTAINS/actions)
[](https://app.codecov.io/gh/mps9506/rATTAINS)
[](https://doi.org/10.5281/zenodo.5469911)
rATTAINS provides functions for downloading tidy data from the United States (U.S.) Environmental Protection Agency (EPA) [ATTAINS](https://www.epa.gov/waterdata/attains) webservice. ATTAINS is the online system used to track and report Clean Water Act assessments and Total Maximum Daily Loads (TMDLs) in U.S. surface waters. rATTAINS facilitates access to the [public information webservice](https://www.epa.gov/waterdata/get-data-access-public-attains-data) made available through the EPA.
rATTAINS is on CRAN:
```{r eval=FALSE}
install.packages('rATTAINS')
```
Or install the development version from r-universe:
```{r eval=FALSE}
install.packages('rATTAINS',
repos = 'https://mps9506.r-universe.dev')
```
## Functions and webservices
There are eight user available functions that correspond with the first eight web services detailed by [EPA](https://www.epa.gov/sites/default/files/2020-10/documents/attains_how_to_access_web_services_2020-10-28.pdf). All arguments are case sensitive. By default the functions attempt to provide flattened "tidy" data as a single or multiple dataframes. By using the `tidy = FALSE` argument in the function below, the raw JSON will be read into the session for the user to parse if desired. This can be useful since some webservices provide different results based on the query and the tidying process used in rATTAINS might make poor assumptions in the data flattening process. If the function returns unexpected results, try parsing the raw JSON string.
- `state_summary()` provides summary information for assessed uses for organizations and by integrated reporting cycle.
- `huc_12_summary()` provides summary information about impairments, actions, and documents for the specified 12-digit HUC (watershed).
- `actions()` provides a summary of information for particular finalized actions (TMDLs and related).
- `assessments()` provides summary data about the specified assessment decisions by waterbody.
- `plans()` returns a summary of the plans (TMDLs and related) within a specified HUC.
- `domain_values()` returns allowed values in ATTAINS. By default (no arguments) the function returns a list of allowed `domain_names`.
- `assessment_units()` returns a summary of information about the specified assessment units.
- `surveys()` returns results from state statistical survey results in ATTAINS.
# Examples:
Get a summary about assessed uses from the Texas Commission on Environmental Quality:
```{r}
library(rATTAINS)
state_summary(organization_id = "TCEQMAIN",
reporting_cycle = "2020",
.unnest = FALSE) |>
tidyr::unnest(reporting_cycles) |>
tidyr::unnest(water_types) |>
tidyr::unnest(use_attainments)
```
Get a summary about assessed uses, parameters and plans in a HUC12:
```{r}
df <- huc12_summary(huc = "020700100204",
.unnest = FALSE)
tidyr::unnest(df, summary_by_use)
tidyr::unnest(df, summary_by_parameter_impairments, names_repair = "minimal")
tidyr::unnest(df, summary_restoration_plans, names_repair = "minimal")
```
Find statistical surveys completed by an organization:
```{r}
surveys(organization_id="SDDENR",
.unnest = FALSE) |>
tidyr::unnest(survey_water_groups) |>
tidyr::unnest(survey_water_group_use_parameters)
```
## Citation
If you use this package in a publication, please cite as:
```{r}
citation("rATTAINS")
```
Owner
- Name: Michael Schramm
- Login: mps9506
- Kind: user
- Location: Raleigh, NC
- Company: Texas A&M University, @TxWRI
- Website: michaelpaulschramm.com
- Twitter: mpschramm
- Repositories: 73
- Profile: https://github.com/mps9506
Research specialist with the Texas Water Resources Institute at Texas A&M University. All things water quality and watersheds.
GitHub Events
Total
- Issues event: 2
- Watch event: 2
- Issue comment event: 1
- Push event: 9
- Pull request event: 2
- Fork event: 1
- Create event: 1
Last Year
- Issues event: 2
- Watch event: 2
- Issue comment event: 1
- Push event: 9
- Pull request event: 2
- Fork event: 1
- Create event: 1
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| mps9506 | m****m@g****m | 159 |
| Michael Schramm | m****m@a****u | 84 |
| Hadley Wickham | h****m@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 19
- Total pull requests: 19
- Average time to close issues: about 2 months
- Average time to close pull requests: 3 days
- Total issue authors: 3
- Total pull request authors: 2
- Average comments per issue: 0.74
- Average comments per pull request: 0.89
- Merged pull requests: 19
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 1
- Average time to close issues: 5 days
- Average time to close pull requests: 1 day
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- mps9506 (17)
- TraciPopejoy (1)
- slarge (1)
Pull Request Authors
- mps9506 (17)
- hadley (3)
Top Labels
Issue Labels
bug (2)
enhancement (2)
documentation (1)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 553 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 7
- Total maintainers: 1
cran.r-project.org: rATTAINS
Access EPA 'ATTAINS' Data
- Homepage: https://github.com/mps9506/rATTAINS
- Documentation: http://cran.r-project.org/web/packages/rATTAINS/rATTAINS.pdf
- License: MIT + file LICENSE
-
Latest release: 1.0.1
published 9 months ago
Rankings
Forks count: 21.9%
Stargazers count: 26.2%
Dependent packages count: 29.8%
Average: 33.0%
Dependent repos count: 35.5%
Downloads: 51.5%
Maintainers (1)
Last synced:
6 months ago
Dependencies
DESCRIPTION
cran
- checkmate * imports
- crul * imports
- curl * imports
- dplyr * imports
- fauxpas * imports
- fs * imports
- hoardr * imports
- janitor * imports
- magrittr * imports
- purrr * imports
- rlang * imports
- rlist * imports
- tibble * imports
- tidyjson * imports
- tidyr * imports
- knitr * suggests
- rmarkdown * suggests
- testthat >= 3.0.0 suggests
- vcr >= 0.6.0 suggests
- webmockr * suggests
.github/workflows/CRAN-check.yaml
actions
- actions/checkout v3 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/render-rmarkdown.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite