@@ -3,32 +3,33 @@ import yaml
33conda : "requirements.yaml"
44configfile : "conf/config.yaml"
55
6- year = config ["shapefile_year " ]
6+ tag = config ["shapefile_tag " ]
77polygon_name = config ["shapefile_polygon_name" ]
88
99rule all :
1010 input :
11- f"data/output/climate_types_raster2polygon/climate_types_{ polygon_name } _{ year } .parquet"
11+ f"data/output/climate_types_raster2polygon/climate_types_{ polygon_name } _{ tag } .parquet"
1212
1313rule download_climate_types :
1414 output :
1515 f"data/input/climate_types/{ config ['climate_types_file' ]} "
1616 shell :
1717 "python src/download_climate_types.py"
1818
19- rule download_shapefiles :
20- output :
21- f"data/input/shapefiles/shapefile_{ polygon_name } _{ year } /shapefile.shp" #ext = ["shp", "shx", "dbf", "prj", "cpg", "xml"]
22- shell :
23- f"python src/download_shapefile.py shapefile_year={ year } shapefile_polygon_name={ polygon_name } "
19+ # temporarily removing download step in snakemake
20+ # rule download_shapefiles:
21+ # output:
22+ # f"data/input/shapefiles/shapefile_{polygon_name}_{tag}/shapefile.shp" #ext = ["shp", "shx", "dbf", "prj", "cpg", "xml"]
23+ # shell:
24+ # f"python src/download_shapefile.py shapefile_tag={tag} shapefile_polygon_name={polygon_name}"
2425
2526rule aggregate_climate_types :
2627 input :
2728 f"data/input/climate_types/{ config ['climate_types_file' ]} " ,
28- f"data/input/shapefiles/shapefile_{ polygon_name } _{ year } /shapefile.shp"
29+ f"data/input/shapefiles/shapefile_{ polygon_name } _{ tag } /shapefile.shp"
2930 output :
30- f"data/output/climate_types_raster2polygon/climate_types_{ polygon_name } _{ year } .parquet" ,
31- f"data/intermediate/climate_pcts/climate_pcts_{ polygon_name } _{ year } .json" ,
32- f"data/intermediate/climate_pcts/climate_types_{ polygon_name } _{ year } .csv"
31+ f"data/output/climate_types_raster2polygon/climate_types_{ polygon_name } _{ tag } .parquet" ,
32+ f"data/intermediate/climate_pcts/climate_pcts_{ polygon_name } _{ tag } .json" ,
33+ f"data/intermediate/climate_pcts/climate_types_{ polygon_name } _{ tag } .csv"
3334 shell :
34- f"python src/aggregate_climate_types.py shapefile_year= { year } shapefile_polygon_name={ polygon_name } "
35+ f"python src/aggregate_climate_types.py shapefile_tag= { tag } shapefile_polygon_name={ polygon_name } "
0 commit comments