{"id":13948506,"url":"https://github.com/cont-limno/LAGOSNE","last_synced_at":"2025-07-20T10:30:55.020Z","repository":{"id":56935423,"uuid":"68831931","full_name":"cont-limno/LAGOSNE","owner":"cont-limno","description":"Interface to the LAke multi-scaled GeOSpatial \u0026 temporal database :earth_americas:","archived":false,"fork":false,"pushed_at":"2023-06-17T00:34:09.000Z","size":30541,"stargazers_count":15,"open_issues_count":3,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-07T01:03:19.001Z","etag":null,"topics":["cran","ecology","geoscience","limnology","rstats","water-quality"],"latest_commit_sha":null,"homepage":"https://cont-limno.github.io/LAGOSNE/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cont-limno.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-09-21T15:37:29.000Z","updated_at":"2024-01-22T14:39:36.000Z","dependencies_parsed_at":"2023-09-21T19:33:09.010Z","dependency_job_id":"390b54d0-3b6f-4762-a92e-2d5ebbe2a424","html_url":"https://github.com/cont-limno/LAGOSNE","commit_stats":{"total_commits":618,"total_committers":7,"mean_commits":88.28571428571429,"dds":0.5339805825242718,"last_synced_commit":"11632995a0aa50a734cb52f688ed309241ecf073"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/cont-limno/LAGOSNE","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cont-limno%2FLAGOSNE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cont-limno%2FLAGOSNE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cont-limno%2FLAGOSNE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cont-limno%2FLAGOSNE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cont-limno","download_url":"https://codeload.github.com/cont-limno/LAGOSNE/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cont-limno%2FLAGOSNE/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265103414,"owners_count":23711705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cran","ecology","geoscience","limnology","rstats","water-quality"],"created_at":"2024-08-08T05:01:24.076Z","updated_at":"2025-07-20T10:30:54.947Z","avatar_url":"https://github.com/cont-limno.png","language":"R","funding_links":[],"categories":["Hydrosphere"],"sub_categories":["Freshwater and Hydrology"],"readme":"---\noutput: github_document\neditor_options: \n  chunk_output_type: console\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\"\n)\n```\n\n[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![R-CMD-check](https://github.com/cont-limno/LAGOSNE/actions/workflows/R-CMD-check.yml/badge.svg)](https://github.com/cont-limno/LAGOSNE/actions/workflows/R-CMD-check.yml) [![CRAN\\_Status\\_Badge](http://www.r-pkg.org/badges/version/LAGOSNE)](https://cran.r-project.org/package=LAGOSNE) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/LAGOSNE)](https://cran.r-project.org/package=LAGOSNE) \n\n[![NSF-1065786](https://img.shields.io/badge/NSF-1065786-blue.svg)](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1065786) [![NSF-1638679](https://img.shields.io/badge/NSF-1638679-blue.svg)](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1638679) [![NSF-1065649](https://img.shields.io/badge/NSF-1065649-blue.svg)](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1065649) [![NSF-1065818](https://img.shields.io/badge/NSF-1065818-blue.svg)](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1065818) [![NSF-1638554](https://img.shields.io/badge/NSF-1638554-blue.svg)](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1638554)\n\n# LAGOSNE \u003cimg src=\"man/figures/logo.png\" align=\"right\" height=140/\u003e\n\nThe `LAGOSNE` package provides an R interface to download LAGOS-NE data, store this data locally, and perform a variety of filtering and subsetting operations.\n\nLAGOS-NE contains data for 51,101 lakes and reservoirs larger than 4 ha in 17 lake-rich US states. The database includes 3 data modules for: lake location and physical characteristics for all lakes; ecological context (i.e., the land use, geologic, climatic, and hydrologic setting of lakes) for all lakes; and in situ measurements of lake water quality for a subset of the lakes from the past 3 decades for approximately 2,600-12,000 lakes depending on the variable (see Soranno et al. 2017 [below](https://github.com/cont-limno/LAGOSNE#references)).\n\n## Installation\n\n```{r install,eval=FALSE}\n# install stable version from CRAN\ninstall.packages(\"LAGOSNE\")\n\n# install development version from Github\n# install devtools if not found - install.packages(\"devtools\")\n# devtools::install_github(\"cont-limno/LAGOSNE\", dependencies = TRUE)\n```\n \n### Data\n\nThe `lagosne_get` function downloads the LAGOSNE files corresponding to the specified version from the [EDI data repository](https://portal.edirepository.org/nis/home.jsp). Files are stored in a temporary directory before being \"compiled\" to an `R` data format in the location specified by the `dest_folder` argument. Recommended setting is `lagos_path()`. Data only needs to be downloaded one time per version per machine. Each `LAGOSNE` [module](https://cont-limno.github.io/LAGOSNE/articles/lagosne_structure.html) has a unique version number. However, only the limno module has been dynamically updated. Therefore the `LAGOSNE` `R` package uses the limno module version number to check-out specific datasets. **The latest version of the `LAGOSNE` dataset is `r LAGOSNE::lagosne_version()`.**\n\n```{r get_data, eval=FALSE}\nlibrary(LAGOSNE)\nlagosne_get(dest_folder = lagos_path())\n```\n\n## Usage\n\n### Load Package\n\n```{r load_library} \nlibrary(LAGOSNE)\n```\n\n### Load data\n\nThe `lagosne_load` function returns a named list of `data.frame` objects. Use the `names()` function to see a list of available data frames `names(dt)`.\n\n```{r load_data, eval=FALSE}\ndt \u003c- lagosne_load()\nnames(dt)\n```\n\n```{r load_data_cached, eval=TRUE, echo=FALSE}\ndt \u003c- readRDS(system.file(\"lagos_test_subset.rds\", package = \"LAGOSNE\"))\nnames(dt)\n```\n\n#### Locate tables containing a variable \n```{r eval=FALSE}\nquery_lagos_names(\"secchi\")\n```\n\n```{r echo=FALSE}\nquery_lagos_names(\"secchi\", dt = dt)\n```\n\n#### Preview a table\n\n```{r preview table}\nhead(dt$state)\n```\n\n#### Preview a specific lake\n\n```{r lake_info, eval = FALSE}\nlake_info(name = \"Pine Lake\", state = \"Iowa\")\n# or using a lagoslakeid\n# lake_info(lagoslakeid = 4389)\n```\n\n```{r lake_info_cached, echo = FALSE}\nsuppressWarnings(\n  lake_info(name = \"Pine Lake\", state = \"Iowa\", dt = dt)\n  )\n```\n\n#### Read table metadata\n\n```{r load printr, echo=FALSE,message=FALSE,results='hide'}\nloadNamespace(\"printr\")\n```\n\n```{r Read metadata for individual tables}\nhelp.search(\"datasets\", package = \"LAGOSNE\")\n```\n\n```{r unload printr, echo=FALSE}\nunloadNamespace(\"printr\")\n```\n\n### Select data\n\n`lagosne_select` is a convenience function whose primary purpose is to provide users with the ability to select subsets of LAGOS tables that correspond to specific keywords (see `LAGOSNE:::keyword_partial_key()` and `LAGOSNE:::keyword_full_key()`). See [here](http://adv-r.had.co.nz/Subsetting.html) for a comprehensive tutorial on generic `data.frame` subsetting.\n\n```{r demo_select, eval=TRUE}\n# specific variables\nhead(lagosne_select(table = \"epi_nutr\", vars = c(\"tp\", \"tn\"), dt = dt))\nhead(lagosne_select(table = \"iws.lulc\", vars = c(\"iws_nlcd2011_pct_95\"), dt = dt))\n\n# categories\nhead(lagosne_select(table = \"locus\", categories = \"id\", dt = dt))\nhead(lagosne_select(table = \"epi_nutr\", categories = \"waterquality\", dt = dt))\nhead(lagosne_select(table = \"hu4.chag\", categories = \"deposition\", dt = dt)[,1:4])\n\n# mix of specific variables and categories\nhead(lagosne_select(table = \"epi_nutr\", vars = \"programname\", \n                    categories = c(\"id\", \"waterquality\"), dt = dt))\n```\n\n## Published LAGOSNE subsets\n\n```{r demo_pulling_other, eval = FALSE}\n# Oliver et al. 2015\nlagos_get_oliver_2015()\nhead(lagos_load_oliver_2015())\n\n# Collins et al. 2017\nlagos_get_collins_2017()\nhead(lagos_load_collins_2017())\n```\n\n## Legacy Versions\n\n### R Package\n\nTo install versions of `LAGOSNE` compatible with older versions of LAGOS-NE run the following command where `ref` is set to the desired version (in the example, it is version 1.087.1):\n\n```{r eval=FALSE}\n# install devtools if not found\n# install.packages(\"devtools\")\ndevtools::install_github(\"cont-limno/LAGOSNE\", ref = \"v1.087.1\")\n```\n\n## References\n\nOliver, SK, PA Soranno, CE Fergus, T Wagner, K Webster, CE Scott, LA Winslow, J Downing, and EH Stanley. 2015. “LAGOS - Predicted and Observed Maximum Depth Values for Lakes in a 17-State Region of the U.S.” https://dx.doi.org/10.6073/pasta/edc06bbae6db80e801b6e52253f2ea09.\n\nSoranno, P.A., Bacon, L.C., Beauchene, M., Bednar, K.E., Bissell, E.G., Boudreau, C.K., Boyer, M.G., Bremigan, M.T., Carpenter, S.R., Carr, J.W. Cheruvelil, K.S., and ... , 2017. LAGOS-NE: A multi-scaled geospatial and temporal database of lake ecological context and water quality for thousands of US lakes. GigaScience, https://doi.org/10.1093/gigascience/gix101\n\nSoranno, PA, EG Bissell, KS Cheruvelil, ST Christel, SM Collins, CE Fergus, CT Filstrup, et al. 2015. “Building a Multi-Scaled Geospatial Temporal Ecology Database from Disparate Data Sources: Fostering Open Science and Data Reuse.” Gigascience 4 (1). https://dx.doi.org/10.1186/s13742-015-0067-4.\n\nStachelek J., Oliver S. 2017. LAGOSNE: Interface to the Lake Multi-scaled Geospatial and Temporal Database. R package version 1.1.0. https://cran.r-project.org/package=LAGOSNE\n\nSoranno P, Cheruvelil K. 2017. LAGOS-NE-LOCUS v1.01: 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: 1925–2013. Environmental Data Initiative. https://doi.org/10.6073/PASTA/0C23A789232AB4F92107E26F70A7D8EF\n\nSoranno P, Cheruvelil K. 2019. LAGOS-NE-LIMNO v1.087.3: 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: 1925–2013. Environmental Data Initiative. https://doi.org/10.6073/PASTA/08C6F9311929F4874B01BCC64EB3B2D7.\n\nSoranno P, Cheruvelil K. 2017. LAGOS-NE-GEO v1.05: 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: 1925–2013. Environmental Data Initiative. https://doi.org/10.6073/PASTA/16F4BDAA9607C845C0B261A580730A7A\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcont-limno%2FLAGOSNE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcont-limno%2FLAGOSNE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcont-limno%2FLAGOSNE/lists"}