- Notifications
You must be signed in to change notification settings - Fork2
Tools for Filtering and Processing Data from Project FeederWatch
License
ropensci/PFW
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
PFW is an R package designed for easy filtering, preparation, andmanagement of data fromProject FeederWatch.Project FeederWatch is a community-driven project initiated in the 1980sand run by theCornell Lab ofOrnithology andBirdsCanada that compiles bird observationsfrom thousands of “backyards, nature centers, community areas, and otherlocales” across North America. Project FeederWatch data is easy toaccess, but can often be tricky to work with;PFW serves to simplifyand streamline the use of this data. Included inPFW are tools fortaxonomic rollup, filtering by survey characteristics (species, state,etc.), merging in site metadata, and zerofilling for presence/absencemodeling.
Figure from Bonter & Greig (2021), licensed underCC BY4.0.
PFW can be installed using:
install.packages("PFW")Background and details on usingPFW to filter and process ProjectFeederWatch data are outlined in thevignette.
To citePFW in publications, use:
Maron, M. W. (2025). PFW: Filtering and Processing Data from ProjectFeederWatch.
R package version 0.1.0.https://github.com/ropensci/PFW
You can also run
citation("PFW")in R whenPFW is loaded.
This is a simple example which shows you how to do basic ProjectFeederWatch importing, filtering, zerofilling, and site data attachment.Here, we’ll load the example dataset and filter it for Song Sparrow,Dark-eyed Junco, and Spotted Towhee from Washington and Oregon between2022 and 2024 in November-February. Then, we’ll zerofill that data andattach our site metadata:
library(PFW)# Load in the included example datasetdata<-pfw_example# If you were using your own selection of PFW data,# this would be pfw_import() instead.# pfw_import() creates and defaults to "/data-raw" in a local directory,# but will accept a different filepath.# Create a list of study speciesspecies_list<- c("Song Sparrow","Dark-eyed Junco","Spotted Towhee")# Create a list of study regionsregion_list<- c("Washington","Oregon")# Filter data by species and region, from 2022–2024 during November-Februarydata_filtered<- pfw_filter(data,region=region_list,species=species_list,year=2022:2024,month=11:2,# pfw_date(), which is called within pfw_filter(),# will appropriately wrap this around the end of the year.valid=TRUE,# TRUE by defaultrollup=TRUE# TRUE by default)# Output:# 2 regions successfully filtered.# Date filtering complete.# Species roll-up complete. 36 ambiguous records removed.# 3 species successfully filtered.# Filtering complete. 23538 records remaining.# View the filters that were appliedpfw_attr(data_filtered)# Output:# Filters applied to this dataset:## - Filter type: region# Values: Washington, Oregon## - Filter type: date# year : 2022, 2023, 2024# month : 11, 12, 1, 2## - Filter type: rollup# Values: TRUE## - Filter type: valid# Values: TRUE## - Filter type: species# Values: song sparrow, dark-eyed junco, spotted towhee# Zerofill missing species/survey instance combosdata_zf<- pfw_zerofill(data_filtered)# Attach site description metadata# Replace "path/sitedata.csv" with the actual path to the downloaded filedata_full<- pfw_sitedata(data_zf,path="path/sitedata.csv")# If the file does not exist at that path, pfw_sitedata will# download it there from the Project FeederWatch website.# Alternatively, you can manually download the site description file from:# https://feederwatch.org/explore/raw-dataset-requests/
Have feedback? Please submit any bugs, typos, or improvements as anissue or as apullrequest! Your insights helpimprovePFW.
Please note thatPFW is released with aContributor Code ofConduct. Bycontributing to this project, you agree to abide by its terms.
PFW was built from code originally developed for Project FeederWatchdata preparation in Maron et al. (2025). While the function scripts inthis package were created specifically for PFW, the code they are basedon benefited greatly from examples and code snippets provided by EmmaGreig, who passed away prior to the package’s creation.
About
Tools for Filtering and Processing Data from Project FeederWatch
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.

