clean_legacy_landings: Clean SFF landings data

View source: R/clean-raw-data.R

clean_legacy_landingsR Documentation

Clean SFF landings data

Description

Legacy landings data frame has a different structure and uses a different syntax from recent landings. This function restructures legacy raw data to the same format and syntax as recent landings.

Usage

clean_legacy_landings(x)

Arguments

x

Data frame containing raw data from legacy landings (SSF landings).

Value

Data frame containing legacy landings data in the same syntax as recent landings.

Examples

## 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_legacy_landings(legacy_raw)

## End(Not run)

WorldFishCenter/peskas.timor.data.pipeline documentation built on April 14, 2025, 1:47 p.m.