NewGraphEnvironment / dff-2022

Building digital field forms and processing data collected using R, postgresql, QGIS and other tools
Creative Commons Zero v1.0 Universal
0 stars 3 forks source link

parse QGIS `qlr` (`xml`) to `csv` and `csv` to `xml` #81

Open NewGraphEnvironment opened 1 year ago

NewGraphEnvironment commented 1 year ago

qlr files are xml

Maybe its just way to complicated to actually pull of but ideally we can hold some or all parameters as tables which we could store as csvs so that we have the flexibility to manipulate (and track changes) for aliases, widget type, ranges, constraints etc. the simplist way possible. This also allows us the ability for rational workflows to report out on what all was collected....

a few options here https://github.com/topics/xml-to-csv

NewGraphEnvironment commented 1 year ago

always on my mind with this stuff is how it all plays/leverages with postgres and bcdata

test.sh

bcdata info WHSE_FISH.PSCIS_ASSESSMENT_SVW > whse_fish.pscis_assessment_svw_metadata.json

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))
NewGraphEnvironment commented 1 year ago

workaround for exporting aliases Export from layer to Excel in QGIS with alias fields

hack to add them in to qlr Adding field aliases from CSV in QGIS