View source: R/clean-raw-data.R
clean_catches | R Documentation |
Legacy data (SFF landings) include catches information from different versions of the project. This implies that the same information (same variables) can show a different syntax and/or different column names. This function converts and recodes the information associated with species catches into the same format adopted for more recent landings.
clean_catches(x)
x |
A data frame containing raw legacy landings (SFF landings). |
A data frame containing species catches information in the same syntax as recent landings.
## Not run:
authentication_details <- readLines("location_of_json_file.json")
# obtain the latest version of all files corresponding to timor-landings-v1
legacy_data <-
cloud_object_name(
prefix = "timor-landings-v1",
version = "latest",
provider = "gcs",
options = list(
service_account_key = authentication_details,
bucket = "my-bucket"
)
)
legacy_raw <-
readr::read_csv(file = legacy_data, col_types = readr::cols(.default = readr::col_character()))
clean_catches(legacy_raw)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.