Web Application
THORR is accessible as an online web application via https://depts.washington.edu/saswe/thorr. The web application provides an interactive spatial and temporal oveview of the water temperature estimates generated by THORR.
Features:
The main interface of the THORR web application inclueds thefollowing features:
Map view (with a Quick Temperature Display)
Map view
The map view displays the estimated water temperature for a given river network in a spatial manner. The river network is divided into reaches and the estimated water temperature is displayed as a color gradient on the map. The map view also includes a Quick Temperature Display that shows the estimated water temperature when the mouse is hovered over a reach on the map.
Area of Interest Slector
The Area of Interest Selector allows users to select a specific area of interest on the map heirarchically. The user can select a specific basin, river, reach or dam. The selected area of interest is centered on the map and for reaches and dams, a time series of the estimated water temperature for any selected area is displayed in the Time Series Panel.
GIS Download Panel
The GIS Download Panel allows users to download the GIS data for the selected area of interest. The GIS data is downloaded as a GeoJSON file that includes the estimated water temperature for each reach, averaged over a specified time period. If no time perod is specified, the average is calcuated from the past 90 days of available data.
Time Series Panel
When a reach or dam is selected, the Time Series Panel displays a time series of the estimated water temperature for the selected area. There are three different time series available: water temperature estimates, long-term avearages, and deviations. The long-term averages are calculated using water temperature estimates from the most recent 30-year period where estimated data is available. The deviations are calculated by subtracting the temperature estimates from long-term averages. A weekly, bi-weekly, monthly or irregular scale can be selected for the time series. The time series can also be downloaded as a CSV file.
Display Tools
The Display Tools are buttons that control the arrangement of the interface such as hiding the time series panel or the entire left pane. There is also a reset button if the user wants to deselect an area of interest and reset the entinre map view.
Information Panel
Buttons in the information panel point to attribution information, the THORR GitHub repository, and a simple guide on how to navigate the THORR web application.
Setting up for Postgresql/MySQL platforms
Users can also cusomize the THORR web application to use their own Postgresql or MySQL database. The following steps are required to set up the web application for a custom database (after creating a new database using THORR’s database management module and generating water temperature estimates):
Clone code to the appropriate directory on a web server. In the terminal, navigate to the directory where you want to download the code and run the following command:
git clone https://github.com/UW-SASWE/THORRCopy suitable front-end code:
For MySQL database:
cp -r THORR/webapp/thorr/mysql/* ./For PostgreSQL database:
cp -r THORR/webapp/thorr/postgresql/* ./Delete the cloned
THORRdirectory:rm -r THORRIn the
phpdirectory, create a configuration file nameddbConfig.php. This file contains the database connection information. The content of the file should be as follows:<?php $host = "localhost"; $username = "database_username"; $password = "password"; $port = 1234; $dbname = 'database_name'; $schema = 'schema_name' ?>Update the values of the variables to match the database connection information.