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 3
/
1_spatial.yml
65 lines (51 loc) · 1.77 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
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
- reservoir_metadata
- out_data/study_stream_reaches.zip
- out_data/study_reservoirs.zip
# this first section should be the river network - one reach for
# each reach we are forecasting. This might be the whole DRB NHM network or a subset.
modeled_network_sf:
command: retrieve_network(network_sf_fl = 'in_data/network.rds')
modeled_network_sf_filtered:
command: filter_network_segments(network_sf = modeled_network_sf, filter_list_rds = 'in_data/forecast_segs.rds')
river_metadata:
command: extract_feature(modeled_network_sf_filtered)
out_data/study_stream_reaches.zip:
command: sf_to_zip(target_name,
sf_object = modeled_network_sf_filtered,
layer_name = I('study_stream_reaches'))
# This section should include shapefiles of the
# Reservoirs that we modeled (Cannonsville and Pepacton)
# 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
reservoir_polygons:
command: fetch_filter_res_polygons(
out_rds = target_name,
in_dat = "in_data/canonical_lakes_sf.rds",
in_repo = NULL,
site_ids = reservoir_modeling_site_ids)
# output reservoir shp
out_data/study_reservoirs.zip:
command: sf_to_zip2(zip_filename = target_name,
sf_object = reservoir_polygons,
layer_name = I('study_reservoirs'))
reservoir_metadata:
command: extract_feature(reservoir_polygons)