Last active
January 18, 2023 20:27
-
-
Save NewGraphEnvironment/edd97a61915c9d987ee749d140eb79e3 to your computer and use it in GitHub Desktop.
get metadata from bc data catolougue using bcdata. Column names, types and descriptions. Assumes `bcfishpass` virtenv is set up already
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reticulate::use_condaenv('bcfishpass') %>% | |
base::system2(paste0("sh ",getwd(), "/scripts/test.sh")) | |
schema <- jsonlite::fromJSON('data/whse_fish.pscis_assessment_svw_metadata.json', flatten = T) %>% | |
purrr::pluck('schema') %>% | |
dplyr::mutate(column_name = stringr::str_to_lower(column_name)) | |
#within test.sh (unhash second line) is | |
#!/bin/bash | |
# bcdata info WHSE_FISH.PSCIS_ASSESSMENT_SVW > data/whse_fish.pscis_assessment_svw_metadata.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment