knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
Extra functions to interact with the GIS module of LAGOSUS.
Easy: Convenience functions allow for straight-forward subsetting.
Fast: Queries are optimized for speed to avoid loading the entirety of massive layers.
Flexible : Custom queries can be constructed using SQL
statements.
remotes::install_github("cont-limno/LAGOSUSgis")
library(LAGOSUSgis)
# lagosusgis_get()
Until data is posted publicly, place the LAGOSUSgis
geodatabase file in the location returned by lagosusgis_path()
library(sf) sf::st_layers(LAGOSUSgis::lagosusgis_path())
library(details) ly <- sf::st_layers(LAGOSUSgis:::lagosusgis_path()) details( knitr::kable(data.frame(ly[c("name", "driver", "features", "fields")])), summary = "layers")
res_lake <- query_lake_poly(34352)
res_iws <- query_gis(layer = "ws", id_name = "lagoslakeid", ids = c(34352)) res_lake <- query_gis(layer = "LAGOS_US_All_Lakes_1ha", id_name = "lagoslakeid", ids = 34352) res_pnt <- query_gis(layer = "LAGOS_US_All_Lakes_1ha_POINTS", id_name = "lagoslakeid", ids = 34352)
res <- query_wbd(lagoslakeid = c(7010))
SQL
statementsres <- query_gis_(query = "SELECT * FROM ws WHERE lagoslakeid IN ('7010')") res <- query_gis_(query = paste0("SELECT * FROM LAGOS_US_All_Lakes_1ha_points WHERE lake_centroidstate LIKE '", "RI", "' AND lake_totalarea_ha > 4"))
Soranno P., K. Cheruvelil. 2017. LAGOS-NE-GIS v1.0: A module for LAGOS-NE, a multi-scaled geospatial and temporal database of lake ecological context and water quality for thousands of U.S. Lakes: 2013-1925. Environmental Data Initiative. http://dx.doi.org/10.6073/pasta/fb4f5687339bec467ce0ed1ea0b5f0ca. Dataset accessed 9/26/2017.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.