DOI: 10.25338/b88g96
title: Data for: Long-term surveys support declines in early-season forest plants used by bumble bees

description: Populations of bumble bees and other pollinators have declined over the
 past several decades due to numerous threats, including habitat loss and
 degradation. However, we can rarely investigate the role of resource loss
 due to a lack of detailed long-term records of forage plants and habitats.
 We use 22-year repeated surveys of more than 262 sites located in
 grassland, forest, and wetland habitats across Illinois, USA to explore
 how the abundance and richness of bumble bee food plants have changed over
 the period of decline of the endangered rusty patched bumble bee (Bombus
 affinis). We document a decline in abundance of bumble bee forage plants
 in forest understories, which our phenology analysis suggests provide the
 primary nectar and pollen sources for foundress queens in spring, a
 critical life stage in bumble bee demography. By contrast, the per-unit
 area abundance of food plants in primarily midsummer-flowering grassland
 and wetland habitats has not declined. However, the total area of
 grasslands has declined across the region resulting in a net loss of
 grassland resources. The data for this project is provided alongside the
 scripts needed to reconduct analyses and generate figures.
description: # README This directory contains all of the
 files needed to recreate the analysis and raw figure generation used in
 the manuscript "Long-term declines in early season forest plants
 critical to bumble bees." By running all scripts
 in the order presented below, a user can first wrangle all raw data files
 needed (the "01" series within /data/data_wrangling), then
 conduct analysis and further number crunching ("02" series
 within /analysis), and  generate figures ("03"
 /figures/figure_wrangling). Lastly, two R Markdown files are provided that
 provide all of the necessary statistical output for the main text (and an
 HTML file) and the .docx supplemental file, respectively.  
 For convenience, all outputs generated by scripts are provided in
 this directory so a user may skip directly to any analysis and figure
 generation scripts as they wish. In order to conduct a "clean
 run" of the project, simply remove files from the data/data_output,
 analyses/analyses_output, and figures/figure_partials directories. You
 will then only have the raw data (data/data_raw), the scripts described
 below, and the directory structure. You then need to run all scripts in
 order to yield a "clean" version of the two markdown
 files. <br> Detailed descriptions of scripts are
 provided at the top of each file. 01.
 data/data_wrangling  
 01a_wrangling_plant_lists_binoms_only.R           <br>  
 01b_wrangling_usfws_plant_list.R             <br>  
 01c_wrangling_ctap_sites.R                    <br>  
 01d_wrangling_all_quadrats.R                       <br>  
 01e1_wrangling_landcover_extraction_ctap_sites.R    <br>  
 01e2_wrangling_landcover_extraction_ctap_sites.R    <br>  
 01f_NLCD_landcover_extraction.R<br>  
 01g_wrangling_plant_phenology.R                     <br>  
 01h_wrangling_rpbb_phenology.R                      <br>  
 01i_forest_and_shrub_data.R                        02.
 analyses  
 02a_analysis_cover_richness_change.R                       <br>  
 02b_analysis_cover_richness_by_habitat.R                   <br>  
 02c_analysis_phenology.R                                   <br>  
 02c01_analysis_phenology_all_species.R                     <br>  
 02d01_analysis_landscape_change.R                          <br>  
 02f_supplemental_repeated_analysis_different_plant_lists.R<br>  
 02g_proportion_by_species.R  <br>  <br> 03.
 figures/figure_wrangling  
 03a_figures_CTAP_site_maps.R            <br>  
 03b_figures_cover_richness_change.R     <br>  
 03c_figures_cover_richness_by_habitat.R<br>  
 03d_figures_phenology_v2.R              <br>  
 03f_figures_proportional_plants.R     <br>  <br> 04.
 docs   04a_maintext_results.Rmd<br>  
 supplements/04b_supplement_CTAP.Rmd<br>  <br> Additionally,
 there are a few files in `src` that cover functions used repeatedly or
 contain helpful things like figure color palettes, etc. These files are
 called as needed from the scripts above. Two files,
 necessary to run analysis fully from raw-&gt; complete were required
 to be removed for copyright issues. These files are
 bbna_midwestern_2019_10_31.csv and bbna_beespotter_to_find_caste.csv which
 are loaded within the initial data wrangling steps. The scripts should
 still be functional using the data_output intermediate files, but if these
 raw files are desired, please contact us and we can provide them through
 the proper channels. Within data/data_raw, the
 following files can be found with brief descriptions.  
 affinis_counties.csv: State and County that B. affinis is found in recent
 years<br>  <br>   CTAP_merged: a collection of files related
 to the CTAP program. The fields within these files are defined by the CTAP
 program, which can be found via references in main text.
   CTAP_nectar_plants: all plants within the CTAP database and
 their associated attributes. Species = plant species, PSID = plant species
 identifier, scientific name = scientific name, pollitiogent = what
 pollinators visit it, CHI.FLOWER.first = first date it flowers in the
 Chicago area, CHI.FLOWER.last = last date it flowers in the Chicago area,
 Origin = whether the plant is native to Illinois or note. Other fields not
 used in this study.   nassTranslation.csv: a file of
 conversions between NASS crop categories as values and their categorical
 groupings. category = number, category2 = cover written value, new_cat = a
 higher grouping, new_cat2 = a yet even coarser grouping
   rpbb_historic_counties.csv: a list of all of the historic
 counties where B. affinis occurred. Coordinates are provided, but not used
 in this study.