Data Management
Keywords
public
Summery
My FILE I/O page has seen quite a bit of scope creep, but the goal there was really to demonstrate that getting to that table/space data is really not that hard. However, the competent practitioner has a few larger standardized bites they typically encounter. Those are what you’ll find here.
Example
How to
Merge HUC8 geopackages
```{r}
potential_files <- file.path(path_to_fim_inputs,"osm","bridges",glue::glue('huc_{dplyr::filter(hucs, grepl(vpu_unit, substr(hucs$huc8, 1, 2)))$huc8}_osm_bridges.gpkg'),fsep = .Platform$file.sep)
found_files <- list.files(file.path(path_to_fim_inputs,"osm","bridges",fsep = .Platform$file.sep),pattern = "*gpkg$",full.names = T)
roadlines <- do.call(dplyr::bind_rows, lapply(potential_files[basename(potential_files) %in% basename(found_files)],
sf::st_read)) %>%
sf::st_transform(sf::st_crs("EPSG:5070"))
```