Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RY4GIT committed May 21, 2024
0 parents commit 914f600
Show file tree
Hide file tree
Showing 23 changed files with 9,086 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
*.pdf
*.pptx
*.bk
*.URL
*.xlsx
*.jpeg
*.jpg
*.png
*.docx
*.xlsx
*.nc
*.pyc

src/config.ini
src/cmd.txt
src/auth.json
src/utils/hide_copyright_info.ipynb

## VS CODE
.vscode
.vscode/*
# !.vscode/settings.json
# !.vscode/tasks.json
# !.vscode/launch.json
# !.vscode/extensions.json
# *.code-workspace
# */.vscode/*

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*/__pycache__/
*.py[cod]
*$py.class
# **/__pycache__/* # old version

# Jupyter notebook
*-checkpoint.ipynb
.ipynb_checkpoints
*/.ipynb_checkpoints/*

# IPython
profile_default/
ipython_config.py


### macOS ###
# General
.DS_Store/
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# operating system-related files
# file properties cache/storage on macOS
*.DS_Store
# thumbnail cache on Windows
Thumbs.db

#
notebooks/Interactive-1.ipynb
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Ryoko Araki & Hilary McMillan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[![alt text](/readme/perceptual_model.PNG?raw=true)](http://www.mcmillanhydrology.org/PerceptualModelDashboard.html)
# Perceptual Model Database
This repo contains a released version of the perceptual data model database from https://doi.org/10.1002/hyp.14845.
Visualization is available as **[the perceptual model interactive map](http://www.mcmillanhydrology.org/PerceptualModelDashboard.html)** :world_map:

## Installation/Getting Started
1. Create your environment
Use Conda to create an environment
```
conda env create -f environment.yml
```
Or use the `environment_minimal.yml` if it fails.

2. Building the database
To build the SQL database based on the raw data in the `data` directory, run the following code in order:
- `0-debug_excelsheets.ipynb`
- `1-build_database.ipynb`

### Create webmap
`src/webmap` contains example scripts that are used to create [the ArcGIS interactive webmap](http://www.mcmillanhydrology.org/PerceptualModelDashboard.html).
To initiate the webmap after building the SQL database:
- Run `init_create_webmap.ipynb` to initiate a webmap
- Or, run `update_webmap.ipynb` to update an existing webmap

### Other utilities
`src/utils` contains other utilities:
- `calc_stats.sql` holds query scripts to calculate statistics used in [the paper](https://doi.org/10.1002/hyp.14845)
- Use `debug_built_database.sql` to debug the database if the SQL database or code (`1-build_database.ipynb`) are not working as expected

## Resources
- [The database design (ER diagram)](https://dbdiagram.io/d/63f6895b296d97641d830705)
- [The hydrologic process taxonomy used in the analysis](http://mcmillanhydrology.org/ProcessTaxonomy/ProcessTaxonomyDiagram.html)

### Contact
We are looking to add more perceptual models to our database and develop better design codes for perceptual models through community effort! Both texts and illustrations are welcome.
- If you find perceptual models to be included in the map or want to discuss the model, contact:
- **Hilary McMillan** (hmcmillan (at) sdsu (dot) edu)
- If you have questions about the technical details of the map, contact:
- **Ryoko Araki** (raraki8159 (at) sdsu (dot) edu)

### Acknowledgement
I appreciate [Jessica](https://github.com/jlembury), Atsushi, and [Kyle](https://github.com/kylelmh) for helping me with the coding!

## Citation
```
@ARTICLE{McMillan2022,
title = {How do hydrologists perceive watersheds? A survey and analysis of perceptual model figures for experimental watersheds},
author = {Hilary McMillan and Ryoko Araki and Sebastian Gnann and Ross Woods and Thorsten Wagener},
journal = {Hydrological Processes},
doi = {10.1002/hyp.14845},
year = {2022},
volume = {37},
number = {3},
pages = {e14845},
url = {https://doi.org/10.1002/hyp.14845}
}
```
10 changes: 10 additions & 0 deletions data/FunctionType.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name
Store
"Store, temporary"
"Store characteristics, temporary"
"Store characteristics, permanent"
Filling of store
Release from store
In-catchment flux
In-store flux
Release
Loading

0 comments on commit 914f600

Please sign in to comment.