snow-to-flow

What does changing snowmelt mean for flow in the western US?

https://github.com/DOI-USGS/snow-to-flow

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    5 of 8 committers (62.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.6%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

What does changing snowmelt mean for flow in the western US?

Basic Info
  • Host: GitHub
  • Owner: DOI-USGS
  • License: cc0-1.0
  • Language: Vue
  • Default Branch: main
  • Size: 568 MB
Statistics
  • Stars: 13
  • Watchers: 4
  • Forks: 9
  • Open Issues: 1
  • Releases: 15
Created over 5 years ago · Last pushed about 2 years ago
Metadata Files
Readme Changelog Contributing License

README.md

From Snow to Flow Visualization

A screencapture of the Snow to Flow header, which shows an abstract collage of snowy mountains and a frozen lake under a series of snow and discharge line charts.

See the page live: https://labs.waterdata.usgs.gov/visualizations/snow-to-flow/index.html#/

A majority of the water in the Western United States comes from snowmelt. Winter snow accumulation, as well as spring snowmelt, affect streamflow and water availability for the rest of the year. Changes in the timing, magnitude, and duration of snowmelt may substantially alter downstream water availability. In fact, approximately 2 billion people are expected to experience diminished water supplies because of seasonal snowpack decline this century.

This data visualization explores the fundamentals of USGS snow hydrology research. The graphics describe important dynamics that determine how snow turns into flow, and the charts show the connection between snowpack (measured as snow water equivalent) and streamflow (measured as discharge). An R-based data pipeline using the targets package is used to fetch and process data that are displayed in the website. These files are contained in the data_processing_pipeline subdirectory.

All charts, data, and diagrams are free and open to the public. Take screencaptures of what you need, or browse through some extra images at: https://github.com/USGS-VIZLAB/snow-to-flow/tree/main/public/public_images

The Code

The project is Open Source and uses the Vue JavaScript framework in conjunction with animated Scalable Vector Graphics (SVG) and raster graphics. The build process uses the Jenkins task runner.

Project Setup

First, clone the project to your local system and cd to the cloned directory.

To run the data processing pipeline: - Within the data_processing_pipeline subdirectory, open the data_processing_pipeline.Rproj in R - Install the targets package for R install.packages('targets') and load it library(targets) - In the console run tar_make() to start the pipeline - To update the data to a new date, modify p1_today on the 1_fetch/src/1_fetch.R script

To build the website locally: - Download the Node Package Manager(NPM) dependencies by running npm install in your terminal window - Start the project by running npm run serve -- the address of the project will show on completion usually localhost:8080 - Start your browser, enter the address found above

Notes on Setup

  • You will need 'node.js' installed on your system
  • If you run into trouble starting the project, it is usually fixed by running npm rebuild node-sass

To fix that, do the following:

  • Open the 'package.json' at the root of the project
  • Go to the 'scripts' name value pair
  • Go to the 'serve' name value pair
  • Delete NODE_ENV=development from that value
  • That value should now look like "serve": "vue-cli-service serve --mode test_tier",
  • Run npm run serve again, and the project should start On Windows - You might get this error when running npm run serve

'vue-cli-service' is not recognized as an internal or external command, operable program or batch file.

  • To fix, run npm install @vue/cli-service -g to install the Vue CLI-Service globally.

Data processing

The data processing steps behind the charts and maps on the Snow-to-flow page are documented in the data_processing_pipeline subdirectory of this repo. Briefly, daily snow water equivalent values were pulled from all USDA NRCS snow telemetry sites since 1981 in 1_fetch/src/fetch_SNOTEL.R. This data was used to calculate peak SWE and SM50 at all sites with a minimum of 20 years of data in the historic record (1981-2011) in 2_process/src/prep_SNOTEL.R. In addition, April 1st SWE was accessed through time for each site and used to find the percentile in WY2021. These metrics were used to draw mouseover SWE curves and trendlines, that were pre-defined in R 6_visualize/src/trend_coords.R. The trendline charts are displayed with an svg map of the Western U.S., that was also first pre-processed in R 6_visualize/src/make_map.R and brought to life using D3.js and Vue.js. The final data files used to draw these charts are labelled SNOTEL_...csv here:https://github.com/USGS-VIZLAB/snow-to-flow/tree/main/public/data

The SWE and streamflow ridgelines are drawn using daily gridded SWE values at 4-km resolution were obtained for the 2011 and 2012 water years at each location from the National Snow & Ice Data Center. Streamflow was obtained from the USGS National Water Information System. The data generating these charts is available here: https://github.com/USGS-VIZLAB/snow-to-flow/tree/main/public/data (mmd_df_2011.csv, mmd_df_2012.csv, swe_df_2011.csv, swe_df_2012.csv).

Disclaimer

This software is preliminary or provisional and is subject to revision. It is being provided to meet the need for timely best science. The software has not received final approval by the U.S. Geological Survey (USGS). No warranty, expressed or implied, is made by the USGS or the U.S. Government as to the functionality of the software and related material nor shall the fact of release constitute any such warranty. The software is provided on the condition that neither the USGS nor the U.S. Government shall be held liable for any damages resulting from the authorized or unauthorized use of the software.

This software is provided "AS IS."

CC0

Owner

  • Name: U.S. Geological Survey
  • Login: DOI-USGS
  • Kind: organization
  • Email: gs_help_git@usgs.gov
  • Location: United States of America

By integrating our diverse scientific expertise, we understand complex natural science phenomena and provide scientific products that lead to solutions.

GitHub Events

Total
  • Watch event: 1
  • Fork event: 1
Last Year
  • Watch event: 1
  • Fork event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 594
  • Total Committers: 8
  • Avg Commits per committer: 74.25
  • Development Distribution Score (DDS): 0.566
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
coll nell c****d@g****m 258
ellen e****l@g****m 192
Marty Wernimont m****7@g****m 88
Corson-Dosch h****h@u****v 23
Althea A. Archer a****r@u****v 14
Cee Nell c****l@u****v 13
Lindsay (Carr) Platt l****t@u****v 5
Joseph Zemmels j****s@u****v 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 20
  • Total pull requests: 84
  • Average time to close issues: 4 months
  • Average time to close pull requests: 1 day
  • Total issue authors: 4
  • Total pull request authors: 7
  • Average comments per issue: 1.7
  • Average comments per pull request: 0.42
  • Merged pull requests: 84
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ellenbechtel (10)
  • cnell-usgs (7)
  • padilla410 (2)
  • aaarcher-usgs (1)
Pull Request Authors
  • cnell-usgs (27)
  • mwernimont (26)
  • ellenbechtel (23)
  • hcorson-dosch-usgs (7)
  • jzemmels (2)
  • aaarcher-usgs (1)
  • lindsayplatt (1)
Top Labels
Issue Labels
Edit an existing component (4) new component (4)
Pull Request Labels

Dependencies

package-lock.json npm
  • 1352 dependencies
package.json npm
  • @vue/cli-plugin-babel ^4.5.4 development
  • @vue/cli-plugin-eslint ^4.5.4 development
  • @vue/cli-service ^4.5.4 development
  • babel-eslint ^10.1.0 development
  • eslint ^7.7.0 development
  • eslint-plugin-vue ^6.2.2 development
  • node-sass ^4.14.1 development
  • sass-loader ^9.0.3 development
  • vue-svg-loader ^0.16.0 development
  • vue-template-compiler ^2.6.12 development
  • @diracleo/vue-scrubbable-video ^0.0.8
  • @fortawesome/fontawesome-svg-core ^1.2.30
  • @fortawesome/free-brands-svg-icons ^5.14.0
  • @fortawesome/free-solid-svg-icons ^5.14.0
  • @fortawesome/vue-fontawesome ^0.1.10
  • core-js ^3.6.5
  • d3 ^5.16.0
  • file-loader ^4.3.0
  • gsap ^3.6.0
  • html-loader ^2.0.0
  • lint ^0.7.0
  • mobile-device-detect ^0.4.3
  • roughjs ^4.3.1
  • uswds ^2.8.1
  • v-img ^0.2.0
  • vue ^2.6.12
  • vue-analytics ^5.22.1
  • vue-browser-detect-plugin ^0.1.13
  • vue-carousel ^0.18.0
  • vue-mobile-detection ^1.0.0
  • vue-parallaxy ^1.1.1
  • vue-router ^3.4.3
  • vuetify ^2.4.3
  • vuex ^3.5.1
  • webpack ^4.42.0
Dockerfile docker
  • artifactory.wma.chs.usgs.gov/docker-official-mirror/debian stretch build