Title: | Streamline Taiwan Breeding Birds Survey (BBS) Data Retrieval and Analysis |
---|---|
Description: | The goal of bbsTaiwan is to streamline the retrieval and analysis of Taiwan Breeding Bird Survey (BBS) data. This package facilitates data access from GBIF, where Taiwan BBS data are stored. While the data is openly available on GBIF, its complex arrangement in the Darwin Core format can make it challenging to understand and use, often requiring advanced data wrangling skills. The bbsTaiwan package is designed to simplify this process, making it easier to access and utilize Taiwan BBS data. |
Authors: | Sunny Tseng [aut, cre] |
Maintainer: | Sunny Tseng <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.0 |
Built: | 2024-11-24 05:58:13 UTC |
Source: | https://github.com/SunnyTseng/bbsTaiwan |
This function fetches occurrence data for specified target species, utilizing both the event and occurrence tables from GBIF. The fetched dataset undergoes the following processing steps:
Join: Combines the event, occurrence, and measurementorfacts datasheets from GBIF into a single cohesive dataset.
Filter: Retains only the observations for specified species using the
target_species
argument. The entered Chinese common name was linked to
scientific name by bbs_translate.
Zero Fill: Converts implicit missing values into explicit ones by filling in zeros for trips where the target species was not observed. Specifically, if a plot was visited during a particular year or trip but the target species was not observed, the species count will show a value of 0 for that row.
bbs_fetch(target_species)
bbs_fetch(target_species)
target_species |
Character string specifying the Chinese common name of
the species of interest. It can accept a single character string, such as
|
A tibble
containing the species occurrence data.
# For single species data fetch bbs_fetch(target_species = "紅嘴黑鵯") # For multiple species data fetch bbs_fetch(target_species = c("紅嘴黑鵯", "白耳畫眉")) # To return data for all species bbs_fetch(target_species = "全部") # The function will return NULL if the target species is not found in the # BBS species list bbs_fetch(target_species = "隨機鳥")
# For single species data fetch bbs_fetch(target_species = "紅嘴黑鵯") # For multiple species data fetch bbs_fetch(target_species = c("紅嘴黑鵯", "白耳畫眉")) # To return data for all species bbs_fetch(target_species = "全部") # The function will return NULL if the target species is not found in the # BBS species list bbs_fetch(target_species = "隨機鳥")
This function returns the number of sites surveyed each year in the BBS Taiwan project. Sites were mapped into five regions: East, West, South, North, and Mountain (elevation higher than 1,000 m).
bbs_history(type = "plot")
bbs_history(type = "plot")
type |
Character string specifying the output format: either |
A tibble
or a ggplot
showing the number of sites surveyed each
year across regions.
# Return the number of sites in a table bbs_history(type = "table") # Return the number of sites in a bar chart bbs_history(type = "plot")
# Return the number of sites in a table bbs_history(type = "table") # Return the number of sites in a bar chart bbs_history(type = "plot")
This function visualizes the sites surveyed for breeding birds in Taiwan, highlighting the presence and absence of specific species. It is designed upon the function bbs_fetch and bbs_translate.
bbs_plotmap(target_species)
bbs_plotmap(target_species)
target_species |
Character string specifying the scientific name of
the species of interest. It can accept a single character string, such as
|
A ggplot
object showing the distribution map.
# For single species distribution bbs_plotmap(target_species = "紅嘴黑鵯") # For multiple species distribution bbs_plotmap(target_species = c("紅嘴黑鵯", "白耳畫眉")) # Simply the distribution of the surveyed sites bbs_plotmap(target_species = NULL)
# For single species distribution bbs_plotmap(target_species = "紅嘴黑鵯") # For multiple species distribution bbs_plotmap(target_species = c("紅嘴黑鵯", "白耳畫眉")) # Simply the distribution of the surveyed sites bbs_plotmap(target_species = NULL)
This function returns the coordinates of all BBS sites that were surveyed.
No arguments are needed. The coordinates are reported using the WGS84
projection system.
Use terra::vect(geom = c("decimalLatitude", "decimalLongitude"), crs = "epsg:4326")
to transform the table to spatial object.
bbs_sites()
bbs_sites()
The source data comes from the event table in the GBIF dataset.
A tibble including the coordinates of all BBS survey sites, in WGS84.
# Get the full list of BBS sites in a tibble bbs_sites() # Transform BBS sites into a spatial object using terra package bbs_sites() |> terra::vect(geom = c("decimalLatitude", "decimalLongitude"), crs = "epsg:4326")
# Get the full list of BBS sites in a tibble bbs_sites() # Transform BBS sites into a spatial object using terra package bbs_sites() |> terra::vect(geom = c("decimalLatitude", "decimalLongitude"), crs = "epsg:4326")
This function is intended for use under bbs_fetch and bbs_plotmap. This function helps users find the scientific names of birds from their Chinese common names for species found in Taiwan.
bbs_translate(target_species)
bbs_translate(target_species)
target_species |
A single character string or a vector of character strings representing species' names in Chinese. |
A vector of bird species' scientific names. If the input species name is not
included in the bird list of Taiwan, NA
will be returned. Please check for any typos.
# For a single species bbs_translate("白頭翁") # For multiple species bbs_translate(target_species = c("烏頭翁", "白頭翁", "紅嘴黑鵯", "白耳畫眉"))
# For a single species bbs_translate("白頭翁") # For multiple species bbs_translate(target_species = c("烏頭翁", "白頭翁", "紅嘴黑鵯", "白耳畫眉"))
A list of bird species that recorded in BBS Taiwan, including the scientific name, Chinese name, English name
bird_info
bird_info
A data frame with 909 rows and 4 columns:
scientific name
all possible Chinese that were used for the species
english name from Taiwan Wild Bird Federation
scientific name from Taiwan Wild Bird Federation
...
https://drive.google.com/drive/folders/1ex6EDkXv82mpEKcPkOYrQJ_anlu3pI1E
A dataframe record BBS Taiwan event info. This is a raw dataset, which was downloaded directly from GBIF without any wrangling or cleaning.
event
event
A data frame with 423,139 rows and 18 columns:
...
https://www.gbif.org/zh-tw/dataset/f170f056-3f8a-4ef3-ac9f-4503cc854ce0
A dataframe record BBS Taiwan extendedmeasurementorfact, which contains info for associated occurrence record, such as time, location. This is a raw dataset, which was downloaded directly from GBIF without any wrangling or cleaning.
extendedmeasurementorfact
extendedmeasurementorfact
A data frame with 1,649,589 rows and 7 columns:
...
https://www.gbif.org/zh-tw/dataset/f170f056-3f8a-4ef3-ac9f-4503cc854ce0
A dataframe record BBS Taiwan measurementorfacts, which contains info for associated event record, such as time, location. This is a raw dataset, which was downloaded directly from GBIF without any wrangling
measurementorfacts
measurementorfacts
A data frame with 1,649,589 rows and 7 columns:
...
https://www.gbif.org/zh-tw/dataset/f170f056-3f8a-4ef3-ac9f-4503cc854ce0
A dataframe record BBS Taiwan occurrence info. This is a raw dataset, which was downloaded directly from GBIF without any wrangling or cleaning.
occurrence
occurrence
A data frame with 385,131 rows and 11 columns:
...
https://www.gbif.org/zh-tw/dataset/f170f056-3f8a-4ef3-ac9f-4503cc854ce0
A raster in dataframe xyz format, representing the elevation of Taiwan in 1m by 1m grids. The data were reprojected to WGS84 (EPSG:4326).
tw_elev
tw_elev
A data frame with 38,575 rows and 3 columns:
scientific name
all possible Chinese that were used for the species
english name from Taiwan Wild Bird Federation
...
https://github.com/WanJyunChen/Taiwan_environmental_dataset
A sf file created by reading in shape file, showing the outline of Taiwan. The crs is WGS84 (EPSG:4326).
tw_map
tw_map
A sf object with 1 feature and 67 fields
https://geodata.libraries.mit.edu
There are three regions: North, West, and East, representing different ecosystems in Taiwan specifically for avian biodiversity. This map was developed by Hau-Jie Shiu in 2003.
tw_region
tw_region
Need more info