-
Notifications
You must be signed in to change notification settings - Fork 15
/
viz.yaml
473 lines (466 loc) · 14.7 KB
/
viz.yaml
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
info:
id: water-use-15
name: U.S. Water Use
date: 2018-06-19
publish-date: 2018-06-19
path: water-use-15
analytics-id: UA-78530187-12
description: >-
Water touches almost every aspect of American life: from food to electricity to
consumer products. Understanding how we use water is crucial for learning how
to be more responsible with water resources. For the first time, the U.S.
Geological Survey is displaying the national compilation of water use data for
every U.S. county. Explore the variety of water use across the U.S. to understand
how we use our current resources.
keywords:
audience:
url: https://owi.usgs.gov/vizlab/water-use-15
thumbnail-landing:
url: images/thumb_landing.png
width: 400
height: 400
alttext: "Water Use"
required-packages:
vizlab:
repo: github
version: 0.3.7
name: USGS-VIZLAB/vizlab
ref: v0.3.7
aws.s3:
repo: CRAN
version: 0.3.3
aws.signature:
repo: CRAN
version: 0.3.5
dataRetrieval:
repo: CRAN
version: 2.7.3
dplyr:
repo: CRAN
version: 0.7.0
geojsonio:
repo: CRAN
version: 0.6.0
js:
repo: CRAN
version: 1.1
jsonlite:
repo: CRAN
version: 1.5
maps:
repo: CRAN
version: 3.2.0
maptools:
repo: CRAN
version: 0.9-2
readxl:
repo: CRAN
version: 1.0.0
rgdal:
repo: CRAN
version: 1.2-16
rgeos:
repo: CRAN
version: 0.3-26
sp:
repo: CRAN
version: 1.2.6
sf:
repo: CRAN
version: 0.5.4
sbtools:
repo: CRAN
version: 1.1.6
contributors:
-
name: Lindsay Carr
email: lcarr@usgs.gov
affiliation: U.S. Geological Survey
-
name: Alison Appling
email: aappling@usgs.gov
affiliation: U.S. Geological Survey
-
name: Marty Wernimont
email: mwernimont@usgs.gov
affiliation: U.S. Geological Survey
-
name: Jordan Read
email: jread@usgs.gov
affiliation: U.S. Geological Survey
-
name: Laura DeCicco
email: ldecicco@usgs.gov
affiliation: U.S. Geological Survey
-
name: David Watkins
email: wwatkins@usgs.gov
affiliation: U.S. Geological Survey
parameter:
-
id: spatial_metadata
crs: '+init=epsg:4326' # works with d3.geoAlbers
bbox: [-125, 26, -68, 50] # conus bbox
-
id: wu_type_column_names
orig_names: ["TO-Wtotl", "PT-Wtotl", "PS-Wtotl", "IR-WFrTo", "IN-Wtotl"]
new_names: ["total", "thermoelectric", "publicsupply", "irrigation", "industrial"]
-
id: social-links
github: https://github.com/USGS-VIZLAB/water-use-15
twitter: https://twitter.com/share?url=https://owi.usgs.gov/vizlab/water-use-15/?utm_source=twitter_button_share%2F&text=The%20USGS%20studies%20water%20use%20in%20every%20county%20of%20the%20U.S.%20to%20manage%20current%20resources%20and%20prepare%20for%20future%20needs.%20Explore%20your%20county%20here&hashtags=water,usgs,wateruse
facebookLink: http://www.facebook.com/sharer.php?u=https://owi.usgs.gov/vizlab/water-use-15/?utm_source=fb_button_share"e=The%20U.S.%20Geological%20Survey%20studies%20water%20use%20in%20every%20county%20to%20manage%20current%20resources%20and%20prepare%20for%20future%20needs.%20Explore%20your%20county%20and%20learn%20more%20about%20why%20water%20use%20is%20so%20diverse&hashtag=%23wateruse
fetch:
-
id: viewbox
location: cache/viewbox.rds
reader: rds
fetcher: viewbox_limits
scripts: [scripts/fetch/viewbox_limits.R , scripts/fetch/utils.R]
depends:
spatial_metadata: spatial_metadata
comment: sets up the basic view window and projection
-
id: state_boundaries_USA_topojson
location: cache/state_boundaries_USA.json
reader: json
mimetype: application/json
fetcher: sciencebase
remoteItemId: "5ab154b1e4b081f61ab26420"
remoteFilename: "state_boundaries_USA.json"
-
id: state_boundaries_zoom_topojson
location: cache/state_boundaries_zoom.json
reader: json
mimetype: application/json
fetcher: sciencebase
remoteItemId: "5ab154b1e4b081f61ab26420"
remoteFilename: "state_boundaries_zoom.json"
-
id: state_boundaries_mobile_topojson
location: cache/state_boundaries_mobile.json
reader: json
mimetype: application/json
fetcher: sciencebase
remoteItemId: "5ab154b1e4b081f61ab26420"
remoteFilename: "state_boundaries_mobile.json"
-
id: county_boundaries_USA_topojson
location: cache/county_boundaries_USA.json
reader: json
mimetype: application/json
fetcher: sciencebase
remoteItemId: "5ab154b1e4b081f61ab26420"
remoteFilename: "county_boundaries_USA.json"
-
id: county_boundaries_zoom_topojson
location: cache/county_boundaries_zoom.json
reader: json
mimetype: application/json
fetcher: sciencebase
remoteItemId: "5ab154b1e4b081f61ab26420"
remoteFilename: "county_boundaries_zoom.json"
-
id: county_boundaries_mobile_topojson
location: cache/county_boundaries_mobile.json
reader: json
mimetype: application/json
fetcher: sciencebase
remoteItemId: "5ab154b1e4b081f61ab26420"
remoteFilename: "county_boundaries_mobile.json"
-
id: county_centroids_topojson
location: cache/county_centroids_USA.json
reader: json
mimetype: application/json
fetcher: sciencebase
remoteItemId: "5ab154b1e4b081f61ab26420"
remoteFilename: "county_centroids_USA.json"
-
id: wu_data_15
location: cache/wu_data_15.xlsx
reader: excel
fetcher: sciencebase
remoteItemId: "5ab154b1e4b081f61ab26420"
remoteFilename: "usco2015v2.0_FINAL-dataviz.xlsx"
process:
-
id: wu_data_15_simple
location: cache/wu_data_15_simple.rds
reader: rds
depends:
rawdata: wu_data_15
col_names: wu_type_column_names
processor: simplify_wu_data
scripts: [scripts/process/simplify_wu_data.R]
-
id: wu_data_15_range_json
location: cache/wu_data_15_range.json
mimetype: application/json
depends:
wu_data_15_simple: wu_data_15_simple
col_names: wu_type_column_names
processor: find_range
scripts: [scripts/process/find_range.R]
-
id: wu_data_15_sum_json
location: cache/wu_data_15_sum.json
mimetype: application/json
depends:
rawdata: wu_data_15_simple
col_names: wu_type_column_names
processor: summarize_wu_data
scripts: [scripts/process/summarize_wu_data.R]
-
id: wu_state_data_json
location: cache/wu_state_data.json
mimetype: application/json
process_args:
drag_states: ["ID","AZ","MI"]
depends:
rawdata: wu_data_15_simple
state_boundaries: state_boundaries_USA_topojson
processor: state_wu_data
scripts: [scripts/process/state_wu_data.R]
-
id: county_centroids_wu_tsv
location: cache/county_centroids_wu.tsv
mimetype: text/tab-separated-values
process_args:
layer: centroids
depends:
topo: county_centroids_topojson
wu_data_15_simple: wu_data_15_simple
processor: merge_centroids_wu
scripts: [scripts/process/merge_centroids_wu.R]
visualize:
publish:
-
id: wateruse_page
name: index
template: fullpage
publisher: page
depends:
vizlab-favicon: "lib-vizlab-favicon"
all_css: "all_css"
social: "social_section"
header: "header_section"
mobile_map_ui: "mobile_map_ui"
map_section: "map_section"
wu_story: "wu_story"
footer: "footer_section"
all_js_minified: "all_js_minified"
state_boundaries_USA: state_boundaries_USA_topojson
state_boundaries_zoom: state_boundaries_zoom_topojson
state_boundaries_mobile: state_boundaries_mobile_topojson
county_boundaries_USA: county_boundaries_USA_topojson
county_boundaries_zoom: county_boundaries_zoom_topojson
county_boundaries_mobile: county_boundaries_mobile_topojson
county_centroids_wu: "county_centroids_wu_tsv"
wu_data_15_range: "wu_data_15_range_json"
wu_data_15_sum_json: wu_data_15_sum_json
thumb_facebook: thumb_facebook
thumb_twitter: thumb_twitter
thumb_landing: thumb_landing
wu_state_data_json: wu_state_data_json
context:
resources: ["all_js_minified", "all_css", "vizlab-favicon"]
sections: ["social", "mobile_map_ui", "map_section", "wu_story"] # adding header and footer here, doubled each on the page
thumbnails:
twitter: thumb_twitter
facebook: thumb_facebook
main: thumb_landing
-
id: all_js_minified
location: "js/all.min.js"
mimetype: application/javascript
publish_args:
lib_js: ["lib-d3-js"]
js_files: [
"js/topojson.v1.min.js",
"js/url_hashes.js", "js/custom_projection.js", "js/styles.js", "js/buttons.js",
"js/resize.js", "js/map_utils.js", "js/states.js", "js/counties.js", "js/watermark.js",
"js/circles.js", "js/mobile_ui.js", "js/modernizr_custom.js", "js/lazy_loading.js",
"js/national_pie.js", "js/rank_states_utils.js", "js/scroll_tracking.js", "js/build_map_utils.js"
]
troubleshoot: FALSE
publisher: combine_minify_js
scripts: [scripts/publish/combine_minify_js.R]
-
id: build_map_minified
location: "js/build_map.min.js"
mimetype: application/javascript
publish_args:
js_files: ["js/build_map.js"]
publisher: combine_minify_js
scripts: [scripts/publish/combine_minify_js.R]
-
id: all_css
location: "layout/css/all.css"
mimetype: application/javascript
publish_args:
lib_css: ["lib-header-css", "lib-footer-css", "lib-content-css", "lib-social-media-css"]
custom_css_files: ["layout/css/map.css", "layout/css/custom.css"]
publisher: combine_css
scripts: [scripts/publish/combine_css.R]
-
id: selectArrows
location: images/selectArrows.svg
mimetype: image/svg
title: "Select Arrows"
alttext: "Select Input Custom Arrows"
-
id: header_section
template: header-template
publisher: header
depends: "lib-header-css"
context:
title: "Water use in the U.S., 2015"
-
id: map_section
template: layout/templates/map_section.mustache
publisher: section
depends:
map_script: build_map_minified
context:
map_script: map_script
-
id: embed_map
template: layout/templates/embed_map.mustache
publisher: section
depends:
map_script: build_map_minified
context:
map_script: map_script
-
id: static_story_figure
location: "images/WU_stories_static.jpg"
mimetype: image/jpg
export: true
title: "A national map with notes about areas of high water use"
alttext: >-
High water use: IL (steel), Northeast (power), AR & CA (irrigation), Gulf Coast (industry), cities (public), ID & AK (other)
relpath: "images/WU_stories_static.jpg"
-
id: static_story_figure_mobile
location: "images/WU_stories_static_mobile.jpg"
mimetype: image/jpg
export: true
title: "Map of the western U.S. with notes about areas of high water use"
alttext: >-
Areas of high water use: Idaho (aquaculture), California (irrigation), Alaska (mining), & big cities (public supply)
relpath: "images/WU_stories_mobile_left.jpg"
-
id: placeholder
location: "images/placeholder.gif"
mimetype: image/gif
title: "A national map with notes about areas of high water use"
alttext: >-
High water use: IL (steel), Northeast (power), AR & CA (irrigation), Gulf Coast (industry), cities (public), ID & AK (other)
relpath: "images/placeholder.gif"
data-src: "images/WU_stories_static.jpg"
class: "lazy"
-
id: water_use_thumb
location: "images/water_use_thumb.png"
mimetype: image/png
title: "Water Use Thubnail"
alttext: "Water Use Thubnail"
relpath: "images/water_use_thumb.png"
-
id: hurricane_maria_thumb
location: "images/hurricane_maria.png"
mimetype: image/png
title: "Hurricane Maria Thumbnail"
alttext: "Hurricane Maria Thumbnail"
relpath: "images/hurricane_maria.png"
-
id: wu_story
template: layout/templates/wu_story.mustache
depends: ["placeholder", "static_story_figure", "static_story_figure_mobile"]
context:
placeholder: "placeholder"
pie_map_plot: "static_story_figure"
mobile_pie_map_plot: "static_story_figure_mobile"
publisher: section
-
id: mobile_map_ui
template: layout/templates/mobileMapUI.mustache
publisher: section
depends:
selectArrows: selectArrows
context:
selectArrows: selectArrows
-
id: footer_section
template: layout/templates/footer.mustache
publisher: section
depends:
logo: lib-vizlab-logo
usgsLogo: lib-usgs-logo
github-logo: lib-github-logo
placeholder: placeholder
water_use_thumb: "water_use_thumb"
hurricane_maria_thumb: "hurricane_maria_thumb"
context:
placeholder: placeholder
logo: logo
usgsLogo: usgsLogo
github-url:
github-logo: github-logo
water_use_thumb: "water_use_thumb"
hurricane_maria_thumb: "hurricane_maria_thumb"
-
id: social_section
template: vertical-social-media-template
publisher: social
depends: social-links
context:
embedLink: embed-water-use-15.html
-
id: national_water_use
name: embed-water-use-15
publisher: page
template: embed
mimetype: text/html
depends:
all_css: all_css
all_js_minified: all_js_minified
embed_map: embed_map
state_boundaries_USA: state_boundaries_USA_topojson
state_boundaries_zoom: state_boundaries_zoom_topojson
state_boundaries_mobile: state_boundaries_mobile_topojson
county_boundaries_USA: county_boundaries_USA_topojson
county_boundaries_zoom: county_boundaries_zoom_topojson
county_boundaries_mobile: county_boundaries_mobile_topojson
county_centroids_wu: county_centroids_wu_tsv
wu_data_15_range: wu_data_15_range_json
wu_data_15_sum_json: wu_data_15_sum_json
wu_state_data_json: wu_state_data_json
context:
resources: ["all_css", "all_js_minified"]
embed: ["embed_map"]
-
id: thumb_facebook
publisher: thumbnail
location: images/thumb_facebook.png
relpath: images/thumb_facebook.png
mimetype: image/png
title: "Facebook Thumbnail"
alttext: "Facebook Thumbnail"
-
id: thumb_twitter
publisher: thumbnail
location: images/thumb_twitter.png
relpath: images/thumb_twitter.png
mimetype: image/png
title: "Twitter Thumbnail"
alttext: "Twitter Thumbnail"
-
id: thumb_landing
publisher: thumbnail
location: images/thumb_landing.png
relpath: images/thumb_landing.png
mimetype: image/png
title: "Landing Page Thumbnail"
alttext: "Landing Page Thumbnail"