Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to calendar year 2022 #82

Merged
merged 6 commits into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 0_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ targets:
##-- Fetch configs --##

viz_start_date:
command: as.Date(I('2021-10-01'))
command: as.Date(I('2022-01-01'))
viz_end_date:
command: as.Date(I('2022-09-30'))
command: as.Date(I('2022-12-31'))
# Use bounding box in case we want to do this regionally someday
# Start with CONUS only
# I don't think this is being used any more ...
Expand Down
51 changes: 51 additions & 0 deletions 3_visualize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ targets:
- visualizations/data/gw-conditions-daily-proportions.csv.ind
- src/assets/gw-conditions-peaks-map.svg # Currently a temporary fix!
- 3_visualize/out/gw-conditions-peaks-timeseries-s3copy.ind
- 3_visualize/out/gw-conditions-daily-proportions-s3copy.ind
- 3_visualize/out/gw-conditions-site-coords-s3copy.ind
- 3_visualize/out/gw-conditions-time-labels-s3copy.ind


3_visualize/out/gw-conditions-peaks-map.svg:
command: build_peaks_svg(
Expand Down Expand Up @@ -71,6 +75,20 @@ targets:
visualizations/data/gw-conditions-daily-proportions.csv.ind:
command: s3_put(target_name, '3_visualize/out/gw-conditions-daily-proportions.csv', config_file = I('lib/cfg/s3_config_viz.yml'))

# MUST BE RUN MANUALLY, AS UPLOADING FILES UPDATES THE LIVE SITE
# Upload to Prod a copy of the timeseries, daily proportions, site coords, and time labels to use on the live site
visualizations/data/gw-conditions-peaks-timeseries-live.csv.ind:
command: s3_put(target_name, '3_visualize/out/gw-conditions-peaks-timeseries.csv', config_file = I('lib/cfg/s3_config_viz.yml'))

visualizations/data/gw-conditions-daily-proportions-live.csv.ind:
command: s3_put(target_name, '3_visualize/out/gw-conditions-daily-proportions.csv', config_file = I('lib/cfg/s3_config_viz.yml'))

visualizations/data/gw-conditions-site-coords-live.csv.ind:
command: s3_put(target_name, '3_visualize/out/gw-conditions-site-coords.csv', config_file = I('lib/cfg/s3_config_viz.yml'))

visualizations/data/gw-conditions-time-labels-live.csv.ind:
command: s3_put(target_name, '2_process/out/gw-conditions-time-labels.csv', config_file = I('lib/cfg/s3_config_viz.yml'))

# We want to keep a copy of each time window we use, but don't want to have to keep changing the
# filename that is used by the Vue code manually. So, we are uploading a copy of the data for
# the current viz time window and naming based on the dates.
Expand All @@ -85,6 +103,39 @@ targets:
local_file = '3_visualize/out/gw-conditions-peaks-timeseries.csv',
s3_file = gw_conditions_peaks_timeseries_s3copy_fname,
config_file = I('lib/cfg/s3_config.yml'))

gw_conditions_daily_proportions_s3copy_fname:
command: sprintf(
I('gw-conditions/viz-previous-peak-data/gw-conditions-daily-proportions-%s_%s.csv'),
viz_start_date, viz_end_date)
3_visualize/out/gw-conditions-daily-proportions-s3copy.ind:
command: push_s3(
upload_ind = target_name,
local_file = '3_visualize/out/gw-conditions-daily-proportions.csv',
s3_file = gw_conditions_daily_proportions_s3copy_fname,
config_file = I('lib/cfg/s3_config.yml'))

gw_conditions_site_coords_s3copy_fname:
command: sprintf(
I('gw-conditions/viz-previous-peak-data/gw-conditions-site-coords-%s_%s.csv'),
viz_start_date, viz_end_date)
3_visualize/out/gw-conditions-site-coords-s3copy.ind:
command: push_s3(
upload_ind = target_name,
local_file = '3_visualize/out/gw-conditions-site-coords.csv',
s3_file = gw_conditions_site_coords_s3copy_fname,
config_file = I('lib/cfg/s3_config.yml'))

