dwc_csv_files <- export_dwc_csv(dwc_objects)02 Export outputs
1 Introduction
This document writes the derived files used for publication and for the website. The code stays visible so the full export can be read from top to bottom without opening other files.
The export has two parts:
- Darwin Core files for publication through GBIF
- JSON files used by the dashboard on the project website
2 Export DWC
2.1 Export event and occurrence tables
This chunk writes the two main Darwin Core CSV files. The event table contains one row per survey event, while the occurrence table contains one row per taxon count linked back to its event with eventID.
The files written by this step are:
The event export is built from survey-level metadata such as date, site, timing, coordinates, and count coverage. The occurrence export then joins the bird records to the species lookup and AviList reference so the published file has the expected taxonomic fields.
2.2 Export metadata
This chunk writes the EML metadata file that accompanies the Darwin Core tables. The XML is generated from the template in data/raw/, then refreshed with the current publication date, summary numbers, coverage dates, taxonomic summary, and field lists from the newly created export objects.
dwc_eml_file <- export_dwc_eml(data_objects, dwc_objects)The resulting XML is the metadata record used for the dataset landing page and for publication through GBIF.
3 Export dashboard
The final step writes the JSON files used by the website dashboard. These files reorganize the event, occurrence, species lookup, and summary data into a format that can be loaded directly by the Vue app.
dashboard_files <- export_dashboard_json(dwc_objects)This keeps the dashboard separate from the Darwin Core publication files while still deriving both outputs from the same checked source spreadsheet.