Flask based website to display precipitation plots from geodesymiami/Precip.
- Go to
/var/www/and clone the repository:
git clone git@github.com:geodesymiami/precip_web
- Install the required packages into an virtual environment:
python -m venv web_env
source web_env/bin/activate
pip install -r requirements.txt-
Make sure the MAPBOX_ACCESS_TOKEN is set in
mapbox_access_token.env. If it exists it will use~accounts/mapbox_access_token.env. -
Run the website
cd precip_web/
python run.py
- Open Website at the given address (chrome/safari)
127.0.0.1:5000
or check using
curl -s http://127.0.0.1:5000
- On a remote server, to configure Apache create
/etc/apache2/sites-available/precip_web.confcontaining
<VirtualHost *:80>
# Alias directives must come BEFORE WSGIScriptAlias to prevent Flask from catching these URLs
# Serve /data/HDF5EOS/ as static files (bypass WSGI/Flask)
Alias /data/HDF5EOS/ /data/HDF5EOS/
<Directory /data/HDF5EOS/>
Options Indexes FollowSymLinks
Require all granted
</Directory>
# Serve /data/precip_plots/ as static files
Alias /data/precip_plots/ /data/precip_plots/
<Directory /data/precip_plots/>
Options Indexes FollowSymLinks
Require all granted
</Directory>
# Flask/WSGI configuration (must come AFTER Alias directives)
WSGIDaemonProcess precip_web python-home=/var/www/Precip_web/web_env python-path=/var/www/Precip_web
WSGIProcessGroup precip_web
WSGIScriptAlias / /var/www/Precip_web/web.wsgi
<Directory /var/www/Precip_web/>
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/precip_web_error.log
CustomLog ${APACHE_LOG_DIR}/precip_web_access.log combined
</VirtualHost>
or
sudo cp precip_web.conf /etc/apache2/sites-available/
- Start Apache using:
sudo a2ensite precip_web.conf
sudo systemctl restart apache2
- Check for errors using:
sudo tail -20 /var/log/apache2/error.log
If you see a Traceback, then python could not properly run your precip_web.wsgi or app.py.
- Add a map to the website
- Parse data from the volcano list
- Run geodesymiami/Precip on Merapi, hosted on jetstream
- Set up cron job to automatically run precip plots (0 0 1 * * run_plot_precipitation_all.py)
- fix title (mobile)
- remove automatic scaling
- add magnify icon for image hover
- add esc on image zoom to escape
- fix citations in about
- remove designed by kawan
- add no bin button
- Use Mapbox for satellite imagery map
- Add UM GeodesyLab logo
- Add a hover effect over points on the map
- Add volcano metadata on page
- Add a link to the volcano's smithsonian page
- Add a separate page for the volcano list (by country)
- Add a search bar to search for volcanoes ?
- Indicate the last time the data was updated and plot was generated