-
Notifications
You must be signed in to change notification settings - Fork 1
/
1_spatial.yml
58 lines (41 loc) · 1.43 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
target_default: 1_spatial
packages:
- yaml
- dplyr
- meddle
- readr
- rgdal
- httr
- lwgeom
- stringr
- sf
sources:
- src/spatial_utils.R
- src/file_utils.R
targets:
1_spatial:
depends:
- out_data/lake_metadata.csv
- out_data/lake_surface_temp_obs.csv
us_counties_sf:
command: fetch_zip_url_sf(I('https://www2.census.gov/geo/tiger/GENZ2018/shp/cb_2018_us_county_5m.zip'),
layer_name = I('cb_2018_us_county_5m'))
spatial_metadata:
command: extract_feature(modeled_centroids_sf)
# had to remove "nhdhr_122196991" which is Grand Lagoon, FL, which is coastal and not a lake
modeled_centroids_sf:
command: sf_centroid_metadata('in_data/surface_lake_metadata_file.csv')
# make a grid that doesn't depend on the centroids
release_grid_sf:
command: generate_group_rects()
weather_centroids:
command: ldas_centroid_lat_lon(x0 = I(-124.9375), y0 = I(25.0625), x_num = I(464), y_num = I(224), cell_res = I(0.125))
site_errors:
command: calc_site_errors('out_data/lake_surface_temp_preds.csv')
metadata_tbl:
command: build_metadata(target_name, 'in_data/surface_lake_metadata_file.csv',
error_data = site_errors,
cluster_fl = 'in_data/lake_metadata_wCluster.csv',
release_grid_sf = release_grid_sf, weather_centroids = weather_centroids)
out_data/lake_metadata.csv:
command: subset_write(target_name, metadata_tbl, remove_cols = I(c('x','y')))