Checking for non-preferred file/folder path names (may take a long time depending on the number of files/folders) ...

Hydroinformatics Instruction Module Example Code: Databases and SQL in Python

Owners: This resource does not have an owner who is an active HydroShare user. Contact CUAHSI ( for information on this resource.
Type: Resource
Storage: The size of this resource is 358.6 MB
Created: Jan 28, 2022 at 11:25 p.m.
Last updated: Mar 21, 2022 at 8:46 p.m.
Citation: See how to cite this resource
Sharing Status: Public
Views: 755
Downloads: 59
+1 Votes: Be the first one to 
Comments: No comments (yet)


This resource contains Jupyter Notebooks with examples that illustrate how to work with SQLite databases in Python including database creation and viewing and querying with SQL. The resource is part of set of materials for hydroinformatics and water data science instruction. Complete learning module materials are found in HydroLearn: Jones, A.S., Horsburgh, J.S., Bastidas Pacheco, C.J. (2022). Hydroinformatics and Water Data Science. HydroLearn.

This resources consists of 3 example notebooks and a SQLite database.

1. Example 1: Querying databases using SQL in Python
2. Example 2: Python functions to query SQLite databases
3. Example 3: SQL join, aggregate, and subquery functions

Data files:
These examples use a SQLite database that uses the Observations Data Model structure and is pre-populated with Logan River temperature data.

Subject Keywords


This resource is part of a HydroLearn module for Hydroinformatics and Water Data Science.

Instructions for running code in the CUAHSI JupyterHub:

  1. Click on "Open with" at the top right
  2. Select CUAHSI JupyterHub and agree to terms of use
  3. Select Python as the Server Option
  4. Once JupyterHub opens, click to open the *.ipynb file for the example of interest
  5. Use the Jupyter tools and run code in each cell to retrieve data, generate plots, etc.
  6. Once the CUAHSI JupyterHub is launched, additional files associated with the resources may be opened directly (File -> Open)

Related Resources

This resource belongs to the following collections:
Title Owners Sharing Status My Permission
Hydroinformatics Instruction Modules Example Code Amber Jones  Public &  Shareable Open Access


Funding Agencies

This resource was created using funding from the following sources:
Agency Name Award Title Award Number
National Science Foundation Collaborative Research: Elements: Advancing Data Science and Analytics for Water (DSAW) 1931297

How to Cite

Jones, A. S., J. S. Horsburgh, C. J. Bastidas Pacheco (2022). Hydroinformatics Instruction Module Example Code: Databases and SQL in Python, HydroShare,

This resource is shared under the Creative Commons Attribution CC BY.


There are currently no comments

New Comment