trashbirdecology / bbsAssistant

An R package for downloading and handling data and information from the North American Breeding Bird Survey.
Creative Commons Zero v1.0 Universal
27 stars 13 forks source link

Allow downloading data by state using state name #68

Closed ethanwhite closed 4 years ago

ethanwhite commented 4 years ago

This is recommendation based on my experience while reviewing this package for JOSS (https://github.com/openjournals/joss-reviews/issues/1768).

Is your feature request related to a problem? Please describe.

Downloading data for one or more specific states as described in the vignette takes a number of steps:

  1. Load the regions table
  2. Drop null values from it
  3. Run a combination of which and stringr::str_detect to find the base filename
  4. Run get_bbsData

Since this is a core functionality for the package it would be nice to hide this complexity from the user.

Describe the solution you'd like

Move the first three steps inside of get_bbsData and have the get_bbsData argument be region so that a call to get the data for Florida looks like: get_bbsData(region = 'Florida').

trashbirdecology commented 4 years ago

Great suggestion.

trashbirdecology commented 4 years ago

Resolved in function download_bbs.