variables <- readr::read_csv(here::here("data-raw", "wood-survey-data-master",
"NEON_vst_variables.csv"),
col_types = readr::cols(.default = "c")) %>%
dplyr::mutate(fieldName = janitor::make_clean_names(fieldName)) %>%
select(fieldName, description, units)
attributes <- readr::read_csv(here::here("data", "metadata", "attributes.csv")) %>%
select(-description, -unitText)
## Rows: 32 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): fileName, variableName
## lgl (2): description, unitText
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
dplyr::left_join(attributes, variables, by = c("variableName" = "fieldName")) %>%
dplyr::rename(unitText = "units") %>%
readr::write_csv(here::here("data", "metadata", "attributes.csv"))