-
Notifications
You must be signed in to change notification settings - Fork 13
/
2_crosswalk_munge.yml
245 lines (209 loc) · 10.4 KB
/
2_crosswalk_munge.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
target_default: 2_crosswalk_munge
packages:
- dplyr
- scipiper
- readxl
sources:
- 2_crosswalk_munge/src/merge_id_crosswalks.R
- 2_crosswalk_munge/src/spatial_crosswalks.R
- 2_crosswalk_munge/src/mi_storet_crosswalk.R
- 1_crosswalk_fetch/src/munge_crosswalk.R
targets:
2_crosswalk_munge:
depends:
- 2_crosswalk_munge/out/wqptemp_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/gnisname_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/wqpsecchi_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/lagosus_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/mglp_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/wbic_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/micorps_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/mndow_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/winslow_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/centroid_lakes_sf.rds.ind
- 2_crosswalk_munge/out/lake_to_state_xwalk.rds.ind
- 2_crosswalk_munge/out/ndgf_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/iadnr_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/isro_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/mo_usace_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/navico_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/norfork_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/Iowa_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/univ_mo_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/UNDERC_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/SD_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/IN_CLP_nhdhr_xwalk.rds.ind
- 2_crosswalk_munge/out/IN_DNR_nhdhr_xwalk.rds.ind
2_crosswalk_munge/out/gnisname_nhdhr_xwalk.rds.ind:
command: scmake(I('gnisname_nhdhr_xwalk.rds.ind_promise'), '1_crosswalk_fetch_nhd_tasks.yml')
2_crosswalk_munge/out/mglp_nhdhr_intersect.rds.ind:
command: crosswalk_poly_intersect_poly(
target_name,
poly1_ind_file = '1_crosswalk_fetch/out/MGLP_lakes_sf.rds.ind',
poly2_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
poly1_ID_name = I("MGLP_ID"),
crs=I(26915))
2_crosswalk_munge/out/mglp_nhdhr_xwalk.rds.ind:
command: choose1_poly_intersect_poly(
target_name,
intersect_ind_file = '2_crosswalk_munge/out/mglp_nhdhr_intersect.rds.ind',
poly1_ID_name = I("MGLP_ID"))
2_crosswalk_munge/out/isro_nhdhr_intersect.rds.ind:
command: crosswalk_poly_intersect_poly(
target_name,
poly1_ind_file = '1_crosswalk_fetch/out/isro_lakes_sf.rds.ind',
poly2_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
poly1_ID_name = I("ISRO_ID"),
crs=I(26915))
2_crosswalk_munge/out/isro_nhdhr_xwalk.rds.ind:
command: choose1_poly_intersect_poly(
target_name,
intersect_ind_file = '2_crosswalk_munge/out/isro_nhdhr_intersect.rds.ind',
poly1_ID_name = I("ISRO_ID"))
2_crosswalk_munge/out/iadnr_nhdhr_intersect.rds.ind:
command: crosswalk_poly_intersect_poly(
target_name,
poly1_ind_file = '1_crosswalk_fetch/out/iadnr_lakes_sf.rds.ind',
poly2_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
poly1_ID_name = I("IADNR_ID"),
crs=I(26915))
2_crosswalk_munge/out/iadnr_nhdhr_xwalk.rds.ind:
command: choose1_poly_intersect_poly(
target_name,
intersect_ind_file = '2_crosswalk_munge/out/iadnr_nhdhr_intersect.rds.ind',
poly1_ID_name = I("IADNR_ID"))
2_crosswalk_munge/out/winslow_nhdhr_intersect.rds.ind:
command: crosswalk_poly_intersect_poly(
target_name,
poly1_ind_file = '1_crosswalk_fetch/out/winslow_lakes_sf.rds.ind',
poly2_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
poly1_ID_name = I("WINSLOW_ID"),
crs=I(26915))
2_crosswalk_munge/out/winslow_nhdhr_xwalk.rds.ind:
command: choose1_poly_intersect_poly(
target_name,
intersect_ind_file = '2_crosswalk_munge/out/winslow_nhdhr_intersect.rds.ind',
poly1_ID_name = I("WINSLOW_ID"))
2_crosswalk_munge/out/lagosus_nhdhr_xwalk.rds.ind:
command: lagos_to_xwalk(
out_ind = target_name,
lakeinfo_ind = '1_crosswalk_fetch/in/LAGOS_US_lake_information.csv.ind')
2_crosswalk_munge/out/mndow_nhdhr_intersect.rds.ind:
command: crosswalk_poly_intersect_poly(
target_name,
poly1_ind_file = '1_crosswalk_fetch/out/mndow_lakes_sf.rds.ind',
poly2_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
poly1_ID_name = I("MNDOW_ID"),
crs=I(26915))
2_crosswalk_munge/out/mndow_nhdhr_xwalk.rds.ind:
command: choose1_poly_intersect_poly(
target_name,
intersect_ind_file = '2_crosswalk_munge/out/mndow_nhdhr_intersect.rds.ind',
poly1_ID_name = I("MNDOW_ID"))
2_crosswalk_munge/out/wbic_nhdhr_intersect.rds.ind:
command: crosswalk_poly_intersect_poly(
target_name,
poly1_ind_file = '1_crosswalk_fetch/out/wbic_lakes_sf.rds.ind',
poly2_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
poly1_ID_name = I("WBIC_ID"),
crs=I(26915))
2_crosswalk_munge/out/wbic_nhdhr_xwalk.rds.ind:
command: choose1_poly_intersect_poly(
target_name,
intersect_ind_file = '2_crosswalk_munge/out/wbic_nhdhr_intersect.rds.ind',
poly1_ID_name = I("WBIC_ID"))
2_crosswalk_munge/out/wqptemp_nhdhr_xwalk.rds.ind:
command: crosswalk_points_in_poly(target_name,
poly_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
points_ind_file = '1_crosswalk_fetch/out/wqp_lake_temperature_sites_sf.rds.ind',
points_ID_name = I("MonitoringLocationIdentifier"))
2_crosswalk_munge/out/wqpsecchi_nhdhr_xwalk.rds.ind:
command: crosswalk_points_in_poly(target_name,
poly_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
points_ind_file = '1_crosswalk_fetch/out/wqp_lake_secchi_sites_sf.rds.ind',
points_ID_name = I("MonitoringLocationIdentifier"))
2_crosswalk_munge/out/micorps_nhdhr_xwalk.rds.ind:
command: munge_micorps_crosswalk(
out_ind = target_name,
site_ind = '1_crosswalk_fetch/out/micorps_sites.xlsx.ind',
wqp_nhd_ind = '2_crosswalk_munge/out/wqptemp_nhdhr_xwalk.rds.ind',
wqp_latlong_ind = '1_crosswalk_fetch/out/wqp_lake_temperature_sites_sf.rds.ind')
2_crosswalk_munge/out/buffered_lakes_sf.rds.ind:
command: buffer_sf_lakes(
out_ind = target_name,
lake_ind = "1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind",
buffer_width = I(100))
2_crosswalk_munge/out/centroid_lakes_sf.rds.ind:
command: centroid_sf_lakes(
out_ind = target_name,
lake_ind = "1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind")
# Lakes that fall in Canada are given in NA
# Lakes that intersect multiple states will appear
# more than once in the crosswalk
2_crosswalk_munge/out/lake_to_state_xwalk.rds.ind:
command: crosswalk_lakes_intersect_regions(
ind_file = target_name,
lakes_ind = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
us_counties_ind = '1_crosswalk_fetch/out/us_counties_sf.rds.ind',
summarize_to_states = I(TRUE))
2_crosswalk_munge/out/ndgf_nhdhr_intersect.rds.ind:
command: crosswalk_poly_intersect_poly(
target_name,
poly1_ind_file = '1_crosswalk_fetch/out/ndgf_lakesvw.rds.ind',
poly2_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
poly1_ID_name = I("NDGF_ID"),
crs=I(26915))
2_crosswalk_munge/out/ndgf_nhdhr_xwalk.rds.ind:
command: choose1_poly_intersect_poly(
target_name,
intersect_ind_file = '2_crosswalk_munge/out/ndgf_nhdhr_intersect.rds.ind',
poly1_ID_name = I("NDGF_ID"))
2_crosswalk_munge/out/mo_usace_nhdhr_xwalk.rds.ind:
command: crosswalk_points_in_poly(target_name,
poly_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
points_ind_file = '1_crosswalk_fetch/out/mo_usace_sampling_locations_sf.rds.ind',
points_ID_name = I("mo_usace_id"))
2_crosswalk_munge/out/navico_lakes_sf.rds.ind:
command: merge_navico_lakes(target_name,
depth_sf_ind = '1_crosswalk_fetch/out/Navico_lakes_depths_sf.rds.ind',
temp_ind = '6_temp_coop_fetch/in/Waterbody_Temperatures_by_State.xlsx.ind')
2_crosswalk_munge/out/navico_nhdhr_xwalk.rds.ind:
command: crosswalk_points_in_poly(target_name,
poly_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
points_ind_file = '2_crosswalk_munge/out/navico_lakes_sf.rds.ind',
points_ID_name = I("Navico_ID"))
2_crosswalk_munge/out/norfork_nhdhr_xwalk.rds.ind:
command: crosswalk_points_in_poly(target_name,
poly_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
points_ind_file = '1_crosswalk_fetch/out/Norfork_temperature_locations_sf.rds.ind',
points_ID_name = I("Norfork_ID"))
2_crosswalk_munge/out/Iowa_nhdhr_xwalk.rds.ind:
command: crosswalk_points_in_poly(target_name,
poly_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
points_ind_file = '1_crosswalk_fetch/out/Iowa_lake_pts_sf.rds.ind',
points_ID_name = I("Iowa_ID"))
2_crosswalk_munge/out/UNDERC_nhdhr_xwalk.rds.ind:
command: crosswalk_points_in_poly(target_name,
poly_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
points_ind_file = '1_crosswalk_fetch/out/UNDERC_lakes_depths_sf.rds.ind',
points_ID_name = I("UNDERC_ID"))
2_crosswalk_munge/out/univ_mo_nhdhr_xwalk.rds.ind:
command: crosswalk_points_in_poly(target_name,
poly_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
points_ind_file = '1_crosswalk_fetch/out/UniversityofMissouri_2017_2020_Profiles_sf.rds.ind',
points_ID_name = I("Missouri_ID"))
2_crosswalk_munge/out/SD_nhdhr_xwalk.rds.ind:
command: crosswalk_points_in_poly(target_name,
poly_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
points_ind_file = '1_crosswalk_fetch/out/SD_lake_pts_sf.rds.ind',
points_ID_name = I("SD_ID"))
2_crosswalk_munge/out/IN_CLP_nhdhr_xwalk.rds.ind:
command: crosswalk_points_in_poly(target_name,
poly_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
points_ind_file = '1_crosswalk_fetch/out/IN_CLP_lake_pts_sf.rds.ind',
points_ID_name = I("IN_CLP_ID"))
2_crosswalk_munge/out/IN_DNR_nhdhr_xwalk.rds.ind:
command: crosswalk_points_in_poly(target_name,
poly_ind_file = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
points_ind_file = '1_crosswalk_fetch/out/IN_DNR_lake_pts_sf.rds.ind',
points_ID_name = I("IN_DNR_ID"))