WSWCWaterDataExchange / WestDAAT

Managing the code of the Western States Water Data Access and Analysis Tool (WestDAAT)
https://westdaat.westernstateswater.org/
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

Future work: create heatmaps showing the intensity of permitted volume or flow #258

Open amabdallah opened 1 year ago

amabdallah commented 1 year ago

Problem With this massive data in WestDAAT, it's hard to get an insight into where the big water rights exist in the West or even within a single state. Idea1 Heatmaps can be really cool and practical and show the intensity and distribution of something of interest https://docs.mapbox.com/mapbox-gl-js/example/heatmap-layer/

Idea2 The current "scale" or "range" underlying toggle point size might need to be adjusted to be more effective. Right now, it does require some user experience to use filters to narrow down the effective range for this point size to work better (e.g., use state filter and zoom in to an area to get a better sense of where big water rights exist https://westdaat.westernstateswater.org/?state=N4Ig7gTiBcoA4HsA2BPJBLAdgUxgbQF0AaETJAE3QDF0kAXbCAEQEM6WZQk306BXcrmiY%2BSJCSQJMAc14ChIsSUoRsAYzropAZxgBmZWxYAFBFjq7oAdgC%2BNkgFsWcTiABeCBA4Ay2AG7YSDAALAB0AGwADABMAKx6egCMsQAc0QkpkSmxEjz8giGJoVkJ0cHhVpFVicFWwRJSsvlCALSJkeGhwYmJ4Snh4bEAnLWJQ3r24BDkrojmAMrobkIgfiCOzgDiEAh8cFjSMCAARnwgdkA

image

amabdallah commented 1 year ago

Background One value of WestDAAT to our individual states is how we can offer them insights into their own data.

@Rhipeus wrote in Slack

As for the heatmap idea...I don't have an exact number but it is very massive. The problem is that the vector tiles don't have enough data to accurately render the heatmap. Thus, we'd have to use something closer to the raw data and the last time I tried anything similar to that, it was DOA due to performance problems in the browser (I wish we were able to use the raw data because it would make a lot of things significantly easier). I don't know what would happen trying to generate a heatmap from all of the data but mapbox's example uses ~6000 datapoints, you have 2.8 million that would need to be accounted for. It is possible something could be done with summarizing the data in some way but then you'd lose most or all ability to filter. Then you still have problems about how to aggregate the data when you have a single water right with a specific amount, spread across a large area in multiple sites. You can't say all of the water is used at all of the spots and you can't be certain how that water right is divided up. Plus, without consistent types of data (flow vs volume) you cannot render a map that makes since for the entire region and can really only work state by state. And these are just the immediate issues that come to mind. It may be doable with a fair number of compromises. We would probably need to work together to figure out what those compromises would be. I could eventually get you an exact figure but it is several weeks worth of work and will likely carry a price tag in the 10s of thousands.

Adel wrote One other idea I thought of is that we generate separate Maptile that aggregates say volume of PODs into pixels of 30 feet by 30 feet. So this is a prepared raster maptiler layer. See how OpenET does it https://explore.etdata.org/

Nathan wrote I thought about that. That is the losing any ability to filter and refine.

Adel wrote Can the pixel have pre-generated intensity values (permitted volume for each beneficial use and water source type)? I can imagine they'll be a lot of combinations

Nathan wrote I don't think so but I'm not certain

Adel Something to look more into https://docs.mapbox.com/api/maps/raster-tiles/