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

Add targets for uploading to S3 + repo cleanup #46

Merged
merged 8 commits into from
Dec 21, 2021

Conversation

lindsayplatt
Copy link
Contributor

Fixes #41. Also helps with #27 but doesn't complete it. Still need to figure out the dynamic-naming piece & how to inject SVG into Vue from a URL.

What this PR does do:

  1. Push up all files needed by Vue to S3 (+ include .ind files for our S3 pushes)
  2. Updated Vue code to match names used in S3
  3. Updated README documentation
  4. Bug fix for reshape2::dcast() deprecation
  5. Delete unused 4_animate files
  6. Add temporary fix for including the SVG file (already pushed to S3) in assets/ until @ceenell is able to inject SVG from a URL into Vue.

Results in the current state of the app from a local build to look like this:

image

@lindsayplatt
Copy link
Contributor Author

Once this is merged, I plan to delete the now unused files in S3. I don't want to do this right away, though, because I believe that we will need to build beta and prod or they will break?

image

Comment on lines +10 to +12
# Convert to `data.table` for fast reshaping, then back
# to tibble. Note that `reshape2::dcast()` is deprecated.
setDT() %>%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☹️ dcast has been one of my most used functions, I'm resistant to the change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can still use dcast() but has to be from the data.table package not rehsape2. The warning I got said the next update would turn it into an error!


THE ANALYSIS IN THIS VIZ REPO (AS IT CURRENTLY STANDS 12/23/2020) IS NOT MEANT TO BE FINAL. JUST USED AS AN EXAMPLE OF HOW TO BUILD A VIDEO-BASED DATAVIZ USING SCIPIPER
## Generate the data behind the visualization and push to S3

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a little more context here, like:
This animation is built using an R-based pipeline for data processing, and Vue.js + D3.js to create an animated site. The R-based pipeline (1) calculates daily percentiles for each well based on the historic record at each site, and (2) writes an svg map for the base of the animation. This pipeline leverages an internal package, library(scipiper) to automate the workflow. You do not need to run the pipeline to be able to build the app locally.

README.md Outdated
Comment on lines 34 to 40
## Build the visualization locally

The data (all CSVs and SVGs) needed for this visualization are already publicly available through `labs.waterdata.usgs.gov/visualizations/data/[FILENAME]`. You should be able open this repo, run the following code chunk, and see the visualization locally (http://localhost:8080/) without needed to build the data pipeline:

```
npm install
npm run serve
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and then move this up before we get into how to build the data? I suggest that because it is simpler, but the data part might be what people visiting the repo are more interested in.

Copy link
Member

@cnell-usgs cnell-usgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readme comments are suggestions, otherwise looks good to merge.

…he instructions are shown for the app vs pipeline
@lindsayplatt lindsayplatt merged commit d1bfcbe into DOI-USGS:main Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add steps to push data used by D3/Vue from the pipeline
2 participants