From 998e9ed07419ec8c0a9a1b17c93875c0bbd5f100 Mon Sep 17 00:00:00 2001 From: Jeffrey Hanson Date: Mon, 23 Aug 2021 15:11:06 +1200 Subject: [PATCH] update ontario pilot data this is needed since dots are no longer allowed in names per #145 --- .../projects/ontario_pilot/ontario_pilot.yaml | 8 ++++---- .../ontario_pilot_attribute.csv.gz | Bin 166275 -> 166274 bytes inst/scripts/format-ontario-pilot-data.R | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/inst/extdata/projects/ontario_pilot/ontario_pilot.yaml b/inst/extdata/projects/ontario_pilot/ontario_pilot.yaml index f4d3b6b4..f59bd525 100644 --- a/inst/extdata/projects/ontario_pilot/ontario_pilot.yaml +++ b/inst/extdata/projects/ontario_pilot/ontario_pilot.yaml @@ -171,9 +171,9 @@ themes: limit_goal: 0.0 - name: TNC Crisis Ecosystems (Endangered) feature: - - name: layer.1 + - name: layer_1 variable: - index: layer.1 + index: layer_1 units: '' legend: type: categorical @@ -186,9 +186,9 @@ themes: limit_goal: 0.0 - name: TNC Crisis Ecosystems (Vulnerable) feature: - - name: layer.2 + - name: layer_2 variable: - index: layer.2 + index: layer_2 units: '' legend: type: categorical diff --git a/inst/extdata/projects/ontario_pilot/ontario_pilot_attribute.csv.gz b/inst/extdata/projects/ontario_pilot/ontario_pilot_attribute.csv.gz index d4c439b77a3e9047ea6e40199191709110a27f9c..a01d6301c24de687e39896a04ea695b4468cc784 100644 GIT binary patch delta 272 zcmV+r0q_2UlL~^93V$Dq2mk;800003bMwiT|z23p_@ed{@C+KJA1#t8sAt@;MsW!Qngcq7c1o1`7+$0M31J#W`CRj z%bv-N{;*rZ26KRlL~{A3V$Dq2mk;800003bo}4eR#19q}c(abY6!qBP-3U3hE)O>-!J*Ev+8#y# z(+BjD+W}LF0g-4l%|rY(+eZ#v`a`8~Mt)n&#lJhLEmhhS50{aeoS;od$*rp-b znmk&wp>(|x{-ROBrp>KN&s=I`JrIk{p#EN1vqV_^7R#gC&q>R=_7mqTfdzZHZGT+= Yn})uhegL@~Dglsz{)PSlwf+Kxh;ikJYybcN diff --git a/inst/scripts/format-ontario-pilot-data.R b/inst/scripts/format-ontario-pilot-data.R index b2e5ccf6..b26f7d83 100644 --- a/inst/scripts/format-ontario-pilot-data.R +++ b/inst/scripts/format-ontario-pilot-data.R @@ -68,6 +68,7 @@ idx <- which(names(theme_data) != "R1km_TNC_Crisis_Ecosystems") theme_data <- raster::stack( theme_data[[idx]], tnc_crisis_endangered_raster, tnc_crisis_vulnerable_raster ) +names(theme_data) <- gsub(".", "_", names(theme_data), fixed = TRUE) theme_names <- c( metadata$name[metadata$type == "theme"][idx], "TNC Crisis Ecosystems (Endangered)",