-
Notifications
You must be signed in to change notification settings - Fork 13
/
1_crosswalk_fetch.yml
186 lines (156 loc) · 8.02 KB
/
1_crosswalk_fetch.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
target_default: 1_crosswalk_fetch
packages:
- dplyr
- scipiper
- dataRetrieval
- sf
- httr
- sbtools
- smoothr
sources:
- 1_crosswalk_fetch/src/fetch_crosswalk.R
- 1_crosswalk_fetch/src/fetch_NHD.R
- 1_crosswalk_fetch/src/munge_crosswalk.R
- 1_crosswalk_fetch/src/fetch_wqp_sites.R
- 1_crosswalk_fetch/src/fetch_zip_url_sf.R
- 1_crosswalk_fetch/src/fetch_ned_elevations.R
- lib/src/generic_utils.R
targets:
1_crosswalk_fetch:
depends:
- 1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind
- 1_crosswalk_fetch/out/mndow_lakes_sf.rds.ind
- 1_crosswalk_fetch/out/micorps_sites.xlsx.ind
- 1_crosswalk_fetch/out/wqp_lake_temperature_sites_sf.rds.ind
- 1_crosswalk_fetch/out/wqp_lake_secchi_sites_sf.rds.ind
- 1_crosswalk_fetch/out/iadnr_lakes_sf.rds.ind
- 1_crosswalk_fetch/out/mo_usace_sampling_locations_sf.rds.ind
- 1_crosswalk_fetch/out/Navico_lakes_depths_sf.rds.ind
- 1_crosswalk_fetch/out/Norfork_temperature_locations_sf.rds.ind
- 1_crosswalk_fetch/out/Iowa_lake_pts_sf.rds.ind
- 1_crosswalk_fetch/out/UniversityofMissouri_2017_2020_Profiles_sf.rds.ind
- 1_crosswalk_fetch/out/SD_lake_pts_sf.rds.ind
- 1_crosswalk_fetch/out/IN_CLP_lake_pts_sf.rds.ind
- 1_crosswalk_fetch/out/IN_DNR_lake_pts_sf.rds.ind
- 1_crosswalk_fetch/out/ned_centroid_elevations.feather.ind
- 1_crosswalk_fetch/out/UNDERC_lakes_depths_sf.rds.ind
- 1_crosswalk_fetch/out/isro_lakes_sf.rds.ind
- 1_crosswalk_fetch/out/landsat_secchi.rds.ind
# create the trigger file, which will not be checked into git
# I see no reason to have different trigger files for different sections of the pipeline
# if this is used elsewhere, since the intent is to keep modifying it
# or the trigger file could be checked into git so that people building this part
# for the first time don't get "Can't build implicit target 1_crosswalk_fetch/out/always_stale_time.txt"
# if this recipe is missing and the file doesn't exist
1_crosswalk_fetch/out/always_stale_time.txt:
command: make_file_stale(target_name)
wqp_temperature_charnames:
command: c(I(c(
"Temperature",
"Temperature, sample",
"Temperature, water",
"Temperature, water, deg F")))
wqp_secchi_charnames:
command: c(I(c(
"Depth, Secchi disk depth",
"Depth, Secchi disk depth (choice list)",
"Secchi Reading Condition (choice list)",
"Water transparency, Secchi disc")))
#https://www.waterqualitydata.us/portal/#siteType=Lake%2C%20Reservoir%2C%20Impoundment&characteristicName=Depth%2C%20Secchi%20disk%20depth&characteristicName=Water%20transparency%2C%20Secchi%20disc&characteristicName=Depth%2C%20Secchi%20disk%20depth%20(choice%20list)&characteristicName=Secchi%20Reading%20Condition%20(choice%20list)&mimeType=tsv
nhd_HR_download_plan:
command: create_nhd_HR_download_plan(I(c("North_Dakota","South_Dakota","Iowa","Michigan","Indiana","Illinois","Wisconsin",
"Minnesota", "New_York", "Pennsylvania", "Missouri", "Arkansas")),
min_size = I(40000))
1_crosswalk_fetch_nhd_tasks.yml:
command: create_nhd_HR_download_makefile(target_name, nhd_HR_download_plan,
final_targets = I(c('1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
'2_crosswalk_munge/out/gnisname_nhdhr_xwalk.rds.ind')))
1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind:
command: loop_tasks(nhd_HR_download_plan, '1_crosswalk_fetch_nhd_tasks.yml')
1_crosswalk_fetch/out/us_counties_sf.rds.ind:
command: fetch_zip_url_sf(
ind_file = target_name,
zip_url = I('https://www2.census.gov/geo/tiger/GENZ2018/shp/cb_2018_us_county_5m.zip'),
layer_name = I('cb_2018_us_county_5m'))
1_crosswalk_fetch/out/mndow_lakes_sf.rds.ind:
command: fetch_mndow_lakes(
ind_file = target_name,
dummy = I("2019-08-20"),
layer = I("dnr_hydro_features_all"))
1_crosswalk_fetch/out/winslow_lakes_sf.rds.ind:
command: fetch_sb_wfs(
ind_file = target_name,
sb_id = I('57d97341e4b090824ffb0e6f'),
layer = I('model_lakes'))
1_crosswalk_fetch/out/MGLP_lakes_sf.rds.ind:
command: MGLP_zip_to_sf(
out_ind = target_name,
gdb_file = I("MGLP_model_data&results.gdb"),
zip_ind = '1_crosswalk_fetch/in/MGLP_lakes.zip.ind')
1_crosswalk_fetch/out/wqp_lake_temperature_sites_sf.rds.ind:
command: fetch_wqp_sites(target_name, characteristicName = wqp_temperature_charnames,
sf_ind = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
box_res = 5, dummy = I('2022-05-26'),
'1_crosswalk_fetch/src/fetch_wqp_sites.R')
1_crosswalk_fetch/out/wqp_lake_secchi_sites_sf.rds.ind:
command: fetch_wqp_sites(target_name, characteristicName = wqp_secchi_charnames,
sf_ind = '1_crosswalk_fetch/out/canonical_lakes_sf.rds.ind',
box_res = 5, dummy = I('2022-05-31'),
'1_crosswalk_fetch/src/fetch_wqp_sites.R')
1_crosswalk_fetch/out/micorps_sites.xlsx.ind:
command: fetch_micorps_sites(target_name)
1_crosswalk_fetch/out/iadnr_contours_sf.rds.ind:
command: fetch_iadnr_lakes(target_name,
layer = I('lakes_bathymetry'),
remove_IDs = I(c("HEN45", "LGR82", "MIA68", "MOR59", "NTW13", "RDL34", "SWA14", "THM88", "WIN87", "EOK30")),
zip_ind = '3_params_fetch/out/IA_lakes_bathymetry.zip.ind')
1_crosswalk_fetch/out/iadnr_lakes_sf.rds.ind:
command: slice_iadnr_contour(target_name,
contour_ind = '1_crosswalk_fetch/out/iadnr_contours_sf.rds.ind')
1_crosswalk_fetch/out/isro_contours_sf.rds.ind:
command: fetch_isro_lakes(target_name,
use_geoms = I('Multi Polygon'),
gdb_filename = I('ISRO_GLKN_BathymetricData.gdb'),
zip_ind = '3_params_fetch/in/ISRO_GLKN_Bathymetric_FinalData.zip.ind')
1_crosswalk_fetch/out/isro_lakes_sf.rds.ind:
command: slice_isro_contour(target_name,
contour_ind = '1_crosswalk_fetch/out/isro_contours_sf.rds.ind')
1_crosswalk_fetch/out/mo_usace_sampling_locations_sf.rds.ind:
command: fetch_mo_usace_points(target_name,
xlsx_ind = '1_crosswalk_fetch/in/Missouri_USACE_samplingLocations.xlsx.ind')
1_crosswalk_fetch/out/Navico_lakes_depths_sf.rds.ind:
command: fetch_navico_points(target_name,
csv_ind = '1_crosswalk_fetch/in/Navico_lakes_depths.csv.ind')
1_crosswalk_fetch/out/UNDERC_lakes_depths_sf.rds.ind:
command: fetch_UNDERC_points(target_name,
csv_ind = '1_crosswalk_fetch/in/Solomon_LAKES_10.25390_caryinstitute.7438598.v5.csv.ind')
1_crosswalk_fetch/out/Norfork_temperature_locations_sf.rds.ind:
command: fetch_norfork_points(target_name,
csv_ind = '1_crosswalk_fetch/in/Norfork_temperature_locations.csv.ind')
1_crosswalk_fetch/out/Iowa_lake_pts_sf.rds.ind:
command: fetch_Iowa_points(target_name,
csv_ind = '1_crosswalk_fetch/in/Iowa_Lake_Locations.csv.ind')
1_crosswalk_fetch/out/IN_CLP_lake_pts_sf.rds.ind:
command: fetch_IN_points(target_name,
csv_ind = '1_crosswalk_fetch/in/Indiana_CLP_lakedata_1994_2013_latlong.csv.ind',
site_id_tag = I('IN_CLP'),
col_name = I('CLP_Lake_ID'))
1_crosswalk_fetch/out/IN_DNR_lake_pts_sf.rds.ind:
command: fetch_IN_points(target_name,
csv_ind = '1_crosswalk_fetch/in/Indiana_CLP_lakedata_1994_2013_latlong.csv.ind',
site_id_tag = I('IN_DNR'),
col_name = I('Lake_County_Name'))
1_crosswalk_fetch/out/landsat_secchi.rds.ind:
command: fetch_landsat_secchi(target_name,
in_ind = '1_crosswalk_fetch/in/Max_Glines_LANDSAT_secchi_medians.csv.ind')
1_crosswalk_fetch/out/SD_lake_pts_sf.rds.ind:
command: fetch_SD_points(target_name,
csv_ind = '1_crosswalk_fetch/in/SD_Lake_temp_export_scraped_latlong.csv.ind')
1_crosswalk_fetch/out/UniversityofMissouri_2017_2020_Profiles_sf.rds.ind:
command: fetch_univ_mo_points(target_name,
csv_ind = '1_crosswalk_fetch/in/UniversityofMissouri_2017_2020_Profiles.csv.ind')
1_crosswalk_fetch/out/ned_centroid_elevations.feather.ind:
command: fetch_ned_points(target_name, zoom = 9,
points_sf_ind = '2_crosswalk_munge/out/centroid_lakes_sf.rds.ind',
box_res = 2, dummy = I('2022-03-04'),
'1_crosswalk_fetch/src/get_ned_points.R')