clean_updated_landings: Clean Updated (Peskas 2) landings data

clean_updated_landingsR Documentation

Clean Updated (Peskas 2) landings data

Description

New Peskas 2 survey landings include some new questions and some new edits. This function facilitates the integration of the new survey data with the legacy ones.

Usage

clean_updated_landings(x)

Arguments

x

Data frame containing raw data from updated landings (Peskas 2).

Value

Data frame containing updated landings data in the same syntax as old landings.

Examples

## Not run: 
authentication_details <- readLines("location_of_json_file.json")
# obtain the latest version of all files corresponding to timor-landings-v1
peskas2_data <-
  cloud_object_name(
    prefix = "timor-landings-v3",
    version = "latest",
    provider = "gcs",
    options = list(
      service_account_key = authentication_details,
      bucket = "my-bucket"
    )
  )

peskas2_raw <-
  readr::read_csv(file = peskas2_data, col_types = readr::cols(.default = readr::col_character()))

clean_updated_landings(legacy_raw)

## End(Not run)

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