Skip to content

Project Goals Use the power of Folium package to visualize data generated from Django Database on a Leaflet JS map. Use Django Admin Site to Import and Export data into and from the database. Visualize data using Folium's Simple Markers and Marker Cluster.

License

Notifications You must be signed in to change notification settings

MoustafaShaaban/Django_and_Folium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

django_and_folium

Project Goals

  • Use Django admin site to import data from different sources (CSV, JSON, ...) into the database.

  • Importing and Exporting the data from the website directly (without using the Django Admin Site).

  • Use the power of Folium to visualize data generated from Django Database on a Leaflet JS map.

  • Visualize data using Folium's Simple Markers and Marker Cluster.

Data Sources

The data used in this project is downloaded from the Seattle City Open Data website, The following Datasets are used:

Project Preview

Libraries and Packages used

To get started with this project

  • Clone the repository: git clone https://github.com/MoustafaShaaban/Django_and_Folium.git

  • Change directory to django_and_folium cd django_and_folium

  • Open the terminal or CMD to create a virtual environment like Python virtual environment (venv) or pipenv and activate it.

    • python -m venv venv Create the venv

    • source venv/bin/activate On Linux

    • venv/Scripts/activate On Windows

    • source venv/Scripts/activate Git Bash on Windows

  • Install requirements.txt: python -m pip install -r requirements/local.txt

  • Create the database by running the following commands: python manage.py makemigrations python manage.py migrate

  • Create a super user: python manage.py createsuperuser

  • Login to the admin site with your super user and add the data in 'seattle/data' folder using the import functionality in each model.

  • Run the project: python manage.py runserver


Version 2:

In this version I improved the code by combining all the data in one Django Function View to show it in one map.

Added Layer Control functionality to switch between different layers.

Changed the default style of the Markers and used font awesome icons:

* ` h-square ` Icon for Hospitals Layer.
* ` graduation-cap ` Icon for Public Schools Layer.
* ` book ` Icon for Public Libraries Layer.

Version 2 Preview


Version 3:

In this version I added the support of Importing and Exporting the data from the website directly (without using the Django Admin Site).

Version 3 Preview

References:

*django-bootstrap-messages

About

Project Goals Use the power of Folium package to visualize data generated from Django Database on a Leaflet JS map. Use Django Admin Site to Import and Export data into and from the database. Visualize data using Folium's Simple Markers and Marker Cluster.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published