Skip to content

Commit

Permalink
towards paper_fig viz
Browse files Browse the repository at this point in the history
  • Loading branch information
jsta committed Apr 16, 2024
1 parent d45dc10 commit adcad47
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,5 @@ results/*.tif
results/*.csv
results/*.shx
data
hydropop/config.py
hydropop/config.py
config.py
7 changes: 6 additions & 1 deletion docs/paper_fig/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# https://code.earthengine.google.com/

all:
all: data figures

data:
python hydropop/dev/end_to_end_new.py \
--pop_breaks -11 -10 -4 0 100 \
--hthi_breaks -0.01 0.4 0.7 1.01 \
Expand All @@ -25,6 +27,9 @@ all:
--path_bounding_box data/roi_small.gpkg \
--run_name fine_fine_small

figures: docs/paper_fig/paper_fig.py
python $<

clean:
-@rm ../../results/*.tif
-@rm ../../results/*.cpg
Expand Down
13 changes: 13 additions & 0 deletions docs/paper_fig/paper_fig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import geopandas as gpd
import matplotlib.pyplot as plt

run_names = ["coarse_coarse_small", "coarse_fine_small", "fine_coarse_small", "fine_fine_small"]
run_name = run_names[3]

path_gpkg = "results/" + run_name + "/" + run_name + "_hpus.gpkg"

dt = gpd.read_file(path_gpkg)
# results/{run_name}/{run_name}_hpu_classes.gpkg

dt.plot()
plt.savefig("test.pdf")
2 changes: 1 addition & 1 deletion hydropop/streamflow/selecting_gages.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import geopandas as gpd

sys.path.append(".")
from hydropop import config
import config
config.vote_db()
from VotE.streamflow import export_streamflow as es

Expand Down

0 comments on commit adcad47

Please sign in to comment.