-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnakefile
34 lines (28 loc) · 1.16 KB
/
Snakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
rule all:
input: "output_data/poisson_out_test.csv",
"output_data/poisson_out_train.csv",
"output_data/rf_out_test.csv",
"output_data/rf_out_train.csv",
"output_data/rf_impo_out.csv"
rule model_flood_rf_ps:
input: "input_data/for_model_avgs.csv"
output: "output_data/poisson_out_test.csv",
"output_data/poisson_out_train.csv",
"output_data/rf_out_test.csv",
"output_data/rf_out_train.csv",
"output_data/rf_impo_out.csv"
shell: "Rscript model_flood_counts_rf_ps_cln.r"
# rule to run model analysis
rule process_data:
input: "input_data/hampt_rd_data.sqlite",
"input_data/STORM_data_flooded_streets_2010-2016.csv"
output: "input_data/for_model_avgs.csv"
shell: """
docker build --tag=data_cleaning -f Dockerfile .
docker run -v $(pwd)/:/home/jovyan/project_hydrology data_cleaning
"""
# if data is not present, download it
rule download_db:
input:
output: "input_data/hampt_rd_data.sqlite"
shell:"wget -O input_data/hampt_rd_data.sqlite https://www.hydroshare.org/resource/9e1b23607ac240588ba50d6b5b9a49b5/data/contents/hampt_rd_data.sqlite"