get_ems_data | R Documentation |
EMS data are distributed through the BC Data Catalogue under the Open Government License - British Columbia. This function downloads the chosen data ('historic' - 1964-2014, or '2yr' or '4yr') and imports it into your R session. It also caches the data so subsequent loads are much faster - if the data in the Data Catalogue are more current than that in your cache, you will be prompted to update it.
get_ems_data(
which = "2yr",
n = Inf,
cols = "wq",
force = FALSE,
ask = TRUE,
dont_update = FALSE,
check_only = FALSE
)
which |
Defaults to |
n |
how many rows of the data do you want to load? Defaults to all ( |
cols |
which subset of columns to read. Can be |
force |
Default |
ask |
should the function ask for your permission to download and cache data on your computer?
Default |
dont_update |
should the function checking for updates to the data and simply
load the data from the cache? Default |
check_only |
should the function retrieve the data from the cache or
just check it's existence and currency? Default |
cols can specify any of the following column names as a character vector:
"EMS_ID", "MONITORING_LOCATION", "LATITUDE", "LONGITUDE", "LOCATION_TYPE",
"COLLECTION_START", "COLLECTION_END", "LOCATION_PURPOSE", "PERMIT",
"PERMIT_RELATIONSHIP", "DISCHARGE_TO", "REQUISITION_ID", "SAMPLING_AGENCY",
"ANALYZING_AGENCY", "COLLECTION_METHOD", "SAMPLE_CLASS", "SAMPLE_STATE",
"SAMPLE_DESCRIPTOR", "PARAMETER_CODE", "PARAMETER", "ANALYTICAL_METHOD_CODE",
"ANALYTICAL_METHOD", "RESULT_LETTER", "RESULT", "UNIT", "METHOD_DETECTION_LIMIT",
"MDL_UNIT",
"QA_INDEX_CODE", "UPPER_DEPTH", "LOWER_DEPTH", "TIDE", "AIR_FILTER_SIZE",
"AIR_FLOW_VOLUME", "FLOW_UNIT", "COMPOSITE_ITEMS", "CONTINUOUS_AVERAGE",
"CONTINUOUS_MAXIMUM", "CONTINUOUS_MINIMUM", "CONTINUOUS_UNIT_CODE",
"CONTINUOUS_DURATION", "CONTINUOUS_DURATION_UNIT", "CONTINUOUS_DATA_POINTS",
"TISSUE_TYPE", "SAMPLE_SPECIES", "SEX", "LIFE_STAGE", "BIO_SAMPLE_VOLUME",
"VOLUME_UNIT", "BIO_SAMPLE_AREA", "AREA_UNIT", "BIO_SIZE_FROM",
"BIO_SIZE_TO", "SIZE_UNIT", "BIO_SAMPLE_WEIGHT", "WEIGHT_UNIT",
"BIO_SAMPLE_WEIGHT_FROM", "BIO_SAMPLE_WEIGHT_TO", "WEIGHT_UNIT_1",
"SPECIES", "RESULT_LIFE_STAGE"
The default value of cols
is "wq"
, which will return a data
frame with the following columns:
"EMS_ID", "MONITORING_LOCATION", "LATITUDE", "LONGITUDE",
"LOCATION_TYPE", "COLLECTION_START", "LOCATION_PURPOSE", "PERMIT",
"SAMPLE_CLASS", "SAMPLE_STATE", "SAMPLE_DESCRIPTOR", "PARAMETER_CODE",
"PARAMETER", "ANALYTICAL_METHOD_CODE", "ANALYTICAL_METHOD", "RESULT_LETTER",
"RESULT", "UNIT", "METHOD_DETECTION_LIMIT", "QA_INDEX_CODE", "UPPER_DEPTH",
"LOWER_DEPTH"
a data frame or TRUE
if check_only = TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.