=============== 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: * :ref:`map-view` (with a Quick Temperature Display) * :ref:`aoi-selector` * :ref:`gis-download-panel` * :ref:`time-series-panel` * :ref:`info-panel` and :ref:`display-tools` .. image:: resources/THORR_web_96dpi.png .. _map-view: 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. .. _aoi-selector: 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: 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: 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: 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. .. _info-panel: 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): 1. 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: .. code-block:: console git clone https://github.com/UW-SASWE/THORR 2. Copy suitable front-end code: For MySQL database: .. code-block:: console cp -r THORR/webapp/thorr/mysql/* ./ For PostgreSQL database: .. code-block:: console cp -r THORR/webapp/thorr/postgresql/* ./ 3. Delete the cloned ``THORR`` directory: .. code-block:: console rm -r THORR 4. In the ``php`` directory, create a configuration file named ``dbConfig.php``. This file contains the database connection information. The content of the file should be as follows: .. code-block:: php Update the values of the variables to match the database connection information.