This repository has been archived by the owner on Jun 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1_spatial.yml
96 lines (75 loc) · 2.83 KB
/
1_spatial.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
target_default: 1_spatial
packages:
- dplyr
- meddle
- rgdal
- sf
- zip
sources:
- src/spatial_functions.R
- src/fetch_filter_functions.R
- src/file_functions.R
targets:
1_spatial:
depends:
- river_metadata
- out_data/study_stream_reaches.zip
- reservoir_metadata
- out_data/study_reservoirs.zip
- out_data/study_monitoring_sites.zip
# not sure what this metadata should be, if anything
# one option is to include a reach to HRU crosswalk
#out_data/river_reach_metadata.csv:
# command: create_metadata_file(target_name,
# streams_sf = modeled_streams_sf,
# stream_to_hru = 'XX')
modeled_network_sf:
command: retrieve_network(network_sf_fl = '../delaware-model-prep/1_network/out/network.rds')
network_vertices_sf:
command: retrieve_vertices(network_sf_fl = '../delaware-model-prep/1_network/out/network.rds')
# should include shapefile of HRUs
#hrus_sf:
#command: retrieve_hrus(hrus_sf_fl = 'XX')
# include map of network, maybe with HRUs?
#out_data/modeling_domain_map.png:
# command: plot_domain_map(target_name,
# network_sf = modeled_network_sf,
#plot_crs = I("+init=epsg:2811"))
river_metadata:
command: extract_feature(network_vertices_sf)
river_metadata2:
command: extract_feature(modeled_network_sf)
out_data/study_stream_reaches.zip:
command: sf_to_zip(target_name,
sf_object = modeled_network_sf,
layer_name = I('study_stream_reaches'))
#out_data/01_spatial_hru.zip:
# command: sf_to_zip(target_name,
# sf_object = hrus_sf,
# layer_name = I('study_hrus'))
network_lordville:
command: readRDS(file = '../delaware-model-prep/9_collaborator_data/umn/network_subset_lordville.rds')
lordville_sites:
command: get_sites(network_lordville)
# Define scope of reservoir modeling data in this repo
reservoir_modeling_site_ids:
command: c(I(c(
Pepacton = 'nhdhr_151957878',
Cannonsville = 'nhdhr_120022743')))
reservoir_polygons:
command: fetch_filter_res_polygons(
out_rds = target_name,
in_ind = "../lake-temperature-model-prep/1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind",
in_repo = I('../lake-temperature-model-prep/'),
site_ids = reservoir_modeling_site_ids)
reservoir_metadata:
command: extract_feature(reservoir_polygons)
out_data/study_reservoirs.zip:
command: sf_to_zip(zip_filename = target_name,
sf_object = reservoir_polygons, layer_name = I('study_reservoirs'))
monitoring_sites:
command: readRDS(file = '../delaware-model-prep/2_observations/out/drb_filtered_sites.rds')
out_data/study_monitoring_sites.zip:
command: reduce_and_zip(zip_filename = target_name,
in_dat = monitoring_sites,
layer_name = I('study_monitoring_sites'))