This file describes the steps required to map the data to Darwin Core Description

1 Setup

Load libraries:

2 Read data

  1. Define data types

  2. Read habitat data (raw data)

  3. Read native range (raw data)

  4. Read ecofunctional_group (interim)

  5. Read interim_literature_references (interim)

  6. Read remove_taxa (interim)

  7. Read core_taxa

3 Create transformation functions

The description extension will be a combination of the following descriptors: - habitat - native range - ecofunctional group

Each descriptor is imported as a separate dataset. We need to imply the same transformation steps to each dataset:

  1. Remove all empty values (if applicable)
  2. Keep distinct values only (if applicable)
  3. Map description
  4. Map type
  5. Select relevant columns

As these steps are repeated for each of the description datasets, we write a function here.

4 Habitat

Generate eunis_habitat

Apply transformation function:

5 Native range

6 Ecofunctional group

7 Descriptors extension mapping

  1. Combine habitat, native_range and ecofunctional_group

  2. Link with sourceid from literature_references

  3. Keep column names for description extension only and rename

  4. Remove all taxonID’s that are not included in the taxon core

  5. Scan for duplicated taxa (see this issue):

  1. Change data type of taxonid to numeric:

  2. Sort on taxonid

  3. Preview data:

  1. Export as .csv