├── .Rprofile ├── .gitignore ├── .nojekyll ├── 01_introduction.Rmd ├── 02_ebird-data.Rmd ├── 03_covariates.Rmd ├── 04_encounter.Rmd ├── 05_occupancy.Rmd ├── 06_abundance.Rmd ├── 07_references.Rmd ├── DESCRIPTION ├── LICENSE ├── README.md ├── _bookdown.yml ├── _bookdown_files └── ebird-best-practices_files │ └── figure-html │ ├── abundance-assess-mag-plot-1.png │ ├── abundance-model-cov-plot-1.png │ ├── abundance-model-dist-1.png │ ├── abundance-predict-map-1.png │ ├── abundance-predict-peak-1.png │ ├── ebird-explore-distance-1.png │ ├── ebird-explore-duration-1.png │ ├── ebird-explore-map-1.png │ ├── ebird-explore-observers-1.png │ ├── ebird-explore-time-1.png │ ├── encounter-habitat-pd-1.png │ ├── encounter-habitat-pi-1.png │ ├── encounter-predict-map-1.png │ ├── encounter-predict-time-1.png │ ├── encounter-rf-cal-cal-1.png │ ├── encounter-sss-map-1.png │ ├── encounter-sss-toy-1.png │ ├── landcover-prediction-map-1.png │ └── occupancy-predict-map-1.png ├── _common.R ├── _config.yml ├── _output.yml ├── data ├── data.zip ├── ebd_checklists_june_bcr27.txt ├── ebd_woothr_june_bcr27.txt ├── ebd_woothr_june_bcr27_zf.csv ├── gis-data.gpkg ├── mcd12q1_classes.csv ├── modis │ ├── modis_mcd12q1_umd_2010.tif │ ├── modis_mcd12q1_umd_2011.tif │ ├── modis_mcd12q1_umd_2012.tif │ ├── modis_mcd12q1_umd_2013.tif │ ├── modis_mcd12q1_umd_2014.tif │ ├── modis_mcd12q1_umd_2015.tif │ ├── modis_mcd12q1_umd_2016.tif │ ├── modis_mcd12q1_umd_2017.tif │ └── modis_mcd12q1_umd_2018.tif ├── modis_pland_location-year.csv ├── pland-elev_location-year.csv ├── pland-elev_prediction-surface.csv └── prediction-surface.tif ├── docs ├── abundance.html ├── covariates.html ├── ebird-best-practices_files │ └── figure-html │ │ ├── abundance-assess-mag-plot-1.png │ │ ├── abundance-model-cov-plot-1.png │ │ ├── abundance-model-dist-1.png │ │ ├── abundance-predict-map-1.png │ │ ├── abundance-predict-peak-1.png │ │ ├── ebird-explore-distance-1.png │ │ ├── ebird-explore-duration-1.png │ │ ├── ebird-explore-map-1.png │ │ ├── ebird-explore-observers-1.png │ │ ├── ebird-explore-time-1.png │ │ ├── encounter-habitat-pd-1.png │ │ ├── encounter-habitat-pi-1.png │ │ ├── encounter-predict-map-1.png │ │ ├── encounter-predict-time-1.png │ │ ├── encounter-rf-cal-cal-1.png │ │ ├── encounter-sss-map-1.png │ │ ├── encounter-sss-toy-1.png │ │ ├── landcover-prediction-map-1.png │ │ └── occupancy-predict-map-1.png ├── ebird.html ├── encounter.html ├── images │ ├── 02_ebird-data_checklist.png │ ├── 03_covariates_elevation.png │ └── 09_ebird_split_custom.png ├── index.html ├── intro.html ├── libs │ ├── gitbook-2.6.7 │ │ ├── css │ │ │ ├── fontawesome │ │ │ │ └── fontawesome-webfont.ttf │ │ │ ├── plugin-bookdown.css │ │ │ ├── plugin-clipboard.css │ │ │ ├── plugin-fontsettings.css │ │ │ ├── plugin-highlight.css │ │ │ ├── plugin-search.css │ │ │ ├── plugin-table.css │ │ │ └── style.css │ │ └── js │ │ │ ├── app.min.js │ │ │ ├── clipboard.min.js │ │ │ ├── jquery.highlight.js │ │ │ ├── lunr.js │ │ │ ├── plugin-bookdown.js │ │ │ ├── plugin-clipboard.js │ │ │ ├── plugin-fontsettings.js │ │ │ ├── plugin-search.js │ │ │ └── plugin-sharing.js │ ├── header-attrs-2.2 │ │ └── header-attrs.js │ └── jquery-2.2.3 │ │ └── jquery.min.js ├── occupancy.html ├── references.html ├── search_index.json └── style.css ├── ebird-best-practices.Rproj ├── images ├── 02_ebird-data_checklist.png ├── 03_covariates_elevation.png └── 09_ebird_split_custom.png ├── index.Rmd ├── index.html ├── output ├── abundance-model_abd_woothr.tif ├── abundance-model_se_woothr.tif ├── occupancy-model_prob_woothr.tif ├── occupancy-model_se_woothr.tif ├── rf-model_encounter-rate_woothr.tif ├── woothr_occupancy-model_gof.rds └── woothr_occupancy-model_predictions.rds ├── packages.bib ├── preamble.tex ├── references.bib └── style.css /.Rprofile: -------------------------------------------------------------------------------- 1 | library(bookdown) 2 | if (file.exists("~/.Rprofile")) { 3 | source("~/.Rprofile") 4 | } 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rhistory 2 | .RData 3 | .Rproj.user 4 | .Rbuildignore 5 | data/calculate-cci.R 6 | data/ebd_all_june_bcr27.txt 7 | data/cci_june_bcr27.csv 8 | data/elevation_1KMmd_GMTEDmd.tif -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/.nojekyll -------------------------------------------------------------------------------- /01_introduction.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: html_document 3 | editor_options: 4 | chunk_output_type: console 5 | --- 6 | 7 | # Introduction and Setup {#intro} 8 | 9 | ## Introduction {#intro-intro} 10 | 11 | Citizen science data are increasingly making important contributions to ecological research and conservation. One of the most common forms of citizen science data is derived from members of the public recording species observations. [eBird](https://ebird.org/) [@sullivanEBirdEnterpriseIntegrated2014] is the largest of these biological citizen science programs. The eBird database contains well over one billion bird observations from every country in the world, with observations of nearly every bird species on Earth. The eBird database is valuable to researchers across the globe, due to its year-round, broad spatial coverage, high volumes of [open access](https://en.wikipedia.org/wiki/Open_data) data, and applications to many ecological questions. These data have been widely used in scientific research to study phenology, species distributions, population trends, evolution, behavior, global change, and conservation. However, robust inference with eBird data requires careful processing of the data to address the challenges associated with citizen science datasets. This book, and the [associated paper](https://onlinelibrary.wiley.com/doi/10.1111/ddi.13271), outlines a set of best practices for addressing these challenges and making reliable estimates of species distributions from eBird data. 12 | 13 | There are two key characteristics that distinguish eBird from many other citizen science projects and facilitate robust ecological analyses: the checklist structure enables non-detection to be inferred and the effort information associated with a checklist facilitates robust analyses by accounting for variation in the observation process [@lasorteOpportunitiesChallengesBig2018; @kellingFindingSignalNoise2018]. When a participant submits data to eBird, sightings of multiple species from the same observation period are grouped together into a single **checklist**. **Complete checklists** are those for which the participant reported all birds that they were able to detect and identify. Critically, this enables scientists to infer counts of zero individuals for the species that were not reported. If checklists are not complete, it's not possible to ascertain whether the absence of a species on a list was a non-detection or the result of a participant not recording the species. In addition, citizen science projects occur on a spectrum from those with predefined sampling structures that resemble more traditional survey designs, to those that are unstructured and collect observations opportunistically. eBird is a **semi-structured** project, having flexible, easy to follow protocols that attract many participants, but also collecting data on the observation process (e.g. amount of time spent birding, number of observers, etc.), which can be used in subsequent analyses [@kellingFindingSignalNoise2018]. 14 | 15 | Despite the strengths of eBird data, species observations collected through citizen science projects present a number of challenges that are not found in conventional scientific data. The following are some of the primary challenges associated these data; challenges that will be addressed throughout this book: 16 | 17 | - **Taxonomic bias:** participants often have preferences for certain species, which may lead to preferential recording of some species over others [@greenwoodCitizensScienceBird2007; @tullochBehaviouralEcologyApproach2012]. Restricting analyses to complete checklists largely mitigates this issue. 18 | - **Spatial bias:** most participants in citizen science surveys sample near their homes [@luckAlleviatingSpatialConflict2004], in easily accessible areas such as roadsides [@kadmonEffectRoadsideBias2004], or in areas and habitats of known high biodiversity [@prendergastCorrectingVariationRecording1993]. A simple method to reduce the spatial bias that we describe is to create an equal area grid over the region of interest, and sample a given number of checklists from within each grid cell. 19 | - **Temporal bias:** participants preferentially sample when they are available, such as weekends [@courterWeekendBiasCitizen2013], and at times of year when they expect to observe more birds, notably during spring migration [@sullivanEBirdEnterpriseIntegrated2014]. To address the weekend bias, we recommend using a temporal scale of a week or multiple weeks for most analyses. 20 | - **Spatial precision:** the spatial location of an eBird checklist is given as a single latitude-longitude point; however, this may not be precise for two main reasons. First, for traveling checklists, this location represents just one point on the journey. Second, eBird checklists are often assigned to a **hotspot** (a common location for all birders visiting a popular birding site) rather than their true location. For these reasons, it's not appropriate to align the eBird locations with very precise habitat covariates, and we recommend summarizing covariates within a neighborhood around the checklist location. 21 | - **Class imbalance:** bird species that are rare or hard to detect may have data with high class imbalance, with many more checklists with non-detections than detections. For these species, a distribution model predicting that the species is absent everywhere will have high accuracy, but no ecological value. We'll follow the methods for addressing class imbalance proposed by Robinson et al. [-@robinsonUsingCitizenScience2018]. 22 | - **Variation in detectability:** detectability describes the probability of a species that is present in an area being detected and identified. Detectability varies by season, habitat, and species [@johnstonSpeciesTraitsExplain2014; @johnstonEstimatesObserverExpertise2018]. Furthermore, eBird data are collected with high variation in effort, time of day, number of observers, and external conditions such as weather, all of which can affect the detectability of species [@ellisEffectsWeatherTime2018; @oliveiraObservationDiurnalSoaring2018]. Therefore, detectability is particularly important to consider when comparing between seasons, habitats or species. Since eBird uses a semi-structured protocol, that collects variables associated with variation in detectability, we'll be able to account for a larger proportion of this variation in our analyses. 23 | 24 | The remainder of this book will demonstrate how to address these challenges using real data from eBird to produce reliable estimates of species distributions. In general, we'll take a two-pronged approach to dealing with unstructured data and maximizing the value of citizen science data: imposing more structure onto the data via data filtering and including covariates in models to account for the remaining variation. 25 | 26 | The next two chapters show how to access and prepare [eBird data](#ebird) and [land cover covariates](#covariates), respectively. The remaining three chapters provide examples of different species distribution models that can be fit using these data: [encounter rate models](#encounter), [occupancy models](#occupancy), and [abundance models](#abundance). Although these examples focus on the use of eBird data, in many cases they also apply to similar citizen science datasets. 27 | 28 | ## Prerequisites {#intro-pre} 29 | 30 | To understand the code examples used throughout this book, some knowledge of the programming language [R](https://www.r-project.org/) is required. If you don't meet this requirement, or begin to feel lost trying to understand the code used in this book, we suggest consulting one of the excellent free resources available online for learning R. For those with little or no prior programming experience, [Hands-On Programming with R](https://rstudio-education.github.io/hopr/) is an excellent introduction. For those with some familiarity with the basics of R that want to take their skills to the next level, we suggest [R for Data Science](https://r4ds.hadley.nz/) as the best resource for learning how to work with data within R. 31 | 32 | ## Setup {#intro-setup} 33 | 34 | ### Software {#intro-setup-software} 35 | 36 | The examples throughout this website use the programming language **R** [@R-base] to work with eBird data. If you don't have R installed, [download it now](https://cloud.r-project.org/), if you already have R, chances are you're using an outdated version, so [update it to the latest version now](https://cloud.r-project.org/). R is updated regularly, and **it is important that you have the most recent version of R** to avoid headaches when installing packages. We suggest checking every couple months to see if a new version has been released. 37 | 38 | We strongly encourage R users to use **RStudio**. RStudio is not required to follow along with this book; however, it will make your R experience significantly better. If you don't have RStudio, [download it now](https://www.rstudio.com/products/rstudio/download/#download), if you already have it, [update it](https://www.rstudio.com/products/rstudio/download/#download) because new versions with useful additional features are regularly released. Pro tip: immediately go into RStudio preferences (Tools > Global Options) and on the General pane uncheck "Restore .RData into workspace at startup" and set "Save workspace to .RData on exit" to "Never". This will avoid cluttering your R session with old data and save you headaches down the road. 39 | 40 | ### R packages {#intro-setup-packages} 41 | 42 | The examples in this book use a variety of R packages for accessing eBird data, working with spatial data, data processing and manipulation, and model fitting. To install all the packages necessary to work through this book, run the following code: 43 | 44 | ```{r packages, eval = FALSE} 45 | if (!requireNamespace("pak", quietly = TRUE)) { 46 | install.packages("pak") 47 | } 48 | pak::pak() 49 | ``` 50 | 51 | Note that several of the spatial packages require dependencies. If installing these packages fails, consult the [instructions for installing dependencies on the `sf` package website](https://r-spatial.github.io/sf/#installing). Finally, **ensure all R packages are updated** to their most recent version by clicking on the Update button on the Packages tab in RStudio. 52 | 53 | ### Tidyverse {#intro-setup-tidyverse} 54 | 55 | Throughout this book, we use packages from the [Tidyverse](https://www.tidyverse.org/), an opinionated collection of R packages designed for data science. Packages such as [`ggplot2`](http://ggplot2.tidyverse.org/), for data visualization, and [`dplyr`](http://dplyr.tidyverse.org/), for data manipulation, are two of the most well known Tidyverse packages; however, there are many more. In the following chapters, we often use Tidyverse functions without explanation. If you encounter a function you're unfamiliar with, consult the documentation for help (e.g. `?mutate` to see help for the `dplyr` function `mutate()`). More generally, the free online book [R for Data Science](http://r4ds.had.co.nz/) by [Hadley Wickham](http://hadley.nz/) is the best introduction to working with data in R using the Tidyverse. 56 | 57 | The one piece of the Tidyverse that we will cover here, because it is ubiquitous throughout this book and unfamiliar to many, is the pipe operator `%>%`. The pipe operator takes the expression to the left of it and "pipes" it into the first argument of the expression on the right, i.e. one can replace `f(x)` with `x %>% f()`. The pipe makes code significantly more readable by avoiding nested function calls, reducing the need for intermediate variables, and making sequential operations read left-to-right. For example, to add a new variable to a data frame, then summarize using a grouping variable, the following are equivalent: 58 | 59 | ```{r pipes} 60 | library(dplyr) 61 | 62 | # pipes 63 | mtcars %>% 64 | mutate(wt_kg = 454 * wt) %>% 65 | group_by(cyl) %>% 66 | summarize(wt_kg = mean(wt_kg)) 67 | 68 | # intermediate variables 69 | mtcars_kg <- mutate(mtcars, wt_kg = 454 * wt) 70 | mtcars_grouped <- group_by(mtcars_kg, cyl) 71 | summarize(mtcars_grouped, wt_kg = mean(wt_kg)) 72 | 73 | # nested function calls 74 | summarize( 75 | group_by( 76 | mutate(mtcars, wt_kg = 454 * wt), 77 | cyl 78 | ), 79 | wt_kg = mean(wt_kg) 80 | ) 81 | ``` 82 | 83 | Once you become familiar with the pipe operator, we believe you'll find the the above example using the pipe the easiest of the three to read and interpret. 84 | 85 | ### Getting eBird data access {#intro-setup-ebird} 86 | 87 | The complete eBird database is provided via the [eBird Basic Dataset (EBD)](https://ebird.org/science/download-ebird-data-products), a large text file. To access the EBD, begin by [creating an eBird account and signing in](https://secure.birds.cornell.edu/cassso/account/create). Then visit the [eBird Data Access page](https://ebird.org/data/download) and fill out the data access request form. eBird data access is free; however, you will need to request access in order to download the EBD. Filling out the access request form allows eBird to keep track of the number of people using the data and obtain information on the applications for which the data are used. 88 | 89 | Once you have access to the data, proceed to the [download page](https://ebird.org/data/download/ebd). Download both the World EBD (~ 42 GB compressed, ~ 210 GB uncompressed) and corresponding Sampling Event Data (~ 3.5 GB compressed, ~ 11 GB uncompressed). The former provides observation-level data, while the latter provides checklist-level data; both files are required for species distribution modeling. If limited hard drive space or a slow internet connection make dealing with these large files challenging, consult Section \@ref(ebird-size-custom) for details on a method for downloading a subset of EBD. 90 | 91 | The downloaded data files will be in `.tar` format, and should be unarchived. The resulting directories will contain files with extension `.txt.gz`, these files should be uncompressed (on Windows use [7-Zip](https://www.7-zip.org/), on Mac use the default system uncompression utility) to produce two text files (e.g., `ebd_relAug-2019.txt` and `ebd_sampling_relAug-2019.txt`). Move these two large, uncompressed .txt files to a sensible, central location on your computer. In general, we suggest creating an `ebird/` folder nested in a `data/` folder within your home directory (i.e. `~/data/ebird/`) to store these files, and throughout the remainder of this chapter we'll assume you've placed the data there. If you choose to store the EBD elsewhere, you will need to update references to this folder in the code. If the files are too large to fit on your computer's hard drive, they can be stored on an external hard drive. 92 | 93 | Each time you want to access eBird data in an R project, you'll need to reference the full path to these text files, for example `~/data/ebird/ebd_relAug-2019.txt`. In general, it's best to avoid using absolute paths in R scripts because it makes them less portable–if you're sharing the files with someone else, they'll need to change the file paths to point to the location at which they've stored the eBird data. The R package `auk` provides a workaround for this, by allowing users to set an environment variable (`EBD_PATH`) that points to the directory where you've stored the eBird data. To set this variable, use the function [`auk_set_ebd_path()`](https://cornelllabofornithology.github.io/auk/reference/auk_set_ebd_path.html). For example, if the EBD and Sampling Event Data files are in `~/data/ebird/`, use: 94 | 95 | ```{r set-ebd-path, eval = FALSE} 96 | # set ebd path 97 | auk::auk_set_ebd_path("~/data/ebird/") 98 | ``` 99 | 100 | After **restarting your R session**, you should be able to refer directly to the EBD or Sampling Event Data files within `auk` functions (e.g., `auk_ebd("ebd_relAug-2019.txt")`). Provided your collaborators have also set `EDB_PATH`, your scripts should now be portable. 101 | 102 | You now have access to the full eBird dataset! Note, however, that **the EBD is updated monthly**. If you want the most recent eBird records, be sure to **regularly download an updated version**. Finally, **whenever you update the EBD, always update the `auk` package as well**, this will ensure that `auk` will be able to handle any changes to the EBD that may have occurred. 103 | 104 | ### GIS data {#intro-setup-gis} 105 | 106 | Throughout this book, we'll be producing maps of species distributions. To provide context for these distributions, we'll need GIS data for political boundaries. [Natural Earth](https://www.naturalearthdata.com/) is the best source for a range of tightly integrated vector and raster GIS data for producing professional cartographic maps. The R package, [`rnaturalearth`](https://github.com/ropensci/rnaturalearth) provides a convenient method for accessing these data from within R. We'll also need [Bird Conservation Region (BCR)](http://nabci-us.org/resources/bird-conservation-regions/) boundaries, which are available through [Bird Studies Canada](https://www.birdscanada.org/research/gislab/index.jsp?targetpg=bcr&targetpg=bcr). 107 | 108 | These GIS data layers are most easily accessed by [**downloading the data package**](https://github.com/cornelllabofornithology/ebird-best-practices/raw/master/data/data.zip) for this book. 109 | These data were generated using the following code. If you intend to run this code yourself, first create an RStudio project, so the files will be stored within the `data/` subdirectory of the project. This will allow us to load these data in later chapters as they're needed. Note that calls to `ne_download()` often produce warnings suggesting that you've used the incorrect "category"; these can safely be ignored. 110 | 111 | ```{r intro-setup-gis, eval = FALSE} 112 | library(sf) 113 | library(rnaturalearth) 114 | library(dplyr) 115 | 116 | # file to save spatial data 117 | gpkg_dir <- "data" 118 | if (!dir.exists(gpkg_dir)) { 119 | dir.create(gpkg_dir) 120 | } 121 | f_ne <- file.path(gpkg_dir, "gis-data.gpkg") 122 | 123 | # download bcrs 124 | tmp_dir <- normalizePath(tempdir()) 125 | tmp_bcr <- file.path(tmp_dir, "bcr.zip") 126 | paste0("https://www.birdscanada.org/research/gislab/download/", 127 | "bcr_terrestrial_shape.zip") %>% 128 | download.file(destfile = tmp_bcr) 129 | unzip(tmp_bcr, exdir = tmp_dir) 130 | bcr <- file.path(tmp_dir, "BCR_Terrestrial_master_International.shp") %>% 131 | read_sf() %>% 132 | select(bcr_code = BCR, bcr_name = LABEL) %>% 133 | filter(bcr_code == 27) 134 | # clean up 135 | list.files(tmp_dir, "bcr", ignore.case = TRUE, full.names = TRUE) %>% 136 | unlink() 137 | 138 | # political boundaries 139 | # land border with lakes removed 140 | ne_land <- ne_download(scale = 50, category = "cultural", 141 | type = "admin_0_countries_lakes", 142 | returnclass = "sf") %>% 143 | filter(CONTINENT == "North America") %>% 144 | st_set_precision(1e6) %>% 145 | st_union() 146 | # country lines 147 | # downloaded globally then filtered to north america with st_intersect() 148 | ne_country_lines <- ne_download(scale = 50, category = "cultural", 149 | type = "admin_0_boundary_lines_land", 150 | returnclass = "sf") %>% 151 | st_geometry() 152 | ne_country_lines <- st_intersects(ne_country_lines, ne_land, sparse = FALSE) %>% 153 | as.logical() %>% 154 | {ne_country_lines[.]} 155 | # states, north america 156 | ne_state_lines <- ne_download(scale = 50, category = "cultural", 157 | type = "admin_1_states_provinces_lines", 158 | returnclass = "sf") %>% 159 | filter(adm0_a3 %in% c("USA", "CAN")) %>% 160 | mutate(iso_a2 = recode(adm0_a3, USA = "US", CAN = "CAN")) %>% 161 | select(country = adm0_name, country_code = iso_a2) 162 | 163 | # output 164 | unlink(f_ne) 165 | write_sf(ne_land, f_ne, "ne_land") 166 | write_sf(ne_country_lines, f_ne, "ne_country_lines") 167 | write_sf(ne_state_lines, f_ne, "ne_state_lines") 168 | write_sf(bcr, f_ne, "bcr") 169 | ``` 170 | -------------------------------------------------------------------------------- /03_covariates.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: html_document 3 | editor_options: 4 | chunk_output_type: console 5 | --- 6 | 7 | # Habitat Covariates {#covariates} 8 | 9 | ## Introduction {#covariates-intro} 10 | 11 | Species distribution models work by finding associations between species occurrence or abundance and environmental variables. Using these relationships, it's possible to predict the distribution in areas that aren't sampled, provided we know the value of the environmental variables in these areas. Therefore, to proceed with the modeling in the next several chapters, we'll need to prepare a suite of environmental variables to be used as covariates in our models. The particular set of covariates that's most suitable for a given study will depend on the focal species, region, and time period, as well as the availability of data. When species distributions are well defined by the environmental covariates, extrapolations to unsurveyed areas will be more accurate. So, it's worth considering which environmental covariates are important for your species. Scientists can use many variables to characterise a species distribution - for example, climate, weather, and soil type. Here we use only landcover and elevation as example environmental covariates. 12 | 13 | Fortunately, there are an abundance of freely available, satellite-based land cover products derived from satellites such as [Landsat](https://en.wikipedia.org/wiki/Landsat_program), [SPOT](https://en.wikipedia.org/wiki/SPOT_(satellite)), and [MODIS](https://en.wikipedia.org/wiki/Moderate_Resolution_Imaging_Spectroradiometer) that are suitable for distribution modeling. This land cover data will act as a proxy for habitat and throughout this book we'll often use habitat and land cover interchangeably. In addition, we'll include elevation as an additional covariate, which can be important for many species. 14 | 15 | For the examples in this book, we'll use land cover covariates derived from the [MODIS MCD12Q1 v006](https://lpdaac.usgs.gov/products/mcd12q1v006/) land cover product [@friedlMCD12Q1MODISTerra2015]. This product has global coverage at 500 m spatial resolution and annual temporal resolution from 2001-2018. These data are available for several different classification schemes. We'll use the University of Maryland (UMD) land cover classification, which provides a globally accurate classification of land cover in our experience. This system classifies pixels into one of 16 different land cover classes: 16 | 17 | ```{r landcover, echo = FALSE} 18 | lc_classes <- readr::read_csv("data/mcd12q1_classes.csv") 19 | names(lc_classes) <- stringr::str_to_title(names(lc_classes)) 20 | knitr::kable(lc_classes) 21 | ``` 22 | 23 | For a wide range of studies, this MODIS land cover dataset will be suitable for generating habitat covariates; however, there may be particular cases where the study species, habitat, or ecological question requires different, or more specialized, data. For example, shorebird distribution modeling would benefit from data on the [extent of tidal flats](https://www.intertidal.app), seabirds distributions are often influenced by [ocean depth](https://eatlas.org.au/data/uuid/80301676-97fb-4bdf-b06c-e961e5c0cb0b), and in many regions [elevation](https://github.com/jhollist/elevatr) plays a critical role in shaping species distributions. Regardless of which habitat data you decide to use for your project, this chapter should provide a template for how to prepare these data as covariates for modeling species distributions. 24 | 25 | The following section will cover how to access and download MODIS land cover data. Next, we'll demonstrate how to summarize these data within a neighborhood around each checklist location. Then, we'll calculate a set of covariates over a regular grid, which we'll use to make predictions of species distributions throughout our study area. Finally, as an example of including covariate data from multiple sources, we'll demonstrate how to incorporate elevation data as an additional covariate. If you want to skip this section and jump straight to the modeling, you can download the [data package](https://raw.githubusercontent.com/cornelllabofornithology/ebird-best-practices/master/data.zip), which includes all the prepared MODIS data that we'll use in the remainder of this book. 26 | 27 | ## Downloading MODIS data {#covariates-dl} 28 | 29 | As with most satellite data, MODIS data are provided as [1200 km by 1200 km tiles](https://modis-land.gsfc.nasa.gov/MODLAND_grid.html) for ease of download. Each tile is a [raster GIS dataset](http://desktop.arcgis.com/en/arcmap/10.3/manage-data/raster-and-images/what-is-raster-data.htm) consisting of a regular grid of 500 m resolution cells. The surface of the Earth is divided up into a grid of these tiles, each given an ID, for example, h10v12 is the tile from the 10th column and 12th row of the grid. Compiling MODIS data for a given region requires figuring out which set of tiles covers the region, downloading those tiles, combining the tiles together into a single raster dataset, and converting from the native MODIS HDF format, which R can't read, to a standard GeoTIFF format. This needs to be done for each year for which we want habitat data, and can be a time consuming and error prone process. Fortunately, the [R package `MODIS`](https://github.com/MatMatt/MODIS) automates most of these steps. Unfortunately, this package can be challenging and confusing to get working. With this in mind, this section will provide detailed instruction for setting up and using the `MODIS` package. 30 | 31 | Let's start by figuring out the tile IDs for the tiles that BCR 27 spans. Recall that we prepared a BCR boundary in Section \@ref(intro-setup-gis) of the Introduction; if you haven't already done so, [download the data package](https://github.com/cornelllabofornithology/ebird-best-practices/raw/master/data/data.zip) now to get that boundary. Given a set of spatial features, the `MODIS` package can quickly tell us which MODIS tiles we need. 32 | 33 | ```{r landcover-dl-data} 34 | library(sf) 35 | library(raster) 36 | library(MODIS) 37 | library(exactextractr) 38 | library(viridis) 39 | library(tidyverse) 40 | # resolve namespace conflicts 41 | select <- dplyr::select 42 | map <- purrr::map 43 | projection <- raster::projection 44 | 45 | # bcr 27 boundary 46 | bcr <- read_sf("data/gis-data.gpkg", "bcr") %>% 47 | filter(bcr_code == 27) %>% 48 | # project to the native modis projection 49 | st_transform(crs = paste("+proj=sinu +lon_0=0 +x_0=0 +y_0=0", 50 | "+a=6371007.181 +b=6371007.181 +units=m +no_defs")) 51 | # load ebird data 52 | ebird <- read_csv("data/ebd_woothr_june_bcr27_zf.csv") 53 | # get list of tiles required to cover this bcr 54 | tiles <- bcr %>% 55 | st_transform(crs = 4326) %>% 56 | st_bbox() %>% 57 | as.list() %>% 58 | getTile() 59 | tiles[["tile"]] 60 | ``` 61 | 62 | So, we'll need to download these three tiles for each of the 10 years from 2010-2019. 63 | 64 | ### `MODIS` setup {#covariates-dl-setup} 65 | 66 | Before we start using `MODIS` for the first time, a bit of setup is required. First, [sign up for a NASA Earthdata account](https://urs.earthdata.nasa.gov/users/new) to get access to MODIS, and other NASA data. Then use `MODIS::EarthdataLogin(usr = "username", pwd = "password")`, with the username and password you just created, to store your login credentials so the `MODIS` package can access them. 67 | 68 | Next, you'll need to install [GDAL](https://www.gdal.org/), an open source library for working with geospatial data that's needed for processing the MODIS tiles. The steps for installing GDAL are system dependent: 69 | 70 | - **Mac OS X:** First, check if GDAL is installed with HDF4 support by running `gdal-config --formats` in Terminal. If you see `hdf4` in the list, you don't need to do anything else! If not, [install the Homebrew](https://brew.sh/) package manager by following the [instructions on the website](https://brew.sh/). Then, run the following commands in Terminal to install GDAL: 71 | 72 | ``` 73 | brew tap osgeo/osgeo4mac 74 | brew install hdf4 75 | brew link --overwrite hdf4 76 | brew install osgeo-gdal 77 | brew link --force osgeo-gdal 78 | ``` 79 | 80 | - **Windows:** install GDAL using [OSGeo4W](http://trac.osgeo.org/osgeo4w/), a suite of open source geospatial tools. In R, run `MODIS:::checkTools("GDAL")`, which will search your system for GDAL and suggest a command such as `MODIS::MODISoptions(gdalPath = "c:/OSGeo4W64/bin")` that will make GDAL available to the `MODIS` package. Run this command and, when it asks, agree to making the settings permanent. 81 | - **Linux:** run `sudo apt-get install gdal-bin` in the terminal. 82 | 83 | Finally, run `MODIS:::checkTools("GDAL")` to check that GDAL is installed and that the `MODIS` package can find it. If GDAL can't be found, you'll need to manually locate it and use `MODIS::MODISoptions(gdalPath = "path/to/gdal/")` to tell the `MODIS` package where it is. 84 | 85 | ### Download using R {#covariates-dl-r} 86 | 87 | Once all the setup steps have been completed, we can start downloading some data! The `MODIS` function `runGdal()` downloads and processes MODIS tiles into a single GeoTIFF for each year. Note that at the time of writing, land cover data from 2019 haven't been prepared yet, so we'll use 2018 data for both 2018 and 2019. The key arguments to `runGdal()` are: 88 | 89 | - `product`: is the specific MODIS product to download. For a full list of available datasets use `MODIS::getProduct()`. 90 | - `collection`: each MODIS product may have multiple collections, corresponding roughly to versions. Use `getCollection()` to find the available collection for a given product. 91 | - `SDSstring`: a string specifying which bands to extract, with zeros for bands to drop and 1 for bands to keep. Most MODIS products have multiple bands stored in a single raster file, for example, reflectances in different wavelength ranges or, in our case, land cover using different land cover classification systems. The [documentation for the MCD12Q1 dataset](https://lpdaac.usgs.gov/products/mcd12q1v006/) shows that there are 13 bands in the downloaded files, and we're interested in band 2, which contains the UMD landcover classification. 92 | - `extent`: any of several different spatial objects specifying the region that we want data for. In our case, we'll use the BCR polygon; however, for a list of available options consult the help for `getTile()`. Note that `runGdal()` will return raster data in the same projection as the input extent, which is why we projected the BCR boundary to the MODIS sinusoidal projection. 93 | - `begin` and `end`: the start and end dates of the time period from which to extract data. Although the land cover data are only available annually, we need to specify full dates because some other products are available on a more granular basis. 94 | - `outDirPath`: directory to store processed MODIS data. 95 | - `job`: a name for this task, which will become the sub-directory of `outDirPath` within which the processed data are stored. 96 | 97 | ```{r landcover-dl-r, eval = FALSE} 98 | # earliest year of ebird data 99 | begin_year <- format(min(ebird$observation_date), "%Y.01.01") 100 | # end date for ebird data 101 | end_year <- format(max(ebird$observation_date), "%Y.12.31") 102 | # download tiles and combine into a single raster for each year 103 | tifs <- runGdal(product = "MCD12Q1", collection = "006", SDSstring = "01", 104 | extent = bcr %>% st_buffer(dist = 10000), 105 | begin = begin_year, end = end_year, 106 | outDirPath = "data", job = "modis", 107 | MODISserverOrder = "LPDAAC") %>% 108 | pluck("MCD12Q1.006") %>% 109 | unlist() 110 | 111 | # rename tifs to have more descriptive names 112 | new_names <- format(as.Date(names(tifs)), "%Y") %>% 113 | sprintf("modis_mcd12q1_umd_%s.tif", .) %>% 114 | file.path(dirname(tifs), .) 115 | file.rename(tifs, new_names) 116 | ``` 117 | 118 | If everything ran smoothly, we now have annual GeoTIFFs of MODIS land cover data that we can load into R. You may see error messages stating `Cannot find proj.db`, or something similar, these can be safely ignored provided the modis have been created in `data/modis/` directory. 119 | 120 | ```{r landcover-dl-load} 121 | # load the landcover data 122 | landcover <- list.files("data/modis", "^modis_mcd12q1_umd", 123 | full.names = TRUE) %>% 124 | stack() 125 | # label layers with year 126 | landcover <- names(landcover) %>% 127 | str_extract("(?<=modis_mcd12q1_umd_)[0-9]{4}") %>% 128 | paste0("y", .) %>% 129 | setNames(landcover, .) 130 | landcover 131 | ``` 132 | 133 | These data have not been prepared yet for the last couple years, so we'll need to fill in the missing years using the most recent year for which there is data. To facilitate that, let's figure out which is the most recent year with data. 134 | 135 | ```{r landcover-dl-load-max} 136 | max_lc_year <- names(landcover) %>% 137 | str_extract("[0-9]{4}") %>% 138 | as.integer() %>% 139 | max() 140 | ``` 141 | 142 | So, we have landcover data up to `r max_lc_year`. 143 | 144 | ### Troubleshooting {#covariates-dl-trouble} 145 | 146 | If the call to `runGDAL()` didn't work for you, don't worry, you're not alone! It's challenging to get the `MODIS` package working and errors are common when you're first trying to get it set up. The most common error is not having GDAL installed correctly, which will give an error like `GDAL not installed or configured`. Either you don't have GDAL at all or you have it, but it doesn't have support for HDF4 files (this is the native format for MODIS data). Try following the [above instructions](habit-dl-setup) again. If it still doesn't work, consult the instructions on the `MODIStsp` website for [installing GDAL](http://ropensci.github.io/MODIStsp/articles/installation.html#installing-gdal-1-11-1). 147 | 148 | Another error you may see is: `Make sure either 'wget' or 'curl' is available in order to download data from LP DAAC or NSIDC.`. This should only arise on versions of Windows before Windows 10. If you see this error, you'll need to install `curl`, which is used by R to download the MODIS tiles. There is a StackOverflow question with [excellent instructions](https://stackoverflow.com/questions/9507353/how-do-i-install-and-use-curl-on-windows) for installing `curl` and getting it setup on your system. 149 | 150 | If these tips haven't solved your particular problem, you'll need to turn to Google to troubleshoot or find someone who has experience with these tools and ask them to help. Good luck! 151 | 152 | ## Landscape metrics {#covariates-lsm} 153 | 154 | At this point we could use the MODIS land cover data directly, simply extracting the land cover class for each checklist location. However, we instead advocate summarizing the land cover data within a neighborhood around the checklist locations. As discussed in Section \@ref(intro-intro), checklist locations are not precise, so it's more appropriate to use the habitat in the surrounding area, rather than only at the checklist location. More fundamentally, organisms interact with their environment not at a single point, but at the scale of a landscape, so it's important to include habitat information characterizing a suitably-sized landscape around the observation location. 155 | 156 | There are a variety of **landscape metrics** that can be used to characterize the composition (what habitat is available) and configuration (how that habitat is arranged spatially) of landscapes. The simplest metric of landscape composition is the proportion of the landscape in each land cover class (PLAND in the parlance of [FRAGSTATS](https://www.umass.edu/landeco/research/fragstats/fragstats.html)). For a broad range of scenarios, PLAND is a reliable choice for calculating habitat covariates in distribution modeling. Based on our experience working with eBird data, an approximately 2.5 km by 2.5 km neighborhood (5 by 5 MODIS cells) centered on the checklist location is sufficient to account for the spatial precision in the data when the maximum distance of travelling counts has been limited to 5 km, while being a relevant ecological scale for many bird species. 157 | 158 | We'll start by finding the full set of unique checklists locations for each year in the eBird data. Then we convert these locations to spatial `sf` features and project them to the sinusoidal equal area projection used by MODIS. We'll buffer these points to create a neighborhood around each location with a diameter equal to 5 MODIS cells. Finally, we split the neighborhoods up by year so we can match to MODIS land cover data from the corresponding year. 159 | 160 | ```{r landcover-lsm-buffer} 161 | neighborhood_radius <- 5 * ceiling(max(res(landcover))) / 2 162 | ebird_buff <- ebird %>% 163 | distinct(year = format(observation_date, "%Y"), 164 | locality_id, latitude, longitude) %>% 165 | # for 2019 use 2018 landcover data 166 | mutate(year_lc = if_else(as.integer(year) > max_lc_year, 167 | as.character(max_lc_year), year), 168 | year_lc = paste0("y", year_lc)) %>% 169 | # convert to spatial features 170 | st_as_sf(coords = c("longitude", "latitude"), crs = 4326) %>% 171 | # transform to modis projection 172 | st_transform(crs = projection(landcover)) %>% 173 | # buffer to create neighborhood around each point 174 | st_buffer(dist = neighborhood_radius) %>% 175 | # nest by year 176 | nest(data = c(year, locality_id, geometry)) 177 | ``` 178 | 179 | Now, we'll loop over the years and for each square neighborhood extract all the raster values within that neighborhood and count the number of cells of each landcover class. We use the `exactextractr` package for this, since it's often orders of magnitude faster than using `raster::extract()`. 180 | 181 | ```{r landcover-lsm-extract} 182 | lc_extract <- NULL 183 | for (yr in names(landcover)) { 184 | # get the buffered checklists for a given year 185 | regions <- ebird_buff$data[[which(yr == ebird_buff$year_lc)]] 186 | # get landcover values within each buffered checklist area 187 | ee <- exact_extract(landcover[[yr]], regions, progress = FALSE) 188 | # count the number of each landcover class for each checklist buffer 189 | ee_count <- map(ee, ~ count(., landcover = value)) 190 | # attach the year and locality id back to the checklists 191 | ee_summ <- tibble(st_drop_geometry(regions), data = ee_count) %>% 192 | unnest(data) 193 | # bind to results 194 | lc_extract <- bind_rows(lc_extract, ee_summ) 195 | } 196 | ``` 197 | 198 | Now we have the set of land cover values within a neighborhood around each checklist location. We can summarize these data within each neighborhood to calculate PLAND: the proportion of the neighborhood within each land cover class. 199 | 200 | ```{r landcover-lsm-pland} 201 | pland <- lc_extract %>% 202 | # calculate proporiton 203 | group_by(locality_id, year) %>% 204 | mutate(pland = n / sum(n)) %>% 205 | ungroup() %>% 206 | select(-n) %>% 207 | # remove NAs after tallying so pland is relative to total number of cells 208 | filter(!is.na(landcover)) 209 | ``` 210 | 211 | Finally, we'll convert the numeric landcover codes to more descriptive names and transform the data to a wide format with each row a location and the PLAND values in columns. 212 | 213 | ```{r landcover-lsm-trans} 214 | # convert names to be more descriptive 215 | lc_names <- tibble(landcover = 0:15, 216 | lc_name = c("pland_00_water", 217 | "pland_01_evergreen_needleleaf", 218 | "pland_02_evergreen_broadleaf", 219 | "pland_03_deciduous_needleleaf", 220 | "pland_04_deciduous_broadleaf", 221 | "pland_05_mixed_forest", 222 | "pland_06_closed_shrubland", 223 | "pland_07_open_shrubland", 224 | "pland_08_woody_savanna", 225 | "pland_09_savanna", 226 | "pland_10_grassland", 227 | "pland_11_wetland", 228 | "pland_12_cropland", 229 | "pland_13_urban", 230 | "pland_14_mosiac", 231 | "pland_15_barren")) 232 | pland <- pland %>% 233 | inner_join(lc_names, by = "landcover") %>% 234 | arrange(landcover) %>% 235 | select(-landcover) 236 | 237 | # tranform to wide format, filling in implicit missing values with 0s%>% 238 | pland <- pland %>% 239 | pivot_wider(names_from = lc_name, 240 | values_from = pland, 241 | values_fill = list(pland = 0)) 242 | 243 | # save 244 | write_csv(pland, "data/modis_pland_location-year.csv") 245 | ``` 246 | 247 | ## Prediction surface {#covariates-prediction} 248 | 249 | After fitting species distribution models, the goal is typically to make predictions throughout the study area. To do this, we'll need a regular grid of habitat covariates over which to make predictions. In this section, we'll create such a prediction surface for BCR 27 using the MODIS land cover data from the most recent year for which they're available. To start, we'll need a template raster with cells equal in size to the neighborhoods we defined in the previous section: 5 by 5 MODIS land cover cells. We can use `raster::aggregate()` to achieve this. We'll also use `raster::rasterize()` to assign the value 1 to all cells within BCR 27 and leave all cells outside BCR 27 empty. 250 | 251 | ```{r landcover-prediction-template} 252 | agg_factor <- round(2 * neighborhood_radius / res(landcover)) 253 | r <- raster(landcover) %>% 254 | aggregate(agg_factor) 255 | r <- bcr %>% 256 | st_transform(crs = projection(r)) %>% 257 | rasterize(r, field = 1) %>% 258 | # remove any empty cells at edges 259 | trim() 260 | r <- writeRaster(r, filename = "data/prediction-surface.tif", overwrite = TRUE) 261 | ``` 262 | 263 | Next, for each cell of this raster, we'll calculate the PLAND metrics using the same approach as the previous section. Note that we will only be creating this prediction surface for the most current year of landcover data in our example. 264 | 265 | ```{r landcover-prediction-calc} 266 | # get cell centers and create neighborhoods 267 | r_centers <- rasterToPoints(r, spatial = TRUE) %>% 268 | st_as_sf() %>% 269 | transmute(id = row_number()) 270 | r_cells <- st_buffer(r_centers, dist = neighborhood_radius) 271 | 272 | # extract landcover values within neighborhoods, only needed most recent year 273 | lc_extract_pred <- landcover %>% 274 | exact_extract(r_cells, progress = FALSE) %>% 275 | map(~ count(., landcover = value)) %>% 276 | tibble(id = r_cells$id, data = .) %>% 277 | unnest(data) 278 | 279 | # calculate the percent for each landcover class 280 | pland_pred <- lc_extract_pred %>% 281 | group_by(id) %>% 282 | mutate(pland = n / sum(n)) %>% 283 | ungroup() %>% 284 | select(-n) %>% 285 | # remove NAs after tallying so pland is relative to total number of cells 286 | filter(!is.na(landcover)) 287 | 288 | # convert names to be more descriptive 289 | pland_pred <- pland_pred %>% 290 | inner_join(lc_names, by = "landcover") %>% 291 | arrange(landcover) %>% 292 | select(-landcover) 293 | 294 | # tranform to wide format, filling in implicit missing values with 0s 295 | pland_pred <- pland_pred %>% 296 | pivot_wider(names_from = lc_name, 297 | values_from = pland, 298 | values_fill = list(pland = 0)) %>% 299 | mutate(year = max_lc_year) %>% 300 | select(id, year, everything()) 301 | 302 | # join in coordinates 303 | pland_coords <- st_transform(r_centers, crs = 4326) %>% 304 | st_coordinates() %>% 305 | as.data.frame() %>% 306 | cbind(id = r_centers$id, .) %>% 307 | rename(longitude = X, latitude = Y) %>% 308 | inner_join(pland_pred, by = "id") 309 | ``` 310 | 311 | Keeping these data in a data frame is a compact way to store them and will be required once we make model predictions in later chapters. However, we can always use the raster template to convert these PLAND metrics into a spatial format, for example, if we want to map them. Let's look at how this works for land cover class 4: deciduous broadleaf forest. 312 | 313 | ```{r landcover-prediction-map} 314 | map_proj <- st_crs("+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96") 315 | forest_cover <- pland_coords %>% 316 | # convert to spatial features 317 | st_as_sf(coords = c("longitude", "latitude"), crs = 4326) %>% 318 | st_transform(crs = projection(r)) %>% 319 | # rasterize points 320 | rasterize(r, field = "pland_04_deciduous_broadleaf") %>% 321 | # project to albers equal-area for mapping 322 | projectRaster(crs = map_proj$proj4string, method = "ngb") %>% 323 | # trim off empty edges of raster 324 | trim() 325 | 326 | # make a map 327 | par(mar = c(0.25, 0.25, 2, 0.25)) 328 | t <- str_glue("Proportion of Deciduous Broadleaf Forest\n", 329 | "{max_lc_year} MODIS Landcover") 330 | plot(forest_cover, axes = FALSE, box = FALSE, col = viridis(10), main = t) 331 | ``` 332 | 333 | ## Elevation {#covariates-elevation} 334 | 335 | In some scenarios, you may want to include additional covariates to complement the land cover variables. There is a wealth of open access raster data available for this purpose; however, in most cases, these data will not have a simple R interface for accessing them. Instead, you'll typically have to manually download and process these data. As an example of how this works, we'll demonstrate how to include covariates for elevation, which frequently plays an important role in shaping species distributions. 336 | 337 | Amatulli et al. [-@amatulliSuiteGlobalCrossscale2018] provide a suite of global, 1km resolution topographic variables designed for use in distribution modeling. A range of variables are available, including elevation, slope, roughness, and many others; we'll focus on elevation here, but the approach can easily be applied to other variables. To start, visit [the website for these data](http://www.earthenv.org/topography), download the 1 km resolution median elevation product, and save the file (`elevation_1KMmd_GMTEDmd.tif`) in the `data/` subdirectory of your project: 338 | 339 | ![](images/03_covariates_elevation.png) 340 | 341 | ```{r covariates-elevation-dl, echo=FALSE} 342 | f_dem <- "elevation_1KMmd_GMTEDmd.tif" 343 | if (!file.exists(file.path("data", f_dem))) { 344 | download.file(paste0("https://data.earthenv.org/topography/", f_dem), 345 | file.path("data", f_dem)) 346 | } 347 | ``` 348 | 349 | Next we'll load the file, crop it down from it's full global extent to just the portion we need for BCR 27, and reproject it to the MODIS sinusoidal projection. 350 | 351 | ```{r covariates-elevation-load} 352 | elev <- raster("data/elevation_1KMmd_GMTEDmd.tif") 353 | # crop, buffer bcr by 10 km to provide a little wiggly room 354 | elev <- bcr %>% 355 | st_buffer(dist = 10000) %>% 356 | st_transform(crs = projection(elev)) %>% 357 | crop(elev, .) %>% 358 | projectRaster(crs = projection(landcover)) 359 | ``` 360 | 361 | Now we extract the elevation values within the neighborhood of each checklist location just as we did before for the land cover data. Then we'll calculate the median and standard deviation of the elevation within each neighborhood. 362 | 363 | ```{r covariates-elevation-extract} 364 | # buffer each checklist location 365 | ebird_buff_noyear <- ebird %>% 366 | distinct(locality_id, latitude, longitude) %>% 367 | st_as_sf(coords = c("longitude", "latitude"), crs = 4326) %>% 368 | st_transform(crs = projection(elev)) %>% 369 | st_buffer(dist = neighborhood_radius) 370 | 371 | # extract elevation values and calculate median and sd 372 | locs <- st_set_geometry(ebird_buff_noyear, NULL) %>% 373 | mutate(id = row_number()) 374 | elev_checklists <- exact_extract(elev, ebird_buff_noyear, progress = FALSE) %>% 375 | map_dfr(~ tibble(elevation_median = mean(.$value, na.rm = TRUE), 376 | elevation_sd = sd(.$value, na.rm = TRUE))) %>% 377 | # join to lookup table to get locality_id 378 | bind_cols(locs, .) 379 | ``` 380 | 381 | We'll need to repeat this process to calculate the elevation covariates for the prediction surface. 382 | 383 | ```{r covariates-elevation-pred} 384 | # extract and calculate median and sd 385 | elev_pred <- exact_extract(elev, r_cells, progress = FALSE) %>% 386 | map_dfr(~ tibble(elevation_median = mean(.$value, na.rm = TRUE), 387 | elevation_sd = sd(.$value, na.rm = TRUE))) %>% 388 | # join to lookup table to get locality_id 389 | bind_cols(st_drop_geometry(r_cells), .) 390 | ``` 391 | 392 | Finally, we'll combine these elevation covariates with the land cover covariates. 393 | 394 | ```{r covariates-elevation-combine} 395 | # checklist covariates 396 | pland_elev_checklist <- inner_join(pland, elev_checklists, by = "locality_id") 397 | write_csv(pland_elev_checklist, "data/pland-elev_location-year.csv") 398 | 399 | # prediction surface covariates 400 | pland_elev_pred <- inner_join(pland_coords, elev_pred, by = "id") 401 | write_csv(pland_elev_pred, "data/pland-elev_prediction-surface.csv") 402 | glimpse(pland_elev_pred) 403 | ``` 404 | 405 | This completes the data preparation. The following chapters will focus on using these data to model species distributions. 406 | -------------------------------------------------------------------------------- /07_references.Rmd: -------------------------------------------------------------------------------- 1 | `r if (knitr::is_html_output()) '# References {-}'` 2 | 3 | 4 | ```{r prepare-data-package, echo = FALSE} 5 | zip_file <- "data/data.zip" 6 | files <- c("ebd_woothr_june_bcr27.txt", 7 | "ebd_checklists_june_bcr27.txt", 8 | "ebd_woothr_june_bcr27_zf.csv", 9 | "gis-data.gpkg", 10 | "mcd12q1_classes.csv", 11 | "pland-elev_location-year.csv", 12 | "pland-elev_prediction-surface.csv", 13 | "prediction-surface.tif") 14 | unlink(zip_file) 15 | zip(zip_file, file.path("data", files)) 16 | ``` 17 | 18 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: ebirstbestpractices 2 | Title: Best Practices for Using eBird Data 3 | Version: 2.0 4 | Authors@R: c( 5 | person("Matthew", "Strimas-Mackey", , email = "mes335@cornell.edu", 6 | c("aut", "cre"), 7 | comment = c(ORCID = "0000-0001-8929-7776"), 8 | person("Wesley", Hochachka", "M.", "wmh6@cornell.edu", "aut"), 9 | person("Viviana", "Ruiz-Gutierrez", , "vr45@cornell.edu", "aut"), 10 | person("Orin", "Robinson", "J.", "ojr7@cornell.edu", "aut"), 11 | person("Eliot", "Miller", "T."", "etm45@cornell.edu", "aut"), 12 | person("Tom", "Auer", , "mta45@cornell.edu", "aut"), 13 | person("Steve", "Kelling", , "stk2@cornell.edu", "aut"), 14 | person("Daniel", "Fink", , "garrett@cornell.edu", "aut"), 15 | person("Alison", "Johnston", , "aj327@cornell.edu", "aut", 16 | comment = c(ORCID = "0000-0001-8221-013X")) 17 | ) 18 | URL: https://github.com/CornellLabOfOrnithology/ebird-best-practices 19 | License: GPL-3 20 | Depends: R (>= 3.5.0) 21 | Imports: 22 | AICcmodavg, 23 | auk (>= 0.3.3), 24 | bookdown, 25 | data.table, 26 | dggridR, 27 | dplyr (>= 0.8.3), 28 | ebirdst, 29 | exactextractr, 30 | fields, 31 | fitdistrplus, 32 | forcats, 33 | ggplot2, 34 | ggthemes, 35 | gridExtra, 36 | hexbin, 37 | janitor, 38 | knitr, 39 | lubridate, 40 | lwgeom, 41 | mgcv, 42 | MODIS, 43 | MuMIn, 44 | pdp, 45 | PresenceAbsence, 46 | purrr, 47 | ranger (>= 0.11.2), 48 | raster (>= 2.9-5), 49 | readr, 50 | rlang (>= 0.4.1), 51 | rmarkdown, 52 | rnaturalearth, 53 | rvest, 54 | scales, 55 | scam, 56 | sf (>= 0.8-0), 57 | smoothr, 58 | stringr, 59 | tibble, 60 | tidyr (>= 1.2.1), 61 | tidyverse, 62 | unmarked, 63 | verification, 64 | viridis 65 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/us/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Best Practices for Using eBird Data 2 | 3 | [![DOI](https://zenodo.org/badge/233674076.svg)](https://zenodo.org/badge/latestdoi/233674076) 4 | [![Status](https://img.shields.io/badge/Status-stable-green.svg?style=flat-square)]() 5 | [![License: GPL 6 | v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg?style=flat-square)](http://www.gnu.org/licenses/gpl-3.0) 7 | 8 | This repository contains the source for the book [Best Practices for Using eBird Data](https://cornelllabofornithology.github.io/ebird-best-practices/) 9 | book, which is a supplement to *Analytical guidelines to increase the value of community science data: An example using eBird data to estimate species distributions* ((Johnston et al. 2021)[available on bioRxiv](https://onlinelibrary.wiley.com/doi/10.1111/ddi.13271).) 10 | 11 | The R packages used in this book can be installed with: 12 | 13 | ```{r} 14 | # install.packages("remotes") 15 | remotes::install_github("mstrimas/ebppackages") 16 | ``` 17 | 18 | Please cite this book as: 19 | 20 | > Strimas-Mackey, M., W.M. Hochachka, V. Ruiz-Gutierrez, O.J. Robinson, E.T. Miller, T. Auer, S. Kelling, D. Fink, A. Johnston. 2023. Best Practices for Using eBird Data. Version 2.0. https://cornelllabofornithology.github.io/ebird-best-practices/. Cornell Lab of Ornithology, Ithaca, New York. https://doi.org/10.5281/zenodo.3620739 -------------------------------------------------------------------------------- /_bookdown.yml: -------------------------------------------------------------------------------- 1 | book_filename: "ebird-best-practices" 2 | delete_merged_file: true 3 | before_chapter_script: "_common.r" 4 | output_dir: "docs" 5 | language: 6 | ui: 7 | chapter_name: "Chapter " 8 | -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/abundance-assess-mag-plot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/abundance-assess-mag-plot-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/abundance-model-cov-plot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/abundance-model-cov-plot-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/abundance-model-dist-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/abundance-model-dist-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/abundance-predict-map-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/abundance-predict-map-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/abundance-predict-peak-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/abundance-predict-peak-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/ebird-explore-distance-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/ebird-explore-distance-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/ebird-explore-duration-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/ebird-explore-duration-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/ebird-explore-map-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/ebird-explore-map-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/ebird-explore-observers-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/ebird-explore-observers-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/ebird-explore-time-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/ebird-explore-time-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/encounter-habitat-pd-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/encounter-habitat-pd-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/encounter-habitat-pi-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/encounter-habitat-pi-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/encounter-predict-map-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/encounter-predict-map-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/encounter-predict-time-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/encounter-predict-time-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/encounter-rf-cal-cal-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/encounter-rf-cal-cal-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/encounter-sss-map-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/encounter-sss-map-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/encounter-sss-toy-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/encounter-sss-toy-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/landcover-prediction-map-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/landcover-prediction-map-1.png -------------------------------------------------------------------------------- /_bookdown_files/ebird-best-practices_files/figure-html/occupancy-predict-map-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_bookdown_files/ebird-best-practices_files/figure-html/occupancy-predict-map-1.png -------------------------------------------------------------------------------- /_common.R: -------------------------------------------------------------------------------- 1 | knitr::opts_knit$set(root.dir = here::here()) 2 | set.seed(1) 3 | options(digits = 3) 4 | 5 | knitr::opts_chunk$set( 6 | comment = "#>", 7 | collapse = TRUE, 8 | cache = FALSE, 9 | warning = FALSE, 10 | error = FALSE, 11 | message = FALSE, 12 | out.width = "\\textwidth", 13 | fig.align = "center", 14 | fig.width = 7, 15 | fig.asp = 0.618, # 1 / phi 16 | fig.show = "hold" 17 | ) 18 | options(knitr.kable.NA = "") 19 | options(dplyr.print_min = 6, dplyr.print_max = 6) 20 | 21 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/_config.yml -------------------------------------------------------------------------------- /_output.yml: -------------------------------------------------------------------------------- 1 | bookdown::gitbook: 2 | css: style.css 3 | config: 4 | toc: 5 | collapse: section 6 | before: | 7 |
  • eBird Best Practices
  • 8 | after: null 9 | edit: 10 | link: https://github.com/cornelllabofornithology/ebird-best-practices/edit/master/%s 11 | text: "Edit" 12 | sharing: no -------------------------------------------------------------------------------- /data/data.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/data/data.zip -------------------------------------------------------------------------------- /data/gis-data.gpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/data/gis-data.gpkg -------------------------------------------------------------------------------- /data/mcd12q1_classes.csv: -------------------------------------------------------------------------------- 1 | class,name,description 2 | 0,Water bodies,At least 60% of area is covered by permanent water bodies. 3 | 1,Evergreen Needleleaf Forests,Dominated by evergreen conifer trees (canopy >2m). Tree cover >60%. 4 | 2,Evergreen Broadleaf Forests,Dominated by evergreen broadleaf and palmate trees (canopy >2m). Tree cover >60%. 5 | 3,Deciduous Needleleaf Forests,Dominated by deciduous needleleaf (e.g. larch) trees (canopy >2m). Tree cover >60%. 6 | 4,Deciduous Broadleaf Forests,Dominated by deciduous broadleaf trees (canopy >2m). Tree cover >60%. 7 | 5,Mixed Forests,Dominated by neither deciduous nor evergreen (40-60% of each) tree type (canopy >2m). Tree cover >60%. 8 | 6,Closed Shrublands,Dominated by woody perennials (1-2m height) >60% cover. 9 | 7,Open Shrublands,Dominated by woody perennials (1-2m height) 10-60% cover. 10 | 8,Woody Savannas,Tree cover 30-60% (canopy >2m). 11 | 9,Savannas,Tree cover 10-30% (canopy >2m). 12 | 10,Grasslands,Dominated by herbaceous annuals (<2m). 13 | 11,Permanent Wetlands,Permanently inundated lands with 30-60% water cover and >10% vegetated cover. 14 | 12,Croplands,At least 60% of area is cultivated cropland. 15 | 13,Urban and Built-up Lands,"At least 30% impervious surface area including building materials, asphalt, and vehicles." 16 | 14,Cropland/Natural Vegetation Mosaics,"Mosaics of small-scale cultivation 40-60% with natural tree, shrub, or herbaceous vegetation." 17 | 15,Non-Vegetated Lands,"At least 60% of area is non-vegetated barren (sand, rock, soil) or permanent snow and ice with less than 10% vegetation." 18 | 255,Unclassified,Has not received a map label because of missing inputs. -------------------------------------------------------------------------------- /data/modis/modis_mcd12q1_umd_2010.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/data/modis/modis_mcd12q1_umd_2010.tif -------------------------------------------------------------------------------- /data/modis/modis_mcd12q1_umd_2011.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/data/modis/modis_mcd12q1_umd_2011.tif -------------------------------------------------------------------------------- /data/modis/modis_mcd12q1_umd_2012.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/data/modis/modis_mcd12q1_umd_2012.tif -------------------------------------------------------------------------------- /data/modis/modis_mcd12q1_umd_2013.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/data/modis/modis_mcd12q1_umd_2013.tif -------------------------------------------------------------------------------- /data/modis/modis_mcd12q1_umd_2014.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/data/modis/modis_mcd12q1_umd_2014.tif -------------------------------------------------------------------------------- /data/modis/modis_mcd12q1_umd_2015.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/data/modis/modis_mcd12q1_umd_2015.tif -------------------------------------------------------------------------------- /data/modis/modis_mcd12q1_umd_2016.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/data/modis/modis_mcd12q1_umd_2016.tif -------------------------------------------------------------------------------- /data/modis/modis_mcd12q1_umd_2017.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/data/modis/modis_mcd12q1_umd_2017.tif -------------------------------------------------------------------------------- /data/modis/modis_mcd12q1_umd_2018.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/data/modis/modis_mcd12q1_umd_2018.tif -------------------------------------------------------------------------------- /data/prediction-surface.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/data/prediction-surface.tif -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/abundance-assess-mag-plot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/abundance-assess-mag-plot-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/abundance-model-cov-plot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/abundance-model-cov-plot-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/abundance-model-dist-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/abundance-model-dist-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/abundance-predict-map-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/abundance-predict-map-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/abundance-predict-peak-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/abundance-predict-peak-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/ebird-explore-distance-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/ebird-explore-distance-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/ebird-explore-duration-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/ebird-explore-duration-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/ebird-explore-map-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/ebird-explore-map-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/ebird-explore-observers-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/ebird-explore-observers-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/ebird-explore-time-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/ebird-explore-time-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/encounter-habitat-pd-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/encounter-habitat-pd-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/encounter-habitat-pi-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/encounter-habitat-pi-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/encounter-predict-map-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/encounter-predict-map-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/encounter-predict-time-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/encounter-predict-time-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/encounter-rf-cal-cal-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/encounter-rf-cal-cal-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/encounter-sss-map-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/encounter-sss-map-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/encounter-sss-toy-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/encounter-sss-toy-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/landcover-prediction-map-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/landcover-prediction-map-1.png -------------------------------------------------------------------------------- /docs/ebird-best-practices_files/figure-html/occupancy-predict-map-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/ebird-best-practices_files/figure-html/occupancy-predict-map-1.png -------------------------------------------------------------------------------- /docs/images/02_ebird-data_checklist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/images/02_ebird-data_checklist.png -------------------------------------------------------------------------------- /docs/images/03_covariates_elevation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/images/03_covariates_elevation.png -------------------------------------------------------------------------------- /docs/images/09_ebird_split_custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/images/09_ebird_split_custom.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Best Practices for Using eBird Data 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 |
    122 | 123 |
    124 | 239 |
    240 | 241 |
    242 |
    243 | 248 | 249 |
    250 |
    251 | 252 |
    253 | 258 |
    259 | 260 |

    Version 1.0 is Retired!

    261 | 262 |

    This version of Best Practices for Using eBird Data is no longer being maintained. This webpage is now for reference purposes only. Please consult Version 2.0) of Best Practices for Using eBird Data instead.

    263 | 264 |

    Please cite this book as:

    265 |
    266 |

    Strimas-Mackey, M., W.M. Hochachka, V. Ruiz-Gutierrez, O.J. Robinson, E.T. Miller, T. Auer, S. Kelling, D. Fink, A. Johnston. 2020. Best Practices for Using eBird Data. Version 1.0. https://cornelllabofornithology.github.io/ebird-best-practices/. Cornell Lab of Ornithology, Ithaca, New York. https://doi.org/10.5281/zenodo.3620739

    267 |
    268 | 269 |
    270 |
    271 | 272 |
    273 |
    274 |
    275 | 276 | 277 |
    278 |
    279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 316 | 317 | 318 | 331 | 332 | 333 | 334 | -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/css/fontawesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/docs/libs/gitbook-2.6.7/css/fontawesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/css/plugin-bookdown.css: -------------------------------------------------------------------------------- 1 | .book .book-header h1 { 2 | padding-left: 20px; 3 | padding-right: 20px; 4 | } 5 | .book .book-header.fixed { 6 | position: fixed; 7 | right: 0; 8 | top: 0; 9 | left: 0; 10 | border-bottom: 1px solid rgba(0,0,0,.07); 11 | } 12 | span.search-highlight { 13 | background-color: #ffff88; 14 | } 15 | @media (min-width: 600px) { 16 | .book.with-summary .book-header.fixed { 17 | left: 300px; 18 | } 19 | } 20 | @media (max-width: 1240px) { 21 | .book .book-body.fixed { 22 | top: 50px; 23 | } 24 | .book .book-body.fixed .body-inner { 25 | top: auto; 26 | } 27 | } 28 | @media (max-width: 600px) { 29 | .book.with-summary .book-header.fixed { 30 | left: calc(100% - 60px); 31 | min-width: 300px; 32 | } 33 | .book.with-summary .book-body { 34 | transform: none; 35 | left: calc(100% - 60px); 36 | min-width: 300px; 37 | } 38 | .book .book-body.fixed { 39 | top: 0; 40 | } 41 | } 42 | 43 | .book .book-body.fixed .body-inner { 44 | top: 50px; 45 | } 46 | .book .book-body .page-wrapper .page-inner section.normal sub, .book .book-body .page-wrapper .page-inner section.normal sup { 47 | font-size: 85%; 48 | } 49 | 50 | @media print { 51 | .book .book-summary, .book .book-body .book-header, .fa { 52 | display: none !important; 53 | } 54 | .book .book-body.fixed { 55 | left: 0px; 56 | } 57 | .book .book-body,.book .book-body .body-inner, .book.with-summary { 58 | overflow: visible !important; 59 | } 60 | } 61 | .kable_wrapper { 62 | border-spacing: 20px 0; 63 | border-collapse: separate; 64 | border: none; 65 | margin: auto; 66 | } 67 | .kable_wrapper > tbody > tr > td { 68 | vertical-align: top; 69 | } 70 | .book .book-body .page-wrapper .page-inner section.normal table tr.header { 71 | border-top-width: 2px; 72 | } 73 | .book .book-body .page-wrapper .page-inner section.normal table tr:last-child td { 74 | border-bottom-width: 2px; 75 | } 76 | .book .book-body .page-wrapper .page-inner section.normal table td, .book .book-body .page-wrapper .page-inner section.normal table th { 77 | border-left: none; 78 | border-right: none; 79 | } 80 | .book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr, .book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr > td { 81 | border-top: none; 82 | } 83 | .book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr:last-child > td { 84 | border-bottom: none; 85 | } 86 | 87 | div.theorem, div.lemma, div.corollary, div.proposition, div.conjecture { 88 | font-style: italic; 89 | } 90 | span.theorem, span.lemma, span.corollary, span.proposition, span.conjecture { 91 | font-style: normal; 92 | } 93 | div.proof:after { 94 | content: "\25a2"; 95 | float: right; 96 | } 97 | .header-section-number { 98 | padding-right: .5em; 99 | } 100 | -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/css/plugin-clipboard.css: -------------------------------------------------------------------------------- 1 | div.sourceCode { 2 | position: relative; 3 | } 4 | 5 | .copy-to-clipboard-button { 6 | position: absolute; 7 | right: 0; 8 | top: 0; 9 | visibility: hidden; 10 | } 11 | 12 | .copy-to-clipboard-button:focus { 13 | outline: 0; 14 | } 15 | 16 | div.sourceCode:hover > .copy-to-clipboard-button { 17 | visibility: visible; 18 | } 19 | -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/css/plugin-fontsettings.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Theme 1 3 | */ 4 | .color-theme-1 .dropdown-menu { 5 | background-color: #111111; 6 | border-color: #7e888b; 7 | } 8 | .color-theme-1 .dropdown-menu .dropdown-caret .caret-inner { 9 | border-bottom: 9px solid #111111; 10 | } 11 | .color-theme-1 .dropdown-menu .buttons { 12 | border-color: #7e888b; 13 | } 14 | .color-theme-1 .dropdown-menu .button { 15 | color: #afa790; 16 | } 17 | .color-theme-1 .dropdown-menu .button:hover { 18 | color: #73553c; 19 | } 20 | /* 21 | * Theme 2 22 | */ 23 | .color-theme-2 .dropdown-menu { 24 | background-color: #2d3143; 25 | border-color: #272a3a; 26 | } 27 | .color-theme-2 .dropdown-menu .dropdown-caret .caret-inner { 28 | border-bottom: 9px solid #2d3143; 29 | } 30 | .color-theme-2 .dropdown-menu .buttons { 31 | border-color: #272a3a; 32 | } 33 | .color-theme-2 .dropdown-menu .button { 34 | color: #62677f; 35 | } 36 | .color-theme-2 .dropdown-menu .button:hover { 37 | color: #f4f4f5; 38 | } 39 | .book .book-header .font-settings .font-enlarge { 40 | line-height: 30px; 41 | font-size: 1.4em; 42 | } 43 | .book .book-header .font-settings .font-reduce { 44 | line-height: 30px; 45 | font-size: 1em; 46 | } 47 | .book.color-theme-1 .book-body { 48 | color: #704214; 49 | background: #f3eacb; 50 | } 51 | .book.color-theme-1 .book-body .page-wrapper .page-inner section { 52 | background: #f3eacb; 53 | } 54 | .book.color-theme-2 .book-body { 55 | color: #bdcadb; 56 | background: #1c1f2b; 57 | } 58 | .book.color-theme-2 .book-body .page-wrapper .page-inner section { 59 | background: #1c1f2b; 60 | } 61 | .book.font-size-0 .book-body .page-inner section { 62 | font-size: 1.2rem; 63 | } 64 | .book.font-size-1 .book-body .page-inner section { 65 | font-size: 1.4rem; 66 | } 67 | .book.font-size-2 .book-body .page-inner section { 68 | font-size: 1.6rem; 69 | } 70 | .book.font-size-3 .book-body .page-inner section { 71 | font-size: 2.2rem; 72 | } 73 | .book.font-size-4 .book-body .page-inner section { 74 | font-size: 4rem; 75 | } 76 | .book.font-family-0 { 77 | font-family: Georgia, serif; 78 | } 79 | .book.font-family-1 { 80 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 81 | } 82 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal { 83 | color: #704214; 84 | } 85 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal a { 86 | color: inherit; 87 | } 88 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1, 89 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2, 90 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h3, 91 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h4, 92 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h5, 93 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 { 94 | color: inherit; 95 | } 96 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1, 97 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2 { 98 | border-color: inherit; 99 | } 100 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 { 101 | color: inherit; 102 | } 103 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal hr { 104 | background-color: inherit; 105 | } 106 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal blockquote { 107 | border-color: #c4b29f; 108 | opacity: 0.9; 109 | } 110 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre, 111 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code { 112 | background: #fdf6e3; 113 | color: #657b83; 114 | border-color: #f8df9c; 115 | } 116 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal .highlight { 117 | background-color: inherit; 118 | } 119 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table th, 120 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table td { 121 | border-color: #f5d06c; 122 | } 123 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr { 124 | color: inherit; 125 | background-color: #fdf6e3; 126 | border-color: #444444; 127 | } 128 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) { 129 | background-color: #fbeecb; 130 | } 131 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal { 132 | color: #bdcadb; 133 | } 134 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal a { 135 | color: #3eb1d0; 136 | } 137 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1, 138 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2, 139 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h3, 140 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h4, 141 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h5, 142 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 { 143 | color: #fffffa; 144 | } 145 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1, 146 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2 { 147 | border-color: #373b4e; 148 | } 149 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 { 150 | color: #373b4e; 151 | } 152 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal hr { 153 | background-color: #373b4e; 154 | } 155 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal blockquote { 156 | border-color: #373b4e; 157 | } 158 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre, 159 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code { 160 | color: #9dbed8; 161 | background: #2d3143; 162 | border-color: #2d3143; 163 | } 164 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal .highlight { 165 | background-color: #282a39; 166 | } 167 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th, 168 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table td { 169 | border-color: #3b3f54; 170 | } 171 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr { 172 | color: #b6c2d2; 173 | background-color: #2d3143; 174 | border-color: #3b3f54; 175 | } 176 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) { 177 | background-color: #35394b; 178 | } 179 | .book.color-theme-1 .book-header { 180 | color: #afa790; 181 | background: transparent; 182 | } 183 | .book.color-theme-1 .book-header .btn { 184 | color: #afa790; 185 | } 186 | .book.color-theme-1 .book-header .btn:hover { 187 | color: #73553c; 188 | background: none; 189 | } 190 | .book.color-theme-1 .book-header h1 { 191 | color: #704214; 192 | } 193 | .book.color-theme-2 .book-header { 194 | color: #7e888b; 195 | background: transparent; 196 | } 197 | .book.color-theme-2 .book-header .btn { 198 | color: #3b3f54; 199 | } 200 | .book.color-theme-2 .book-header .btn:hover { 201 | color: #fffff5; 202 | background: none; 203 | } 204 | .book.color-theme-2 .book-header h1 { 205 | color: #bdcadb; 206 | } 207 | .book.color-theme-1 .book-body .navigation { 208 | color: #afa790; 209 | } 210 | .book.color-theme-1 .book-body .navigation:hover { 211 | color: #73553c; 212 | } 213 | .book.color-theme-2 .book-body .navigation { 214 | color: #383f52; 215 | } 216 | .book.color-theme-2 .book-body .navigation:hover { 217 | color: #fffff5; 218 | } 219 | /* 220 | * Theme 1 221 | */ 222 | .book.color-theme-1 .book-summary { 223 | color: #afa790; 224 | background: #111111; 225 | border-right: 1px solid rgba(0, 0, 0, 0.07); 226 | } 227 | .book.color-theme-1 .book-summary .book-search { 228 | background: transparent; 229 | } 230 | .book.color-theme-1 .book-summary .book-search input, 231 | .book.color-theme-1 .book-summary .book-search input:focus { 232 | border: 1px solid transparent; 233 | } 234 | .book.color-theme-1 .book-summary ul.summary li.divider { 235 | background: #7e888b; 236 | box-shadow: none; 237 | } 238 | .book.color-theme-1 .book-summary ul.summary li i.fa-check { 239 | color: #33cc33; 240 | } 241 | .book.color-theme-1 .book-summary ul.summary li.done > a { 242 | color: #877f6a; 243 | } 244 | .book.color-theme-1 .book-summary ul.summary li a, 245 | .book.color-theme-1 .book-summary ul.summary li span { 246 | color: #877f6a; 247 | background: transparent; 248 | font-weight: normal; 249 | } 250 | .book.color-theme-1 .book-summary ul.summary li.active > a, 251 | .book.color-theme-1 .book-summary ul.summary li a:hover { 252 | color: #704214; 253 | background: transparent; 254 | font-weight: normal; 255 | } 256 | /* 257 | * Theme 2 258 | */ 259 | .book.color-theme-2 .book-summary { 260 | color: #bcc1d2; 261 | background: #2d3143; 262 | border-right: none; 263 | } 264 | .book.color-theme-2 .book-summary .book-search { 265 | background: transparent; 266 | } 267 | .book.color-theme-2 .book-summary .book-search input, 268 | .book.color-theme-2 .book-summary .book-search input:focus { 269 | border: 1px solid transparent; 270 | } 271 | .book.color-theme-2 .book-summary ul.summary li.divider { 272 | background: #272a3a; 273 | box-shadow: none; 274 | } 275 | .book.color-theme-2 .book-summary ul.summary li i.fa-check { 276 | color: #33cc33; 277 | } 278 | .book.color-theme-2 .book-summary ul.summary li.done > a { 279 | color: #62687f; 280 | } 281 | .book.color-theme-2 .book-summary ul.summary li a, 282 | .book.color-theme-2 .book-summary ul.summary li span { 283 | color: #c1c6d7; 284 | background: transparent; 285 | font-weight: 600; 286 | } 287 | .book.color-theme-2 .book-summary ul.summary li.active > a, 288 | .book.color-theme-2 .book-summary ul.summary li a:hover { 289 | color: #f4f4f5; 290 | background: #252737; 291 | font-weight: 600; 292 | } 293 | -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/css/plugin-search.css: -------------------------------------------------------------------------------- 1 | .book .book-summary .book-search { 2 | padding: 6px; 3 | background: transparent; 4 | position: absolute; 5 | top: -50px; 6 | left: 0px; 7 | right: 0px; 8 | transition: top 0.5s ease; 9 | } 10 | .book .book-summary .book-search input, 11 | .book .book-summary .book-search input:focus, 12 | .book .book-summary .book-search input:hover { 13 | width: 100%; 14 | background: transparent; 15 | border: 1px solid #ccc; 16 | box-shadow: none; 17 | outline: none; 18 | line-height: 22px; 19 | padding: 7px 4px; 20 | color: inherit; 21 | box-sizing: border-box; 22 | } 23 | .book.with-search .book-summary .book-search { 24 | top: 0px; 25 | } 26 | .book.with-search .book-summary ul.summary { 27 | top: 50px; 28 | } 29 | .with-search .summary li[data-level] a[href*=".html#"] { 30 | display: none; 31 | } 32 | -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/css/plugin-table.css: -------------------------------------------------------------------------------- 1 | .book .book-body .page-wrapper .page-inner section.normal table{display:table;width:100%;border-collapse:collapse;border-spacing:0;overflow:auto}.book .book-body .page-wrapper .page-inner section.normal table td,.book .book-body .page-wrapper .page-inner section.normal table th{padding:6px 13px;border:1px solid #ddd}.book .book-body .page-wrapper .page-inner section.normal table tr{background-color:#fff;border-top:1px solid #ccc}.book .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n){background-color:#f8f8f8}.book .book-body .page-wrapper .page-inner section.normal table th{font-weight:700} 2 | -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/js/clipboard.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * clipboard.js v2.0.4 3 | * https://zenorocha.github.io/clipboard.js 4 | * 5 | * Licensed MIT © Zeno Rocha 6 | */ 7 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;no;o++){for(var r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void 0!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(r===t)return o;t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o]}return r===t?o:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];i>1;)t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return r>t?o:t>r?o+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,o=0,r=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>r-1||o>s-1)break;a[i]!==h[o]?a[i]h[o]&&o++:(n.add(a[i]),i++,o++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},o=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=r,t.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),t.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var s=0;s0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),i=new t.Vector,o=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,h=this,l=this.tokenStore.expand(e).reduce(function(n,o){var r=h.corpusTokens.indexOf(o),s=h.idf(o),l=1,u=new t.SortedSet;if(o!==e){var c=Math.max(3,o.length-e.length);l=1/Math.log(c)}return r>-1&&i.insert(r,a*s*l),Object.keys(h.tokenStore.get(o)).forEach(function(t){u.add(t)}),n.union(u)},new t.SortedSet);o.push(l)},this);var a=o.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,o=new t.Vector,r=0;i>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);o.insert(this.corpusTokens.indexOf(s),a*h)}return o},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",h="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,u=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(l),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,y=/^(.+?)(ed|ing)$/,g=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+o+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,P=/ll$/,N=new RegExp("^"+o+i+"[^aeiouwxy]$"),T=function(n){var i,o,r,s,a,h,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=v,a=y,s.test(n)){var T=s.exec(n);s=u,s.test(T[1])&&(s=g,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,l=x,a.test(n)?n+="e":h.test(n)?(s=g,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=k,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+t[o])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+e[o])}if(s=_,a=F,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=O,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=N,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=P,a=c,s.test(n)&&a.test(n)&&(s=g,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==e?e:void 0},t.stopWordFilter.stopWords={a:"a",able:"able",about:"about",across:"across",after:"after",all:"all",almost:"almost",also:"also",am:"am",among:"among",an:"an",and:"and",any:"any",are:"are",as:"as",at:"at",be:"be",because:"because",been:"been",but:"but",by:"by",can:"can",cannot:"cannot",could:"could",dear:"dear",did:"did","do":"do",does:"does",either:"either","else":"else",ever:"ever",every:"every","for":"for",from:"from",get:"get",got:"got",had:"had",has:"has",have:"have",he:"he",her:"her",hers:"hers",him:"him",his:"his",how:"how",however:"however",i:"i","if":"if","in":"in",into:"into",is:"is",it:"it",its:"its",just:"just",least:"least",let:"let",like:"like",likely:"likely",may:"may",me:"me",might:"might",most:"most",must:"must",my:"my",neither:"neither",no:"no",nor:"nor",not:"not",of:"of",off:"off",often:"often",on:"on",only:"only",or:"or",other:"other",our:"our",own:"own",rather:"rather",said:"said",say:"say",says:"says",she:"she",should:"should",since:"since",so:"so",some:"some",than:"than",that:"that",the:"the",their:"their",them:"them",then:"then",there:"there",these:"these",they:"they","this":"this",tis:"tis",to:"to",too:"too",twas:"twas",us:"us",wants:"wants",was:"was",we:"we",were:"were",what:"what",when:"when",where:"where",which:"which","while":"while",who:"who",whom:"whom",why:"why",will:"will","with":"with",would:"would",yet:"yet",you:"you",your:"your"},t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){var e=t.replace(/^\W+/,"").replace(/\W+$/,"");return""===e?void 0:e},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t[0],o=t.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n indicates arrow keys):', 82 | '/: navigate to previous/next page', 83 | 's: Toggle sidebar']; 84 | if (config.search !== false) info.push('f: Toggle search input ' + 85 | '(use //Enter in the search input to navigate through search matches; ' + 86 | 'press Esc to cancel search)'); 87 | if (config.info !== false) gitbook.toolbar.createButton({ 88 | icon: 'fa fa-info', 89 | label: 'Information about the toolbar', 90 | position: 'left', 91 | onClick: function(e) { 92 | e.preventDefault(); 93 | window.alert(info.join('\n\n')); 94 | } 95 | }); 96 | 97 | // highlight the current section in TOC 98 | var href = window.location.pathname; 99 | href = href.substr(href.lastIndexOf('/') + 1); 100 | // accentuated characters need to be decoded (#819) 101 | href = decodeURIComponent(href); 102 | if (href === '') href = 'index.html'; 103 | var li = $('a[href^="' + href + location.hash + '"]').parent('li.chapter').first(); 104 | var summary = $('ul.summary'), chaps = summary.find('li.chapter'); 105 | if (li.length === 0) li = chaps.first(); 106 | li.addClass('active'); 107 | chaps.on('click', function(e) { 108 | chaps.removeClass('active'); 109 | $(this).addClass('active'); 110 | gs.set('tocScrollTop', summary.scrollTop()); 111 | }); 112 | 113 | var toc = config.toc; 114 | // collapse TOC items that are not for the current chapter 115 | if (toc && toc.collapse) (function() { 116 | var type = toc.collapse; 117 | if (type === 'none') return; 118 | if (type !== 'section' && type !== 'subsection') return; 119 | // sections under chapters 120 | var toc_sub = summary.children('li[data-level]').children('ul'); 121 | if (type === 'section') { 122 | toc_sub.hide() 123 | .parent().has(li).children('ul').show(); 124 | } else { 125 | toc_sub.children('li').children('ul').hide() 126 | .parent().has(li).children('ul').show(); 127 | } 128 | li.children('ul').show(); 129 | var toc_sub2 = toc_sub.children('li'); 130 | if (type === 'section') toc_sub2.children('ul').hide(); 131 | summary.children('li[data-level]').find('a') 132 | .on('click.bookdown', function(e) { 133 | if (href === $(this).attr('href').replace(/#.*/, '')) 134 | $(this).parent('li').children('ul').toggle(); 135 | }); 136 | })(); 137 | 138 | // add tooltips to the 's that are truncated 139 | $('a').each(function(i, el) { 140 | if (el.offsetWidth >= el.scrollWidth) return; 141 | if (typeof el.title === 'undefined') return; 142 | el.title = el.text; 143 | }); 144 | 145 | // restore TOC scroll position 146 | var pos = gs.get('tocScrollTop'); 147 | if (typeof pos !== 'undefined') summary.scrollTop(pos); 148 | 149 | // highlight the TOC item that has same text as the heading in view as scrolling 150 | if (toc && toc.scroll_highlight !== false) (function() { 151 | // scroll the current TOC item into viewport 152 | var ht = $(window).height(), rect = li[0].getBoundingClientRect(); 153 | if (rect.top >= ht || rect.top <= 0 || rect.bottom <= 0) { 154 | summary.scrollTop(li[0].offsetTop); 155 | } 156 | // current chapter TOC items 157 | var items = $('a[href^="' + href + '"]').parent('li.chapter'), 158 | m = items.length; 159 | if (m === 0) { 160 | items = summary.find('li.chapter'); 161 | m = items.length; 162 | } 163 | if (m === 0) return; 164 | // all section titles on current page 165 | var hs = bookInner.find('.page-inner').find('h1,h2,h3'), n = hs.length, 166 | ts = hs.map(function(i, el) { return $(el).text(); }); 167 | if (n === 0) return; 168 | var scrollHandler = function(e) { 169 | var ht = $(window).height(); 170 | clearTimeout($.data(this, 'scrollTimer')); 171 | $.data(this, 'scrollTimer', setTimeout(function() { 172 | // find the first visible title in the viewport 173 | for (var i = 0; i < n; i++) { 174 | var rect = hs[i].getBoundingClientRect(); 175 | if (rect.top >= 0 && rect.bottom <= ht) break; 176 | } 177 | if (i === n) return; 178 | items.removeClass('active'); 179 | for (var j = 0; j < m; j++) { 180 | if (items.eq(j).children('a').first().text() === ts[i]) break; 181 | } 182 | if (j === m) j = 0; // highlight the chapter title 183 | // search bottom-up for a visible TOC item to highlight; if an item is 184 | // hidden, we check if its parent is visible, and so on 185 | while (j > 0 && items.eq(j).is(':hidden')) j--; 186 | items.eq(j).addClass('active'); 187 | }, 250)); 188 | }; 189 | bookInner.on('scroll.bookdown', scrollHandler); 190 | bookBody.on('scroll.bookdown', scrollHandler); 191 | })(); 192 | 193 | // do not refresh the page if the TOC item points to the current page 194 | $('a[href="' + href + '"]').parent('li.chapter').children('a') 195 | .on('click', function(e) { 196 | bookInner.scrollTop(0); 197 | bookBody.scrollTop(0); 198 | return false; 199 | }); 200 | 201 | var toolbar = config.toolbar; 202 | if (!toolbar || toolbar.position !== 'static') { 203 | var bookHeader = $('.book-header'); 204 | bookBody.addClass('fixed'); 205 | bookHeader.addClass('fixed') 206 | .css('background-color', bookBody.css('background-color')) 207 | .on('click.bookdown', function(e) { 208 | // the theme may have changed after user clicks the theme button 209 | bookHeader.css('background-color', bookBody.css('background-color')); 210 | }); 211 | } 212 | 213 | }); 214 | 215 | gitbook.events.bind("page.change", function(e) { 216 | // store TOC scroll position 217 | var summary = $('ul.summary'); 218 | gs.set('tocScrollTop', summary.scrollTop()); 219 | }); 220 | 221 | var bookBody = $('.book-body'), bookInner = bookBody.find('.body-inner'); 222 | var chapterTitle = function() { 223 | return bookInner.find('.page-inner').find('h1,h2').first().text(); 224 | }; 225 | var saveScrollPos = function(e) { 226 | // save scroll position before page is reloaded 227 | gs.set('bodyScrollTop', { 228 | body: bookBody.scrollTop(), 229 | inner: bookInner.scrollTop(), 230 | focused: document.hasFocus(), 231 | title: chapterTitle() 232 | }); 233 | }; 234 | $(document).on('servr:reload', saveScrollPos); 235 | 236 | // check if the page is loaded in an iframe (e.g. the RStudio preview window) 237 | var inIFrame = function() { 238 | var inIframe = true; 239 | try { inIframe = window.self !== window.top; } catch (e) {} 240 | return inIframe; 241 | }; 242 | if (inIFrame()) { 243 | $(window).on('blur unload', saveScrollPos); 244 | } 245 | 246 | $(function(e) { 247 | var pos = gs.get('bodyScrollTop'); 248 | if (pos) { 249 | if (pos.title === chapterTitle()) { 250 | if (pos.body !== 0) bookBody.scrollTop(pos.body); 251 | if (pos.inner !== 0) bookInner.scrollTop(pos.inner); 252 | } 253 | } 254 | if ((pos && pos.focused) || !inIFrame()) bookInner.find('.page-wrapper').focus(); 255 | // clear book body scroll position 256 | gs.remove('bodyScrollTop'); 257 | }); 258 | 259 | }); 260 | -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/js/plugin-clipboard.js: -------------------------------------------------------------------------------- 1 | gitbook.require(["gitbook", "jQuery"], function(gitbook, $) { 2 | 3 | var copyButton = ''; 4 | var clipboard; 5 | 6 | gitbook.events.bind("page.change", function() { 7 | 8 | if (!ClipboardJS.isSupported()) return; 9 | 10 | // the page.change event is thrown twice: before and after the page changes 11 | if (clipboard) { 12 | // clipboard is already defined 13 | // we can deduct that we are before page changes 14 | clipboard.destroy(); // destroy the previous events listeners 15 | clipboard = undefined; // reset the clipboard object 16 | return; 17 | } 18 | 19 | $(copyButton).prependTo("div.sourceCode"); 20 | 21 | clipboard = new ClipboardJS(".copy-to-clipboard-button", { 22 | text: function(trigger) { 23 | return trigger.parentNode.textContent; 24 | } 25 | }); 26 | 27 | }); 28 | 29 | }); 30 | -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/js/plugin-fontsettings.js: -------------------------------------------------------------------------------- 1 | gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) { 2 | var fontState; 3 | 4 | var THEMES = { 5 | "white": 0, 6 | "sepia": 1, 7 | "night": 2 8 | }; 9 | 10 | var FAMILY = { 11 | "serif": 0, 12 | "sans": 1 13 | }; 14 | 15 | // Save current font settings 16 | function saveFontSettings() { 17 | gitbook.storage.set("fontState", fontState); 18 | update(); 19 | } 20 | 21 | // Increase font size 22 | function enlargeFontSize(e) { 23 | e.preventDefault(); 24 | if (fontState.size >= 4) return; 25 | 26 | fontState.size++; 27 | saveFontSettings(); 28 | }; 29 | 30 | // Decrease font size 31 | function reduceFontSize(e) { 32 | e.preventDefault(); 33 | if (fontState.size <= 0) return; 34 | 35 | fontState.size--; 36 | saveFontSettings(); 37 | }; 38 | 39 | // Change font family 40 | function changeFontFamily(index, e) { 41 | e.preventDefault(); 42 | 43 | fontState.family = index; 44 | saveFontSettings(); 45 | }; 46 | 47 | // Change type of color 48 | function changeColorTheme(index, e) { 49 | e.preventDefault(); 50 | 51 | var $book = $(".book"); 52 | 53 | if (fontState.theme !== 0) 54 | $book.removeClass("color-theme-"+fontState.theme); 55 | 56 | fontState.theme = index; 57 | if (fontState.theme !== 0) 58 | $book.addClass("color-theme-"+fontState.theme); 59 | 60 | saveFontSettings(); 61 | }; 62 | 63 | function update() { 64 | var $book = gitbook.state.$book; 65 | 66 | $(".font-settings .font-family-list li").removeClass("active"); 67 | $(".font-settings .font-family-list li:nth-child("+(fontState.family+1)+")").addClass("active"); 68 | 69 | $book[0].className = $book[0].className.replace(/\bfont-\S+/g, ''); 70 | $book.addClass("font-size-"+fontState.size); 71 | $book.addClass("font-family-"+fontState.family); 72 | 73 | if(fontState.theme !== 0) { 74 | $book[0].className = $book[0].className.replace(/\bcolor-theme-\S+/g, ''); 75 | $book.addClass("color-theme-"+fontState.theme); 76 | } 77 | }; 78 | 79 | function init(config) { 80 | var $bookBody, $book; 81 | 82 | //Find DOM elements. 83 | $book = gitbook.state.$book; 84 | $bookBody = $book.find(".book-body"); 85 | 86 | // Instantiate font state object 87 | fontState = gitbook.storage.get("fontState", { 88 | size: config.size || 2, 89 | family: FAMILY[config.family || "sans"], 90 | theme: THEMES[config.theme || "white"] 91 | }); 92 | 93 | update(); 94 | }; 95 | 96 | 97 | gitbook.events.bind("start", function(e, config) { 98 | var opts = config.fontsettings; 99 | if (!opts) return; 100 | 101 | // Create buttons in toolbar 102 | gitbook.toolbar.createButton({ 103 | icon: 'fa fa-font', 104 | label: 'Font Settings', 105 | className: 'font-settings', 106 | dropdown: [ 107 | [ 108 | { 109 | text: 'A', 110 | className: 'font-reduce', 111 | onClick: reduceFontSize 112 | }, 113 | { 114 | text: 'A', 115 | className: 'font-enlarge', 116 | onClick: enlargeFontSize 117 | } 118 | ], 119 | [ 120 | { 121 | text: 'Serif', 122 | onClick: _.partial(changeFontFamily, 0) 123 | }, 124 | { 125 | text: 'Sans', 126 | onClick: _.partial(changeFontFamily, 1) 127 | } 128 | ], 129 | [ 130 | { 131 | text: 'White', 132 | onClick: _.partial(changeColorTheme, 0) 133 | }, 134 | { 135 | text: 'Sepia', 136 | onClick: _.partial(changeColorTheme, 1) 137 | }, 138 | { 139 | text: 'Night', 140 | onClick: _.partial(changeColorTheme, 2) 141 | } 142 | ] 143 | ] 144 | }); 145 | 146 | 147 | // Init current settings 148 | init(opts); 149 | }); 150 | }); 151 | 152 | 153 | -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/js/plugin-search.js: -------------------------------------------------------------------------------- 1 | gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) { 2 | var index = null; 3 | var $searchInput, $searchLabel, $searchForm; 4 | var $highlighted = [], hi, hiOpts = { className: 'search-highlight' }; 5 | var collapse = false, toc_visible = []; 6 | 7 | // Use a specific index 8 | function loadIndex(data) { 9 | // [Yihui] In bookdown, I use a character matrix to store the chapter 10 | // content, and the index is dynamically built on the client side. 11 | // Gitbook prebuilds the index data instead: https://github.com/GitbookIO/plugin-search 12 | // We can certainly do that via R packages V8 and jsonlite, but let's 13 | // see how slow it really is before improving it. On the other hand, 14 | // lunr cannot handle non-English text very well, e.g. the default 15 | // tokenizer cannot deal with Chinese text, so we may want to replace 16 | // lunr with a dumb simple text matching approach. 17 | index = lunr(function () { 18 | this.ref('url'); 19 | this.field('title', { boost: 10 }); 20 | this.field('body'); 21 | }); 22 | data.map(function(item) { 23 | index.add({ 24 | url: item[0], 25 | title: item[1], 26 | body: item[2] 27 | }); 28 | }); 29 | } 30 | 31 | // Fetch the search index 32 | function fetchIndex() { 33 | return $.getJSON(gitbook.state.basePath+"/search_index.json") 34 | .then(loadIndex); // [Yihui] we need to use this object later 35 | } 36 | 37 | // Search for a term and return results 38 | function search(q) { 39 | if (!index) return; 40 | 41 | var results = _.chain(index.search(q)) 42 | .map(function(result) { 43 | var parts = result.ref.split("#"); 44 | return { 45 | path: parts[0], 46 | hash: parts[1] 47 | }; 48 | }) 49 | .value(); 50 | 51 | // [Yihui] Highlight the search keyword on current page 52 | $highlighted = results.length === 0 ? [] : $('.page-inner') 53 | .unhighlight(hiOpts).highlight(q, hiOpts).find('span.search-highlight'); 54 | scrollToHighlighted(0); 55 | 56 | return results; 57 | } 58 | 59 | // [Yihui] Scroll the chapter body to the i-th highlighted string 60 | function scrollToHighlighted(d) { 61 | var n = $highlighted.length; 62 | hi = hi === undefined ? 0 : hi + d; 63 | // navignate to the previous/next page in the search results if reached the top/bottom 64 | var b = hi < 0; 65 | if (d !== 0 && (b || hi >= n)) { 66 | var path = currentPath(), n2 = toc_visible.length; 67 | if (n2 === 0) return; 68 | for (var i = b ? 0 : n2; (b && i < n2) || (!b && i >= 0); i += b ? 1 : -1) { 69 | if (toc_visible.eq(i).data('path') === path) break; 70 | } 71 | i += b ? -1 : 1; 72 | if (i < 0) i = n2 - 1; 73 | if (i >= n2) i = 0; 74 | var lnk = toc_visible.eq(i).find('a[href$=".html"]'); 75 | if (lnk.length) lnk[0].click(); 76 | return; 77 | } 78 | if (n === 0) return; 79 | var $p = $highlighted.eq(hi); 80 | $p[0].scrollIntoView(); 81 | $highlighted.css('background-color', ''); 82 | // an orange background color on the current item and removed later 83 | $p.css('background-color', 'orange'); 84 | setTimeout(function() { 85 | $p.css('background-color', ''); 86 | }, 2000); 87 | } 88 | 89 | function currentPath() { 90 | var href = window.location.pathname; 91 | href = href.substr(href.lastIndexOf('/') + 1); 92 | return href === '' ? 'index.html' : href; 93 | } 94 | 95 | // Create search form 96 | function createForm(value) { 97 | if ($searchForm) $searchForm.remove(); 98 | if ($searchLabel) $searchLabel.remove(); 99 | if ($searchInput) $searchInput.remove(); 100 | 101 | $searchForm = $('
    ', { 102 | 'class': 'book-search', 103 | 'role': 'search' 104 | }); 105 | 106 | $searchLabel = $('
    123 | 124 |
    125 | 240 |
    241 | 242 |
    243 |
    244 | 249 | 250 |
    251 |
    252 | 253 |
    254 |
    255 |

    References

    256 | 257 |
    258 |
    259 |

    Amatulli, Giuseppe, Sami Domisch, Mao-Ning Tuanmu, Benoit Parmentier, Ajay Ranipeta, Jeremy Malczyk, and Walter Jetz. 2018. “A Suite of Global, Cross-Scale Topographic Variables for Environmental and Biodiversity Modeling.” Scientific Data 5 (March): 180040. https://doi.org/10.1038/sdata.2018.40.

    260 |
    261 |
    262 |

    Bzdok, Danilo, Naomi Altman, and Martin Krzywinski. 2018. “Points of Significance: Statistics Versus Machine Learning.” Nature Methods 15 (April): 233–34. https://doi.org/10.1038/nmeth.4642.

    263 |
    264 |
    265 |

    Chen, Chao, Andy Liaw, and Leo Breiman. 2004. “Using Random Forest to Learn Imbalanced Data.” University of California, Berkeley 110 (1-12): 24.

    266 |
    267 |
    268 |

    Courter, Jason R., Ron J. Johnson, Claire M. Stuyck, Brian A. Lang, and Evan W. Kaiser. 2013. “Weekend Bias in Citizen Science Data Reporting: Implications for Phenology Studies.” International Journal of Biometeorology 57 (5): 715–20. https://doi.org/10.1007/s00484-012-0598-7.

    269 |
    270 |
    271 |

    Ellis, Murray V., and Jennifer E. Taylor. 2018. “Effects of Weather, Time of Day, and Survey Effort on Estimates of Species Richness in Temperate Woodlands.” Emu-Austral Ornithology 118 (2): 183–92.

    272 |
    273 |
    274 |

    Friedl, Mark, and Damien Sulla-Menashe. 2015. “MCD12Q1 MODIS/Terra+Aqua Land Cover Type Yearly L3 Global 500m SIN Grid V006.” NASA EOSDIS Land Processes DAAC. https://doi.org/10.5067/MODIS/MCD12Q1.006.

    275 |
    276 |
    277 |

    Greenwood, Jeremy J. D. 2007. “Citizens, Science and Bird Conservation.” Journal of Ornithology 148 (1): 77–124. https://doi.org/10.1007/s10336-007-0239-9.

    278 |
    279 |
    280 |

    Guillera-Arroita, Gurutzeta, José J. Lahoz-Monfort, Jane Elith, Ascelin Gordon, Heini Kujala, Pia E. Lentini, Michael A. McCarthy, Reid Tingley, and Brendan A. Wintle. 2015. “Is My Species Distribution Model Fit for Purpose? Matching Data and Models to Applications.” Global Ecology and Biogeography 24 (3): 276–92.

    281 |
    282 |
    283 |

    Johnston, Alison, Daniel Fink, Wesley M. Hochachka, and Steve Kelling. 2018. “Estimates of Observer Expertise Improve Species Distributions from Citizen Science Data.” Methods in Ecology and Evolution 9 (1): 88–97.

    284 |
    285 |
    286 |

    Johnston, Alison, Stuart E. Newson, Kate Risely, Andy J. Musgrove, Dario Massimino, Stephen R. Baillie, and James W. Pearce-Higgins. 2014. “Species Traits Explain Variation in Detectability of UK Birds.” Bird Study 61 (3): 340–50.

    287 |
    288 |
    289 |

    Kadmon, Ronen, Oren Farber, and Avinoam Danin. 2004. “Effect of Roadside Bias on the Accuracy of Predictive Maps Produced by Bioclimatic Models.” Ecological Applications 14 (2): 401–13.

    290 |
    291 |
    292 |

    Kelling, Steve, Alison Johnston, Daniel Fink, Viviana Ruiz-Gutierrez, Rick Bonney, Aletta Bonn, Miguel Fernandez, et al. 2018. “Finding the Signal in the Noise of Citizen Science Observations.” bioRxiv, May, 326314. https://doi.org/10.1101/326314.

    293 |
    294 |
    295 |

    La Sorte, Frank A., Christopher A. Lepczyk, Jessica L. Burnett, Allen H. Hurlbert, Morgan W. Tingley, and Benjamin Zuckerberg. 2018. “Opportunities and Challenges for Big Data Ornithology.” The Condor 120 (2): 414–26.

    296 |
    297 |
    298 |

    Luck, Gary W., Taylor H. Ricketts, Gretchen C. Daily, and Marc Imhoff. 2004. “Alleviating Spatial Conflict Between People and Biodiversity.” Proceedings of the National Academy of Sciences 101 (1): 182–86. https://doi.org/10.1073/pnas.2237148100.

    299 |
    300 |
    301 |

    MacKenzie, Darryl I., and Larissa L. Bailey. 2004. “Assessing the Fit of Site-Occupancy Models.” Journal of Agricultural, Biological, and Environmental Statistics 9 (3): 300–318.

    302 |
    303 |
    304 |

    MacKenzie, Darryl I., James D. Nichols, J. Andrew Royle, Kenneth H. Pollock, Larissa Bailey, and James E. Hines. 2017. Occupancy Estimation and Modeling: Inferring Patterns and Dynamics of Species Occurrence. Elsevier.

    305 |
    306 |
    307 |

    Murphy, Allan H. 1973. “A New Vector Partition of the Probability Score.” Journal of Applied Meteorology 12 (4): 595–600. https://doi.org/10.1175/1520-0450(1973)012<0595:ANVPOT>2.0.CO;2.

    308 |
    309 |
    310 |

    Niculescu-Mizil, Alexandru, and Rich Caruana. 2005. “Predicting Good Probabilities with Supervised Learning.” In Proceedings of the 22nd International Conference on Machine Learning, 625–32. ACM.

    311 |
    312 |
    313 |

    Oliveira, Camilo Viana, Fabio Olmos, Manoel dos Santos-Filho, and Christine Steiner São Bernardo. 2018. “Observation of Diurnal Soaring Raptors in Northeastern Brazil Depends on Weather Conditions and Time of Day.” Journal of Raptor Research 52 (1): 56–65.

    314 |
    315 |
    316 |

    Platt, John. 1999. “Probabilistic Outputs for Support Vector Machines and Comparisons to Regularized Likelihood Methods.” Advances in Large Margin Classifiers 10 (3): 61–74.

    317 |
    318 |
    319 |

    Prendergast, J. R., S. N. Wood, J. H. Lawton, and B. C. Eversham. 1993. “Correcting for Variation in Recording Effort in Analyses of Diversity Hotspots.” Biodiversity Letters, 39–53.

    320 |
    321 |
    322 |

    R Core Team. 2018. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.

    323 |
    324 |
    325 |

    Robinson, Orin J., Viviana Ruiz‐Gutierrez, and Daniel Fink. 2018. “Correcting for Bias in Distribution Modelling for Rare Species Using Citizen Science Data.” Diversity and Distributions 24 (4): 460–72. https://doi.org/10.1111/ddi.12698.

    326 |
    327 |
    328 |

    Robinson, Orin J., Viviana Ruiz-Gutierrez, Daniel Fink, Robert J. Meese, Marcel Holyoak, and Evan G. Cooch. 2018. “Using Citizen Science Data in Integrated Population Models to Inform Conservation Decision-Making.” bioRxiv, 293464.

    329 |
    330 |
    331 |

    Sahr, Kevin. 2011. “Hexagonal Discrete Global Grid Systems for Geospatial Computing.” Archiwum Fotogrametrii, Kartografii I Teledetekcji 22: 363–76.

    332 |
    333 |
    334 |

    Sullivan, Brian L., Jocelyn L. Aycrigg, Jessie H. Barry, Rick E. Bonney, Nicholas Bruns, Caren B. Cooper, Theo Damoulas, et al. 2014. “The eBird Enterprise: An Integrated Approach to Development and Application of Citizen Science.” Biological Conservation 169 (January): 31–40. https://doi.org/10.1016/j.biocon.2013.11.003.

    335 |
    336 |
    337 |

    Tulloch, Ayesha IT, and Judit K. Szabo. 2012. “A Behavioural Ecology Approach to Understand Volunteer Surveying for Citizen Science Datasets.” Emu-Austral Ornithology 112 (4): 313–25.

    338 |
    339 |
    340 |

    Vaughan, I. P., and S. J. Ormerod. 2005. “The Continuing Challenges of Testing Species Distribution Models.” Journal of Applied Ecology 42 (4): 720–30. https://doi.org/10.1111/j.1365-2664.2005.01052.x.

    341 |
    342 |
    343 |

    Wood, Simon N. 2017. Generalized Additive Models: An Introduction with R. 2nd ed. Chapman and Hall/CRC.

    344 |
    345 |
    346 |
    347 |
    348 | 349 |
    350 |
    351 |
    352 | 353 | 354 |
    355 |
    356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 393 | 394 | 395 | 408 | 409 | 410 | 411 | -------------------------------------------------------------------------------- /docs/style.css: -------------------------------------------------------------------------------- 1 | p.caption { 2 | color: #777; 3 | margin-top: 10px; 4 | } 5 | p code { 6 | white-space: inherit; 7 | } 8 | pre { 9 | word-break: normal; 10 | word-wrap: normal; 11 | } 12 | pre code { 13 | white-space: inherit; 14 | } 15 | -------------------------------------------------------------------------------- /ebird-best-practices.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | BuildType: Package 16 | PackageUseDevtools: Yes 17 | PackageInstallArgs: --no-multiarch --with-keep.source 18 | -------------------------------------------------------------------------------- /images/02_ebird-data_checklist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/images/02_ebird-data_checklist.png -------------------------------------------------------------------------------- /images/03_covariates_elevation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/images/03_covariates_elevation.png -------------------------------------------------------------------------------- /images/09_ebird_split_custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/images/09_ebird_split_custom.png -------------------------------------------------------------------------------- /index.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | knit: "bookdown::render_book" 3 | title: "Best Practices for Using eBird Data" 4 | author: "Matthew Strimas-Mackey, Wesley M. Hochachka, Viviana Ruiz-Gutierrez, Orin J. Robinson, Eliot T. Miller, Tom Auer, Steve Kelling, Daniel Fink, Alison Johnston" 5 | date: "Version 2.0" 6 | site: bookdown::bookdown_site 7 | output: bookdown::gitbook 8 | documentclass: book 9 | bibliography: [references.bib, packages.bib] 10 | biblio-style: apalike 11 | link-citations: yes 12 | github-repo: cornelllabofornithology/ebird-best-practices 13 | description: "Best practices for using eBird data to estimate species distributions" 14 | --- 15 | 16 | # Welcome {-} 17 | 18 | 19 | **Best Practices for Using eBird Data** is a supplement to *Analytical guidelines to increase the value of community science data: An example using eBird data to estimate species distributions* ([Johnston et al. 2021](https://onlinelibrary.wiley.com/doi/10.1111/ddi.13271)). This paper describes the challenges associated with making inferences from biological citizen science data and proposes a set of best practices for making reliable estimates of species distributions from these data. Throughout, the paper uses [eBird](https://ebird.org/), the world's largest biological citizen science project, as a case study to illustrate the good practices. This book acts as a supplement to the paper, showing readers how to implement these best practices within [R](https://www.r-project.org/) using real data from eBird. After completing this book, readers should be able to process eBird data to prepare them for robust analyses, train models to estimate encounter rate, occupancy, and relative abundance, and assess the performance of these models . Readers should be comfortable with the R programming language, and read the [Prerequisites](#intro-pre) and [Setup](#intro-setup) sections of the introduction, before diving into this book. 20 | 21 | To submit fixes or suggest additions and improvements to this book, please file an [issue on GitHub](https://github.com/cornelllabofornithology/ebird-best-practices/issues). 22 | 23 | Please cite this book as: 24 | 25 | > Strimas-Mackey, M., W.M. Hochachka, V. Ruiz-Gutierrez, O.J. Robinson, E.T. Miller, T. Auer, S. Kelling, D. Fink, A. Johnston. 2023. Best Practices for Using eBird Data. Version 2.0. https://cornelllabofornithology.github.io/ebird-best-practices/. Cornell Lab of Ornithology, Ithaca, New York. https://doi.org/10.5281/zenodo.3620739 -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Redirecting to https://ebird.github.io/ebird-best-practices/ 4 | 5 | -------------------------------------------------------------------------------- /output/abundance-model_abd_woothr.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/output/abundance-model_abd_woothr.tif -------------------------------------------------------------------------------- /output/abundance-model_se_woothr.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/output/abundance-model_se_woothr.tif -------------------------------------------------------------------------------- /output/occupancy-model_prob_woothr.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/output/occupancy-model_prob_woothr.tif -------------------------------------------------------------------------------- /output/occupancy-model_se_woothr.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/output/occupancy-model_se_woothr.tif -------------------------------------------------------------------------------- /output/rf-model_encounter-rate_woothr.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/output/rf-model_encounter-rate_woothr.tif -------------------------------------------------------------------------------- /output/woothr_occupancy-model_gof.rds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/output/woothr_occupancy-model_gof.rds -------------------------------------------------------------------------------- /output/woothr_occupancy-model_predictions.rds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CornellLabofOrnithology/ebird-best-practices/c50c52745cda828e0da9882dae0a4beb49a561a8/output/woothr_occupancy-model_predictions.rds -------------------------------------------------------------------------------- /packages.bib: -------------------------------------------------------------------------------- 1 | @Manual{R-base, 2 | title = {R: A Language and Environment for Statistical Computing}, 3 | author = {{R Core Team}}, 4 | organization = {R Foundation for Statistical Computing}, 5 | address = {Vienna, Austria}, 6 | year = {2018}, 7 | url = {https://www.R-project.org/}, 8 | } 9 | @Manual{R-AICcmodavg, 10 | title = {AICcmodavg: Model Selection and Multimodel Inference Based on (Q)AIC(c)}, 11 | author = {Marc J. Mazerolle and portions of code contributed by Dan Linden.}, 12 | year = {2019}, 13 | note = {R package version 2.2-0}, 14 | url = {https://CRAN.R-project.org/package=AICcmodavg}, 15 | } 16 | @Manual{R-bookdown, 17 | title = {bookdown: Authoring Books and Technical Documents with R Markdown}, 18 | author = {Yihui Xie}, 19 | year = {2019}, 20 | note = {R package version 0.9.1}, 21 | url = {https://github.com/rstudio/bookdown}, 22 | } 23 | @Manual{R-dggridR, 24 | title = {dggridR: Discrete Global Grids}, 25 | author = {Richard Barnes}, 26 | year = {2018}, 27 | note = {R package version 2.0.3}, 28 | url = {https://CRAN.R-project.org/package=dggridR}, 29 | } 30 | @Manual{R-exactextractr, 31 | title = {exactextractr: Fast Extraction from Raster Datasets using Polygons}, 32 | author = {Daniel Baston}, 33 | year = {2020}, 34 | note = {R package version 0.2.1}, 35 | url = {https://CRAN.R-project.org/package=exactextractr}, 36 | } 37 | @Manual{R-fields, 38 | title = {fields: Tools for Spatial Data}, 39 | author = {Douglas Nychka and Reinhard Furrer and John Paige and Stephan Sain}, 40 | year = {2018}, 41 | note = {R package version 9.6}, 42 | url = {https://CRAN.R-project.org/package=fields}, 43 | } 44 | @Manual{R-fitdistrplus, 45 | title = {fitdistrplus: Help to Fit of a Parametric Distribution to Non-Censored or 46 | Censored Data}, 47 | author = {Marie-Laure Delignette-Muller and Christophe Dutang and Aurelie Siberchicot}, 48 | year = {2019}, 49 | note = {R package version 1.0-14}, 50 | url = {https://CRAN.R-project.org/package=fitdistrplus}, 51 | } 52 | @Manual{R-gridExtra, 53 | title = {gridExtra: Miscellaneous Functions for "Grid" Graphics}, 54 | author = {Baptiste Auguie}, 55 | year = {2017}, 56 | note = {R package version 2.3}, 57 | url = {https://CRAN.R-project.org/package=gridExtra}, 58 | } 59 | @Manual{R-knitr, 60 | title = {knitr: A General-Purpose Package for Dynamic Report Generation in R}, 61 | author = {Yihui Xie}, 62 | year = {2018}, 63 | note = {R package version 1.21}, 64 | url = {https://CRAN.R-project.org/package=knitr}, 65 | } 66 | @Manual{R-lubridate, 67 | title = {lubridate: Make Dealing with Dates a Little Easier}, 68 | author = {Vitalie Spinu and Garrett Grolemund and Hadley Wickham}, 69 | year = {2018}, 70 | note = {R package version 1.7.4}, 71 | url = {https://CRAN.R-project.org/package=lubridate}, 72 | } 73 | @Manual{R-lwgeom, 74 | title = {lwgeom: Bindings to Selected 'liblwgeom' Functions for Simple Features}, 75 | author = {Edzer Pebesma}, 76 | year = {2019}, 77 | note = {R package version 0.1-6}, 78 | url = {https://CRAN.R-project.org/package=lwgeom}, 79 | } 80 | @Manual{R-mgcv, 81 | title = {mgcv: Mixed GAM Computation Vehicle with Automatic Smoothness 82 | Estimation}, 83 | author = {Simon Wood}, 84 | year = {2019}, 85 | note = {R package version 1.8-27}, 86 | url = {https://CRAN.R-project.org/package=mgcv}, 87 | } 88 | @Manual{R-MODIS, 89 | title = {MODIS: Acquisition and Processing of MODIS Products}, 90 | author = {Matteo Mattiuzzi and Florian Detsch}, 91 | year = {2018}, 92 | note = {R package version 1.1.4}, 93 | url = {https://CRAN.R-project.org/package=MODIS}, 94 | } 95 | @Manual{R-MuMIn, 96 | title = {MuMIn: Multi-Model Inference}, 97 | author = {Kamil Bartoń}, 98 | year = {2018}, 99 | note = {R package version 1.42.1}, 100 | url = {https://CRAN.R-project.org/package=MuMIn}, 101 | } 102 | @Manual{R-pdp, 103 | title = {pdp: Partial Dependence Plots}, 104 | author = {Brandon Greenwell}, 105 | year = {2018}, 106 | note = {R package version 0.7.0}, 107 | url = {https://CRAN.R-project.org/package=pdp}, 108 | } 109 | @Manual{R-PresenceAbsence, 110 | title = {PresenceAbsence: Presence-Absence Model Evaluation.}, 111 | author = {Elizabeth Freeman}, 112 | year = {2012}, 113 | note = {R package version 1.1.9}, 114 | url = {https://CRAN.R-project.org/package=PresenceAbsence}, 115 | } 116 | @Manual{R-ranger, 117 | title = {ranger: A Fast Implementation of Random Forests}, 118 | author = {Marvin N. Wright and Stefan Wager and Philipp Probst}, 119 | year = {2019}, 120 | note = {R package version 0.11.1}, 121 | url = {https://CRAN.R-project.org/package=ranger}, 122 | } 123 | @Manual{R-raster, 124 | title = {raster: Geographic Data Analysis and Modeling}, 125 | author = {Robert J. Hijmans}, 126 | year = {2019}, 127 | note = {R package version 2.8-19}, 128 | url = {https://CRAN.R-project.org/package=raster}, 129 | } 130 | @Manual{R-rmarkdown, 131 | title = {rmarkdown: Dynamic Documents for R}, 132 | author = {JJ Allaire and Yihui Xie and Jonathan McPherson and Javier Luraschi and Kevin Ushey and Aron Atkins and Hadley Wickham and Joe Cheng and Winston Chang and Richard Iannone}, 133 | year = {2018}, 134 | note = {R package version 1.11}, 135 | url = {https://CRAN.R-project.org/package=rmarkdown}, 136 | } 137 | @Manual{R-scales, 138 | title = {scales: Scale Functions for Visualization}, 139 | author = {Hadley Wickham}, 140 | year = {2018}, 141 | note = {R package version 1.0.0}, 142 | url = {https://CRAN.R-project.org/package=scales}, 143 | } 144 | @Manual{R-scam, 145 | title = {scam: Shape Constrained Additive Models}, 146 | author = {Natalya Pya}, 147 | year = {2018}, 148 | note = {R package version 1.2-3}, 149 | url = {https://CRAN.R-project.org/package=scam}, 150 | } 151 | @Manual{R-sf, 152 | title = {sf: Simple Features for R}, 153 | author = {Edzer Pebesma}, 154 | year = {2019}, 155 | note = {R package version 0.7-4}, 156 | url = {https://github.com/r-spatial/sf/}, 157 | } 158 | @Manual{R-stringr, 159 | title = {stringr: Simple, Consistent Wrappers for Common String Operations}, 160 | author = {Hadley Wickham}, 161 | year = {2019}, 162 | note = {R package version 1.4.0}, 163 | url = {https://CRAN.R-project.org/package=stringr}, 164 | } 165 | @Manual{R-tidyverse, 166 | title = {tidyverse: Easily Install and Load the 'Tidyverse'}, 167 | author = {Hadley Wickham}, 168 | year = {2017}, 169 | note = {R package version 1.2.1}, 170 | url = {https://CRAN.R-project.org/package=tidyverse}, 171 | } 172 | @Manual{R-unmarked, 173 | title = {unmarked: Models for Data from Unmarked Animals}, 174 | author = {Ian Fiske and Richard Chandler and David Miller and Andy Royle and Marc Kery and Jeff Hostetler and Rebecca Hutchinson and Adam Smith and Ken Kellner}, 175 | year = {2019}, 176 | note = {R package version 0.12-3}, 177 | url = {https://CRAN.R-project.org/package=unmarked}, 178 | } 179 | @Manual{R-verification, 180 | title = {verification: Weather Forecast Verification Utilities}, 181 | author = {NCAR - Research Applications Laboratory}, 182 | year = {2015}, 183 | note = {R package version 1.42}, 184 | url = {https://CRAN.R-project.org/package=verification}, 185 | } 186 | @Manual{R-viridis, 187 | title = {viridis: Default Color Maps from 'matplotlib'}, 188 | author = {Simon Garnier}, 189 | year = {2018}, 190 | note = {R package version 0.5.1}, 191 | url = {https://CRAN.R-project.org/package=viridis}, 192 | } 193 | -------------------------------------------------------------------------------- /preamble.tex: -------------------------------------------------------------------------------- 1 | \usepackage{booktabs} 2 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | p.caption { 2 | color: #777; 3 | margin-top: 10px; 4 | } 5 | p code { 6 | white-space: inherit; 7 | } 8 | pre { 9 | word-break: normal; 10 | word-wrap: normal; 11 | } 12 | pre code { 13 | white-space: inherit; 14 | } 15 | --------------------------------------------------------------------------------