bbsAssistant
bbsAssistant: An R package for downloading and handling data and information from the North American Breeding Bird Survey - Published in JOSS (2019)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 8 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
2 of 11 committers (18.2%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
bbs-data
birds
breeding-bird-survey
data-downloader
ecology
ornithology
point-count
usgs
Last synced: 6 months ago
·
JSON representation
Repository
An R package for downloading and handling data and information from the North American Breeding Bird Survey.
Basic Info
Statistics
- Stars: 30
- Watchers: 2
- Forks: 13
- Open Issues: 28
- Releases: 3
Topics
bbs-data
birds
breeding-bird-survey
data-downloader
ecology
ornithology
point-count
usgs
Created over 6 years ago
· Last pushed over 2 years ago
Metadata Files
Readme
Contributing
License
Code of conduct
Support
README.Rmd
--- title: "**bbsAssistant**: An R package for Downloading and Handling Data and Information from the North American Breeding Bird Survey (BBS)" date: "Last updated: `r Sys.Date()`" bibliography: .github/paper/paper.bib output: github_document always_allow_html: true --- [](https://doi.org/10.21105/joss.01768) [](https://github.com/trashbirdecology/bbsAssistant/actions) [](https://creativecommons.org/publicdomain/zero/1.0/) [](#contributors) [](https://github.com/trashbirdecology/bbsAssistant/actions)## About This repository contains the development version of __bbsAssistant__. Please submit [Issues here](https://github.com/TrashBirdEcology/bbsAssistant/issues). This package contains functions for downloading, importing, and munging the official releases of the [North American Breeding Bird Survey](https://www.pwrc.usgs.gov/bbs/) (BBS) data (retrieved from USGS ScienceBase repository) with the help of package [sbtools](https://cran.r-project.org/package=sbtools/). ## Quick Start ```{r install, echo=FALSE, warning=FALSE, message=FALSE, eval=FALSE} remotes::install_github("trashbirdecology/bbsAssistant", ref="main", # change to main for releases force=TRUE) # force=TRUE to get most recent dev version ``` ```{r libs, echo=TRUE, warning=FALSE, message=FALSE, eval=TRUE} library(bbsAssistant) # view functions and data in package bbsAssistant # ls("package:bbsAssistant") ``` ## Download, Unpack, and Import the Most Recent Dataset ```{r grab_bbs_data, echo=TRUE, warning=FALSE, message=FALSE, eval=TRUE} bbs <- grab_bbs_data() # Optional: specify `sb_id` as the USGS ScienceBase identifier for a specific data release. If sb_id is not supplied, will default to the most recent data release. ``` The object resulting from `bbsAssistant::import_bbs_data()` is a list comprising the following elements: ```{r view, echo=TRUE, warning=FALSE, message=FALSE, eval=TRUE} names(bbs) ``` ## Filtering by State/Region Filter the dataset using your preferred method. A lookup table is provided as a package dataset for filtering by country or state using the BBS codes (see columns CountryNum, StateNum) or ISO alpha codes and names (see columns iso_3155_2, iso_a2, name_fr, name_es): ```{r regioncodes, echo=TRUE, warning=FALSE, message=FALSE, eval=TRUE} head(bbsAssistant::region_codes, 3) ``` ### Filter on species names View the species lists for your particular dataset by calling: ```{r} head(bbs$species_list,3) ``` or view the most recent species list (may be the same as yours..): ```{r, eval=FALSE} head(bbsAssistant::species_list,3) ``` Keep only _Passer domesticus_: ```{r filter-hosp} # grab the aou code for House Sparrow using common name hosp.aou.code <- bbs$species_list$AOU[bbs$species_list$English_Common_Name=="House Sparrow"] # or genus and species epithet # hosp.aou.code <- # bbs$species_list$AOU[bbs$species_list$Genus == "Passer" & # bbs$species_list$Species == "domesticus"] hofi <- bbs$species_list$Scientific_Name[bbs$species_list$English_Common_Name=="House Finch"] # filter the observations along BBS "AOU" code: ## note spelling but not capitalization matters. ## can provide species arg as species' common or latin name(s) or as BBS "AOU" code(s) hosp.df <- munge_bbs_data(bbs_list=bbs, species = c(hosp.aou.code, hofi)) # species = c("House SPARROW", "passer Domesticus", hosp.aou.code)) ``` ## BBS Data Availability (including sb_id) There are currently two primary products released from the USGS that are derived from the annual BBS roadside surveys, the [observations data](https://www.sciencebase.gov/catalog/item/52b1dfa8e4b0d9b325230cd9) and the analysis results. The datasets (observations, results) are permanently and publicly available at [USGS ScienceBase](https://www.sciencebase.gov/). The most recent annual releases of the observations and results datasets are stored as data objects in this package (see `data(bbs)`) will be downloaded as the default in this package, but the user has the option to specify historical dataset releases should they choose. Please see the function `get_bbs_data()`. ```{r dataset-lookup, eval=TRUE, message=FALSE, warning=FALSE, echo=FALSE} datasets <- bbsAssistant::sb_items ``` A lookup table containing the available datasets (N = `r length(unique(datasets$sb_item))`) and analysis results will be regularly updated, and comprises the following entries: ```{r datasets, eval=TRUE, message=FALSE, warning=FALSE, echo=FALSE} library(magrittr) library(dplyr) library(kableExtra) datasets %>% select(-legacy_format, -sb_parent) %>% relocate(sb_item, .after = last_col()) %>% kable(caption="List of datasets currently available for download at USGS ScienceBase. Highlighted and bold row indicates the default BBS observations dataset stored internally in the package.") %>% kable_styling(bootstrap_options = "striped", full_width = TRUE, position = "left") %>% column_spec(1, width = "100em") %>% row_spec(1, background = "yellow", bold = TRUE) ``` ## Citations __For the BBS dataset and analysis results__, call `citation("bbsAssistant")` or see library loading message. __For general use of the R package bbsAssistant__ and/or __companion paper__: Burnett, J.L., Wszola, L., and Palomo-Muñoz, G. (2019). bbsAssistant: An R package for downloading and handling data and information from the North American Breeding Bird Survey: U.S. Geological Survey software release, https://doi.org/10.5066/P93W0EAW. _or_ Burnett, J.L., Wszola, L., and Palomo-Muñoz, G. (2019). bbsAssistant: An R package for downloading and handling data and information from the North American Breeding Bird Survey. Journal of Open Source Software, 4(44), 1768, https://doi.org/10.21105/joss.01768 ## Contributing ## Code of Conduct Please note that the bbsAssistant project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. For questions, comments, or issues, feel free to email the maintainer [Jessica Burnett](mailto:jburnett@usgs.gov) or submit an [Issue](https://github.com/TrashBirdEcology/bbsAssistant/issues) (preferred).
Owner
- Name: Jessica Burnett
- Login: trashbirdecology
- Kind: user
- Location: Washington, D.C., USA
- Company: @nasa
- Repositories: 49
- Profile: https://github.com/trashbirdecology
JOSS Publication
bbsAssistant: An R package for downloading and handling data and information from the North American Breeding Bird Survey
Published
December 04, 2019
Volume 4, Issue 44, Page 1768
Authors
Jessica L. Burnett
Science Analytics and Synthesis, Core Science Systems, U.S. Geological Survey, Denver, Colorado, USA
Science Analytics and Synthesis, Core Science Systems, U.S. Geological Survey, Denver, Colorado, USA
Tags
breeding bird survey data retriever ecology point countsGitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| trashbirdecology | j****t@g****m | 390 |
| Jessica Burnett | T****y | 155 |
| Jessica Burnett | j****t@u****v | 14 |
| Gabriela Palomo | g****o@g****m | 11 |
| [Gabriela Palomo] | [****o@g****] | 7 |
| jsta | s****2@m****u | 6 |
| Ethan White | e****n@w****g | 3 |
| Lyndsie Wszola | l****5@g****m | 2 |
| Kristen Thyng | k****g@g****m | 2 |
| Hugo Gruson | B****o | 2 |
| Max Joseph | m****h@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 66
- Total pull requests: 34
- Average time to close issues: about 2 months
- Average time to close pull requests: 9 days
- Total issue authors: 11
- Total pull request authors: 9
- Average comments per issue: 1.11
- Average comments per pull request: 0.47
- Merged pull requests: 27
- Bot issues: 0
- Bot pull requests: 3
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- trashbirdecology (46)
- mbjoseph (4)
- ethanwhite (3)
- richardjtelford (3)
- chrischizinski (3)
- see24 (2)
- lsw5077 (1)
- brendanwallison (1)
- GabsPalomo (1)
- jsta (1)
- kpdavis47 (1)
Pull Request Authors
- trashbirdecology (12)
- jsta (6)
- GabsPalomo (4)
- ethanwhite (3)
- allcontributors[bot] (3)
- mbjoseph (2)
- kthyng (2)
- see24 (1)
- Bisaloo (1)
Top Labels
Issue Labels
bug (9)
enhancement (9)
documentation (5)
help wanted (4)
urgent (3)
minor suggestion (2)
question (2)
required for cran (1)
contributors (1)
Pull Request Labels
Dependencies
DESCRIPTION
cran
- R >= 2.10 depends
- dplyr * imports
- lubridate * imports
- magrittr * imports
- readr * imports
- sbtools * imports
- stringr * imports
- usethis * imports
- utils * imports
- spelling * suggests
- testthat >= 3.0.0 suggests
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v2 composite
- r-lib/actions/check-r-package v1 composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
- r-lib/actions/setup-r-dependencies v1 composite
.github/workflows/pkgdown.yaml
actions
- actions/cache v1 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc master composite
- r-lib/actions/setup-r master composite
## About
This repository contains the development version of __bbsAssistant__. Please submit [Issues here](https://github.com/TrashBirdEcology/bbsAssistant/issues).
This package contains functions for downloading, importing, and munging the official releases of the [North American Breeding Bird Survey](https://www.pwrc.usgs.gov/bbs/) (BBS) data (retrieved from USGS ScienceBase repository) with the help of package [sbtools](https://cran.r-project.org/package=sbtools/).
## Quick Start
```{r install, echo=FALSE, warning=FALSE, message=FALSE, eval=FALSE}
remotes::install_github("trashbirdecology/bbsAssistant",
ref="main", # change to main for releases
force=TRUE) # force=TRUE to get most recent dev version
```
```{r libs, echo=TRUE, warning=FALSE, message=FALSE, eval=TRUE}
library(bbsAssistant)
# view functions and data in package bbsAssistant
# ls("package:bbsAssistant")
```
## Download, Unpack, and Import the Most Recent Dataset
```{r grab_bbs_data, echo=TRUE, warning=FALSE, message=FALSE, eval=TRUE}
bbs <- grab_bbs_data()
# Optional: specify `sb_id` as the USGS ScienceBase identifier for a specific data release. If sb_id is not supplied, will default to the most recent data release.
```
The object resulting from `bbsAssistant::import_bbs_data()` is a list comprising the following elements:
```{r view, echo=TRUE, warning=FALSE, message=FALSE, eval=TRUE}
names(bbs)
```
## Filtering by State/Region
Filter the dataset using your preferred method. A lookup table is provided as a package dataset for filtering by country or state using the BBS codes (see columns CountryNum, StateNum) or ISO alpha codes and names (see columns iso_3155_2, iso_a2, name_fr, name_es):
```{r regioncodes, echo=TRUE, warning=FALSE, message=FALSE, eval=TRUE}
head(bbsAssistant::region_codes, 3)
```
### Filter on species names
View the species lists for your particular dataset by calling:
```{r}
head(bbs$species_list,3)
```
or view the most recent species list (may be the same as yours..):
```{r, eval=FALSE}
head(bbsAssistant::species_list,3)
```
Keep only _Passer domesticus_:
```{r filter-hosp}
# grab the aou code for House Sparrow using common name
hosp.aou.code <- bbs$species_list$AOU[bbs$species_list$English_Common_Name=="House Sparrow"]
# or genus and species epithet
# hosp.aou.code <-
# bbs$species_list$AOU[bbs$species_list$Genus == "Passer" &
# bbs$species_list$Species == "domesticus"]
hofi <- bbs$species_list$Scientific_Name[bbs$species_list$English_Common_Name=="House Finch"]
# filter the observations along BBS "AOU" code:
## note spelling but not capitalization matters.
## can provide species arg as species' common or latin name(s) or as BBS "AOU" code(s)
hosp.df <- munge_bbs_data(bbs_list=bbs, species = c(hosp.aou.code, hofi))
# species = c("House SPARROW", "passer Domesticus", hosp.aou.code))
```
## BBS Data Availability (including sb_id)
There are currently two primary products released from the USGS that are derived from the annual BBS roadside surveys, the [observations data](https://www.sciencebase.gov/catalog/item/52b1dfa8e4b0d9b325230cd9) and the analysis results. The datasets (observations, results) are permanently and publicly available at [USGS ScienceBase](https://www.sciencebase.gov/).
The most recent annual releases of the observations and results datasets are stored as data objects in this package (see `data(bbs)`) will be downloaded as the default in this package, but the user has the option to specify historical dataset releases should they choose. Please see the function `get_bbs_data()`.
```{r dataset-lookup, eval=TRUE, message=FALSE, warning=FALSE, echo=FALSE}
datasets <- bbsAssistant::sb_items
```
A lookup table containing the available datasets (N = `r length(unique(datasets$sb_item))`) and analysis results will be regularly updated, and comprises the following entries:
```{r datasets, eval=TRUE, message=FALSE, warning=FALSE, echo=FALSE}
library(magrittr)
library(dplyr)
library(kableExtra)
datasets %>% select(-legacy_format, -sb_parent) %>%
relocate(sb_item, .after = last_col()) %>%
kable(caption="List of datasets currently available for download at USGS ScienceBase. Highlighted and bold row indicates the default BBS observations dataset stored internally in the package.") %>%
kable_styling(bootstrap_options = "striped", full_width = TRUE, position = "left") %>%
column_spec(1, width = "100em") %>%
row_spec(1, background = "yellow", bold = TRUE)
```
## Citations
__For the BBS dataset and analysis results__, call `citation("bbsAssistant")` or see library loading message.
__For general use of the R package bbsAssistant__ and/or __companion paper__:
Burnett, J.L., Wszola, L., and Palomo-Muñoz, G. (2019). bbsAssistant: An R package for downloading and handling data and information from the North American Breeding Bird Survey: U.S. Geological Survey software release, https://doi.org/10.5066/P93W0EAW.
_or_
Burnett, J.L., Wszola, L., and Palomo-Muñoz, G. (2019). bbsAssistant: An R package for downloading and handling data and information from the North American Breeding Bird Survey. Journal of Open Source Software, 4(44), 1768, https://doi.org/10.21105/joss.01768
## Contributing
## Code of Conduct
Please note that the bbsAssistant project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. For questions, comments, or issues, feel free to email the maintainer [Jessica Burnett](mailto:jburnett@usgs.gov) or submit an [Issue](https://github.com/TrashBirdEcology/bbsAssistant/issues) (preferred).