Supply Explorer Development

Updated May 1, 2018
  

Goal is to add on the following surface and snow water supply information to DWR reservoir levels: -Sierra Nevada Snowpack (integration with Bhavesh) -Colorado River Reservoirs (Mead and Powell) -Diamond Valley from CDEC

The initial, high-level goal for this three week project is to transform the CaDC Reservoir Explorer from an interactive data visualization to a truly real-time data product. Below is one way we can accomplish this.

  • The Reservoir Explorer currently pulls historical reservoir storage data from a table hosted by a service called Carto (https://california-data-collaborative.carto.com/tables/reservoir_levels_1/public/map).

  • To programmatically update a Carto table, we can leverage their synced tables feature (https://carto.com/blog/synced-tables-create-real-time-maps-from-data-anywhere).

  • Given the above, the first technical challenge we have to tackle is getting up-to-date reservoir storage data to a public endpoint in the data format expected by the Reservoir Explorer. Using ParseKit, reservoir storage data can be extracted from its source, transformed into the format expected by the Reservoir Explorer, and loaded into a California Data Collaborative AWS s3 bucket. From here, AWS provides the necessary architecture for exposing a public endpoint for Carto to pull from. The source data are available through the California Data Exchange Center (http://cdec.water.ca.gov/reservoir.html).

  • Once we have data that are real-time, properly-formatted, and machine-accessible: we will have to update the Reservoir Explorer's source code as well. At present, start and end dates are hard-coded. Since we'll want to always display the latest data, the js/script.js file has to change to reflect that. This is the second technical challenge we have to tackle. To see one way this can be achieved, feel free to reference how we do it for one of the tools we provide to water managers, the Efficiency Explorer (https://github.com/California-Data-Collaborative/efficiency-explorer/blob/master/js/objects.js).

  • I, David, can be a reference for the Reservoir Explorer source code (david@argolabs.org).

If we are able to tackle these challenges early and there is interest, we can certainly explore additional development! If we do not go beyond what's described above, still remember that the CaDC develops open-source so there will always be opportunity to collaborate should passion or curiosity strike down the road...D