Giter Site home page Giter Site logo

sdl60660 / river-runner Goto Github PK

View Code? Open in Web Editor NEW
374.0 7.0 25.0 114.53 MB

Uses USGS/MERIT Basin data to visualize the path of a rain droplet to its endpoint.

Home Page: https://river-runner-global.samlearner.com/

License: GNU General Public License v3.0

CSS 1.05% HTML 1.39% JavaScript 28.29% Svelte 60.36% Python 3.74% GLSL 5.14% Procfile 0.02% SCSS 0.01%
hydrology mapping usgs usgs-data usgs-api visualization data-visualization mapbox mapping-tools svelte river-runner yellowstone-national-park nhdplus ocean geology 3d topography nhdplus-data mountain-features sci-viz

river-runner's Introduction

River Runner

This project visualizes the path of a rain droplet from any point in the world to its end point (usually an ocean or an inland water features). It will find the closest river/stream flowline coordinate to a click/search and then animate along that flowline's downstream path. The data used in this project comes from the River Runner API, which is based on several open source projects and datasets. Similar data, initially used for the project, came from the USGS's NHDPlus data and their NLDI API

I've used mapbox to animate the downstream path, but needed to make all sorts of adjustments for elevation and bearing changes to prevent jerkiness/nausea (just moving from point to point feels a little like flying through turbulence while shaking your head side-to-side).

I've hosted a dataset with NHDPlus Value Added Attributes on Firebase, which allows me to group flowlines into their parent features and determine distances quickly.

Note: The newly-released, global version of this project is in beta. We currently have relatively poor coverage of river names outside of the United States, which we are hoping to fill out, as well as some UX edge-cases and bugs that we hope to resolve.

Examples

Here are a couple of examples of what it looks like in action.

This is a section of the path from eastern Turkey to the Persian Gulf:

Screenshot of the river runner in progress from eastern Turkey to the Persian Gulf. Mountain features and river are visible.

Here's part of the path from Southwest Arizona down to the Mexican border:

Screenshot of the river runner in progress from Southwest Arizona to Mexican border. Mountain features, desert, and river are visible.

You can look at a heatmap of previous searches here or find a list of some of our favorite paths here

Running this on your own

If you'd like to run this locally and play around with it, just run the following commands in your terminal (assuming you have npm installed):

  1. git clone https://github.com/sdl60660/river-runner.git
  2. cd river-runner
  3. npm install
  4. npm run dev (then follow the link to the local server, probably http://localhost:5000).
  5. If you're running this on your own or forking into a new app, please replace the Mapbox Access Token strings in src/access_tokens.js with your own. You can generate a couple of tokens (for free), by creating a Mapbox account and visiting this page. You'll need to generate two separate tokens to replace the ones in the existing file, but it does not matter which serves as the primary token and which serves as the secondary token.

Supporters

Thank you to Mapbox for sponsoring this project!

mapbox-logo-black

Updates

  • January 2022: The global version of this tool is now released and in beta! While some lingering issues are resolved and it remains in beta, it can be found on this branch, while the original, US-only version is preserved here in Github, and at its original URL: https://river-runner.samlearner.com/. This is to avoid any breaking changes to existing share links/paths due to any discrepancies and because minor US issues persist on the global version, mainly when paths involve dams, canals, or conduits.

If you'd like to be notified about major updates to the tool, you can sign up for an email list here.

river-runner's People

Contributors

sdl60660 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

river-runner's Issues

Colorado River Flow

I live at the headwaters of the Colorado River. Around 70% of the water in our watershed is pumped through tunnels under the Continental Divide to the east side of the divide. This creates a misconception on the part of people on the Front Range that makes them ignorant about where their water comes from. Anyway this can be fixed to show that the majority of those raindrops in our watershed do not go west.

Spins forever on Ketchum, Idaho

If I click on the mountains in central Idaho, I sometimes get "can't find a flowpath" and sometimes it just spins forever (>30 minutes).

Data issue with San Marcos river

First of all, a fantastic project.

Not sure if this is the right place to report "data" issues, but when selecting San Marcos, TX, it incorrectly reports the San Marcos River (47 km) flowing into Brushy Creek (78 km).

Brushy Creek is a tributary of the San Marcos, joining the San Marcos river just upstream of Stairtown, TX, as you can see on this Topo Map

Western Canadian River Names are Incorrect

(see the attachment) For example, in River Runner, the names of various branches of the the South Saskatchewan River and the Saskatchewan River (when the raindrop falls in the headwaters of the Old Man River at 50.11402,-114.70464) are mostly called "St Mary's River" (See the first column.) This is incorrect. The third column shows the correct names at each major confluence. The second column shows the coordinates of each major confluence. The St. Mary's River is a minor tributary entering the Old Man near Lethbridge, Alberta.

Another error is that the Red River of the North ends where it flows into Lake Winnipeg but River Runner has it going through Lake Winnipeg and on to Hudson Bay through what is known as the Nelson River.

What can be done to fix this behaviour? There are many other examples of this kind dependin on where the raindrop fall. River Runner is a great app but it won't be truly great until these bugs are squashed. Is there anything I can do to help?

Tributary Names South Saskatchewan River Basin and Nelson River basin.pdf

River Aire UK route

My drop, from Leeds, jumps out of the river Aire, below Leeds in the UK, and trundles overland for a while between Allerton Bywater and Knottingley.

River Runner error

Hebrew is backwards

Might not be an issue on your end at all, but I noticed Israel appears like this:
לארשי
But it should be:
׳שראל

All Hebrew is reading left to right instead of right to left. I cannot confirm the issue affects other RTL languages, but I would assume so.

Bug on locator map highlighting

Sections are staying highlighted on the locator minimap after the runner passes them. Seems to be happening in a way it wasn't before the latest changes.

Ends and resets abruptly; forced re-navigation

Before I can process what I'm seeing, the run ends at a coastline and resets to show the entire continental US. It's jarring.

To watch the same run again, or to do another run in an area near the first, the user is forced to restart zooming and searching.

Ideally, IMO, when the run is paused, the user should be able to interact with the map; continuing the run moves the view back to following the run. At the end, the run should just stop and remain viewing the end. Maybe an interface element to "run again" which returns the user to the start.

Endorheic Basins (Example: Lake Atitlán, Guatemala)

Lake Atitlán is a very deep, very picturesque lake in the Guatemalan Highlands (think Lake Como, but ringed by several immense volcanoes), the result of a caldera explosion many years ago. It does not drain into the Pacific Ocean (at least not directly).

There are many such basins around the world (https://en.wikipedia.org/wiki/Endorheic_basin).

The application should reflect these flows, if possible, so that a rain drop placed in the Atitlan basin, flows to the lake, and stops there. It would be an incredible update to show the many people living around these lakes or swamps that their water doesn't actually go all that far. Unfortunately, agricultural runoff in the Atitlan basin doesn't "disappear" (does it ever though?). It just flows a few kilometers and builds up in the lake, threatening this unique ecosystem! The same applies to other fragile ecosystems, including desert basins, swamps, etc.

Aside from that, excellent application for teaching!

Still getting issues with very short flowpaths

Very rare and only seems to happen with basically non-existent flowpaths, but need to either add a fix or add error handling to keep it from hanging in search step (see "Pope Valley, CA")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.