diff --git a/.gitignore b/.gitignore index b2876db..9aa7d2a 100644 --- a/.gitignore +++ b/.gitignore @@ -155,4 +155,5 @@ results/*.tif results/*.csv results/*.shx data -hydropop/config.py \ No newline at end of file +hydropop/config.py +config.py \ No newline at end of file diff --git a/docs/paper_fig/Makefile b/docs/paper_fig/Makefile index dc3faba..5cc1c95 100644 --- a/docs/paper_fig/Makefile +++ b/docs/paper_fig/Makefile @@ -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 \ @@ -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 diff --git a/docs/paper_fig/paper_fig.py b/docs/paper_fig/paper_fig.py new file mode 100644 index 0000000..a298971 --- /dev/null +++ b/docs/paper_fig/paper_fig.py @@ -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") diff --git a/hydropop/streamflow/selecting_gages.py b/hydropop/streamflow/selecting_gages.py index e30cc38..d8d9876 100644 --- a/hydropop/streamflow/selecting_gages.py +++ b/hydropop/streamflow/selecting_gages.py @@ -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