LakePy
Pythonic user-centered front-end to the Global Lake Level Database.
https://github.com/ESIPFed/LakePy
Category: Hydrosphere
Sub Category: Freshwater and Hydrology
Last synced: about 2 hours ago
JSON representation
Repository metadata
A global lake level database
- Host: GitHub
- URL: https://github.com/ESIPFed/LakePy
- Owner: ESIPFed
- License: mit
- Created: 2020-12-17T05:04:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-18T03:07:35.000Z (about 3 years ago)
- Last Synced: 2025-04-17T21:24:13.183Z (10 days ago)
- Language: Jupyter Notebook
- Size: 17.9 MB
- Stars: 35
- Watchers: 4
- Forks: 3
- Open Issues: 0
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- License: LICENSE.md
README.md
LakePy
LakePy is the pythonic user-centered front-end to the Global Lake Level Database. This package can instantly
deliver lake water levels for some 2000+ lakes scattered across the globe. Data comes from three sources (so far!)
- United States Geological Survey National Water Information System
- United States Department of Agriculture: Foreign Agricultural Service's G-REALM Database
- Theia's HydroWeb Database
Funding for this work comes from the Earth Science Information Partners (ESIP) Winter 2020 Grant
See the funded proposal here
Motivation
Lake level data is incredibly important to federal and local governments, scientists, and citizens. Until now,
accessing lake level data involves laborious data-preparation and wrangling. We aim to provide this data quickly
and on-demand.
Software Used
Built with
Quickstart
- For a full API Reference, please consult LakePy's documentation
- For a list of Lakes with corresponding ID numbers, see the Lake Reference List
Installation
pip install lakepy
if you are using conda for package management you can
still use pip!
Searching the Global Lake Level Database
The database can be searched using a name, a source ("grealm", "hydroweb", or "usgs"), or an identification number
. The best practice for searching is to first specify a name.
Let's search for Lake Mead instantiating a Lake() object.
import lakepy as lk
my_lake = lk.search("mead")
If there is more than one Lake matching "Mead", the search function will return a RuntimeWarning and display a table.
"Search Result: 'Mead' has more than 1 Result. Showing the 2 most relevant results.
Specify 'id_No' or narrow search name."
id_No | source | lake_name | |
---|---|---|---|
0 | 138 | hydroweb | Mead |
1 | 1556 | usgs | MEAD LAKE WEST BAY NEAR WILLARD, WI |
We will select id_No 138 corresponding to Lake Mead from HydroWeb's database and re-run our search 1 of 2 ways:
- Specify the id_No explicitly as a string
my_lake = lk.search(id_No = "138")
- Specify a name and a source
my_lake = lk.search(name="mead", source="hydroweb", markdown=True)
We highly recommend specifying an id_No whenever possible to avoid issues with similarly named lakes. Either way
, the search returns a metadata markdown dataframe
id_No | source | lake_name | basin | status | country | end_date | latitude | longitude | identifier | start_date | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 138 | hydroweb | Mead | Colorado | research | USA | 2014-12-29 00:21 | 36.13 | -114.45 | L_mead | 2000-06-14 10:22 |
It is important to note that different databases will return different types and amounts of metadata. Currently
latitude & longitude are only available from the USGS and HydroWeb databases, but GREALM lakes will soon have them!
Lake() object
The "my_lake" variable is now an object of class Lake() which comes with several attributes
- name
- country
- continent (currently not supported for HydroWeb)
- source
- original_id
- id_No
- observation_period
- latitude (currently not supported for G-REALM)
- longitude (currently not supported for G-REALM)
- misc_data
- dataframe
- data
importantly, my_lake.dataframe and my_lake.data are pandas dataframe instances with associated methods
my_lake.dataframe.describe().to_markdown()
water_level | |
---|---|
count | 119 |
mean | 342.807 |
std | 7.34547 |
min | 330.75 |
25% | 337.905 |
50% | 342.26 |
75% | 347.555 |
max | 365.43 |
Plotting
LakePy allows for native time series plotting as well as map-view plots
my_lake.plot_timeseries()
Seaborn/Matplotlib
my_lake.plot_timeseries(how='seaborn')
my_lake.plot_mapview()
API Reference
Please refer to the LakePy documentation
Contribute
We would love your help in making this project better. Please refer to our
contribution guide to learn how.
Citing LakePy
Please consider citing us if you use LakePy in your research! The recommended citation is:
James Gearon, & John Franey. (2021, January 4). ESIPFed/LakePy v2.1.0 (Version v2.1.0). Zenodo. http://doi.org/10.
5281/zenodo.4415936
Credits
This work is based on funding provided by the ESIP Lab with support from the National Aeronautics and Space
Administration (NASA), National Oceanic and Atmospheric Administration (NOAA) and the United States Geologic
Survey (USGS). LakePy received additional, generous support in 2021 from Derek Masaki and Farial Shahnaz. Many thanks to them.
License
Owner metadata
- Name: ESIP
- Login: ESIPFed
- Email: [email protected]
- Kind: organization
- Description: Earth Science Information Partners (ESIP)
- Website: http://esipfed.org
- Location: United States
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/3588047?v=4
- Repositories: 59
- Last ynced at: 2023-03-22T07:25:55.822Z
- Profile URL: https://github.com/ESIPFed
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers metadata
Last synced: 5 days ago
Total Commits: 166
Total Committers: 5
Avg Commits per committer: 33.2
Development Distribution Score (DDS): 0.416
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
jakegearon | u****t | 97 |
jakegearon | j****n@g****m | 48 |
franathan1 | f****6@g****m | 17 |
ESIP Lab | a****s@e****g | 3 |
Filipe Fernandes | o****f@g****m | 1 |
Committer domains:
- esipfed.org: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 0
Total pull requests: 1
Average time to close issues: N/A
Average time to close pull requests: about 1 hour
Total issue authors: 0
Total pull request authors: 1
Average comments per issue: 0
Average comments per pull request: 1.0
Merged pull request: 1
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
Top Pull Request Authors
- ocefpaf (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 2
-
Total downloads:
- pypi: 920 last-month
- Total dependent packages: 0 (may contain duplicates)
- Total dependent repositories: 1 (may contain duplicates)
- Total versions: 25
- Total maintainers: 1
pypi.org: lakepy
Provides access to the Global Lake Level Database and extended functionality for lake water level analysis
- Homepage: https://github.com/ESIPFed/LakePy
- Documentation: https://lakepy.readthedocs.io/
- Licenses: MIT License
- Latest release: 2.2.1 (published over 3 years ago)
- Last Synced: 2025-04-26T12:32:24.275Z (1 day ago)
- Versions: 24
- Dependent Packages: 0
- Dependent Repositories: 1
- Downloads: 920 Last month
-
Rankings:
- Dependent packages count: 7.373%
- Stargazers count: 11.161%
- Average: 15.8%
- Forks count: 16.958%
- Downloads: 21.274%
- Dependent repos count: 22.233%
- Maintainers (1)
conda-forge.org: lakepy
- Homepage: https://github.com/ESIPFed/LakePy
- Licenses: MIT
- Latest release: 2.2.1 (published over 3 years ago)
- Last Synced: 2025-04-01T02:08:28.108Z (27 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 34.025%
- Stargazers count: 41.098%
- Average: 44.486%
- Dependent packages count: 51.175%
- Forks count: 51.645%
Score: 11.991331197480108