gw_conditions_time_labels_s3copy_fname:
command: sprintf(
I('gw-conditions/viz-previous-peak-data/gw-conditions-time-labels-%s_%s.csv'),
viz_start_date, viz_end_date)
3_visualize/out/gw-conditions-time-labels-s3copy.ind:
command: push_s3(
upload_ind = target_name,
local_file = '2_process/out/gw-conditions-time-labels.csv',
s3_file = gw_conditions_time_labels_s3copy_fname,
config_file = I('lib/cfg/s3_config.yml'))

# TEMPORARY FIX #
# Currently, we can't inject SVG directly from a URL. So,
Expand Down
2 changes: 2 additions & 0 deletions 3_visualize/out/gw-conditions-daily-proportions-s3copy.ind
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hash: 4dbbfa5e2ecb775788530aa799885e4a

2 changes: 1 addition & 1 deletion 3_visualize/out/gw-conditions-peaks-timeseries-s3copy.ind
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
hash: d61ba692aad93452088af885f79f9b36
hash: a1d1ba80ff6d63058fbdd44e3e02c21f

2 changes: 2 additions & 0 deletions 3_visualize/out/gw-conditions-site-coords-s3copy.ind
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hash: 5c330a701c80681e587e4f1afe1f0139

2 changes: 2 additions & 0 deletions 3_visualize/out/gw-conditions-time-labels-s3copy.ind
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hash: 8286962579ff4062969e873cc574bdd9

8 changes: 4 additions & 4 deletions src/components/GWL.vue
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ export default {
// read in data
let promises = [
self.d3.csv(self.publicPath + "quant_peaks.csv", this.d3.autotype), // used to draw legend shapes - color palette needs to be pulled out
self.d3.csv("https://labs.waterdata.usgs.gov/visualizations/data/gw-conditions-peaks-timeseries-wy22.csv", this.d3.autotype),
self.d3.csv("https://labs.waterdata.usgs.gov/visualizations/data/gw-conditions-site-coords.csv", this.d3.autotype),
self.d3.csv("https://labs.waterdata.usgs.gov/visualizations/data/gw-conditions-daily-proportions-wy22.csv", this.d3.autotype),
self.d3.csv("https://labs.waterdata.usgs.gov/visualizations/data/gw-conditions-time-labels.csv", this.d3.autotype),
self.d3.csv("https://labs.waterdata.usgs.gov/visualizations/data/gw-conditions-peaks-timeseries-live.csv", this.d3.autotype),
self.d3.csv("https://labs.waterdata.usgs.gov/visualizations/data/gw-conditions-site-coords-live.csv", this.d3.autotype),
self.d3.csv("https://labs.waterdata.usgs.gov/visualizations/data/gw-conditions-daily-proportions-live.csv", this.d3.autotype),
self.d3.csv("https://labs.waterdata.usgs.gov/visualizations/data/gw-conditions-time-labels-live.csv", this.d3.autotype),
];
Promise.all(promises).then(self.callback); // once it's loaded
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hash: 4dbbfa5e2ecb775788530aa799885e4a

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hash: 4dbbfa5e2ecb775788530aa799885e4a

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hash: aea0d19f97a9074b5503eae96a67738b

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
hash: aea0d19f97a9074b5503eae96a67738b
hash: 4dbbfa5e2ecb775788530aa799885e4a

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hash: a1d1ba80ff6d63058fbdd44e3e02c21f

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hash: a1d1ba80ff6d63058fbdd44e3e02c21f

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hash: d61ba692aad93452088af885f79f9b36

2 changes: 1 addition & 1 deletion visualizations/data/gw-conditions-peaks-timeseries.csv.ind
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
hash: d61ba692aad93452088af885f79f9b36
hash: a1d1ba80ff6d63058fbdd44e3e02c21f

2 changes: 2 additions & 0 deletions visualizations/data/gw-conditions-site-coords-live.csv.ind
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hash: 5c330a701c80681e587e4f1afe1f0139

2 changes: 1 addition & 1 deletion visualizations/data/gw-conditions-site-coords.csv.ind
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
hash: 5687ccdd47a58ae7e3445f4f39b8a0dc
hash: 5c330a701c80681e587e4f1afe1f0139

2 changes: 2 additions & 0 deletions visualizations/data/gw-conditions-time-labels-live.csv.ind
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hash: 8286962579ff4062969e873cc574bdd9

2 changes: 1 addition & 1 deletion visualizations/data/gw-conditions-time-labels.csv.ind
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
hash: d171203f4553505d599287a95a120338
hash: 8286962579ff4062969e873cc574bdd9