Constituency Mapper is a Flask-based application designed to manage and visualize constituency data using a MySQL database and Overpass API. The application allows users to mark roads as visited and track leafletters.
- Interactive Map and Database Integration: Visualize and manage constituency data, including roads and their visited status.
- Leafletter Management: Track activities of leafletters visiting various roads.
1. Display Constituencies and Roads: The root route (/) displays a table of roads within a specified constituency. Users can mark roads as visited.
2. Display Map: The /map route displays an interactive map of the constituency, showing the roads and their statuses.
-
Python 3.12
-
MySQL server - We recommend using Docker to run a MySQL server for development purposes.
-
Poetry
If you want to contribute to this project, please ensure you have the prerequisite software installed.
1. Install Prerequisites:
To ensure you can get developing as quickly as possible, ensure you have all the requirements installed as outlined in the "prerequisites" section.
2. Clone the Repository:
git clone https://github.com/KouroshSimpkins/Constituency-Mapper.git
cd constituency-mapper
3. Install Dependencies:
The dependencies are different to the prerequisites, you can view them by looking at the pyproject.toml file.
Ensure you have Poetry installed, then run:
poetry install
4. Set Up MySQL Database:
Ensure your MySQL server is running on localhost.
We highly recommend running Docker in a mysql container when developing.
5. Initialize the Database:
Start the Flask application.
python app.py
Then, open a browser and navigate to http://localhost:4000/initdb to initialize the database.
- Access the application by navigating to http://localhost:4000 in your web browser.
- Use the default route to view and update the roads' visited status.
- Use the /map route to view the interactive map.
- Kourosh Simpkins kouroshsimpkins@gmail.com
- Erdinc Mutlu erdincmutlu@gmail.com