Skip to content

moeinp70/PolimiGeo

Repository files navigation

SoftwareEngineering-project

This project provides an analysis of flood risk across various administrative levels in Italy, including provinces, regions, and municipalities. The data is sourced from the IdroGEO API PIR (Hazards and risk indicators), and the shapefiles are acquired from ISTAT

Meet Our Team

Four Geoinformatics Engineering students at Politecnico di Milano

Moein Zadeh

Moein Zadeh

Born in Iran, Qom.
AI and Deep Learning enthusiast.
Adventure and Gardening

Mail | GitHub | LinkedIn

Saeed Mehdizadeh

Saeed Mehdizadeh

Born in Bijar , Iran
Remote sesning expert ... .
Main Hubby: Videography

Mail | GitHub | LinkedIn

Vanessa

Vanessa Goletti

Born in Italy, Viterbo
Bcs in Management engineering.
Gym and climbing

Mail | GitHub | LinkedIn

Hadi Kheiri

Hadi Kheiri

Born in Tabriz , Iran
Bcs in Geoinformatics eng.
Gym and Traveling

Mail | GitHub | LinkedIn

Flood Risk Analysis Project

This project provides a dashboard for analyzing flood risk data in Italy. It allows users to view maps of flood risk, generate reports, and visualize data. There are two types of users: regular users and admin users. Admin users can update the database.

Features

  • View flood risk data on an interactive map
  • Generate reports in CSV and Excel formats
  • Visualize data using charts
  • User authentication with different roles (user and admin)

Requirements

  • Python 3.7+
  • PostgreSQL
  • The following Python packages (listed in requirements.txt):
    • Flask
    • psycopg2
    • pandas
    • geopandas
    • folium
    • branca
    • requests
    • werkzeug
    • IPython
    • plotly
    • xlsxwriter
    • matplotlib
    • fpdf
    • jupyter
    • ipykernel

Setup

  1. Clone the repository:

    git clone https://github.com/moeinp70/PolimiGeo.git
    cd PolimiGeo
  2. Create a virtual environment and install the required packages:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    pip install -r requirements.txt
  3. Install Jupyter Notebook and IPython Kernel:

    pip install jupyter ipykernel
    python -m ipykernel install --user --name=venv
  4. Setup PostgreSQL database:

    • Create a new PostgreSQL database named flood_se.
    • Update the get_db_connection function in functions.py if your database credentials are different.
  5. Run the fetch_db_final.py script to populate the database:

    python fetch_db_final.py
  6. Run the Flask application (app.py):

    python app.py
  7. Run the Jupyter Notebook for the dashboard:

    jupyter notebook
  8. Select the Virtual Environment Kernel:

    • Open dashboard.ipynb in Jupyter Notebook.
    • Click on Kernel > Change kernel > venv.

Usage

  • Open dashboard.ipynb in Jupyter Notebook.
  • The first screen will prompt you to log in or sign up.
  • Once logged in, you can view the dashboard:
    • Select the administrative level (province, region, or municipality).
    • Select a specific area to view detailed data and generate reports.
  • Admin users can click the "Update Database" button to refresh the database with the latest data.

Notes

  • Ensure PostgreSQL server is running before starting the application.
  • Default admin credentials: username: admin, password: admin.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages