
Create a spatial database in postgres with pgAdmin, including a new database and a login role with privileges. Install PostGIS extensions to enable spatial data storage.
Download and load the water consumption dataset by suburb. Install Excel reading and data manipulation libraries and analyze monthly kilolitres to identify high-use suburbs for potential alerts or distribution control.
Register the geo admin for a Django model, read Excel data into a pandas DataFrame, convert rows to point geometries, and load them into spatial back-end with Leaflet map verification.
Add the django geo json serializer and leaflet configuration to read json spatial data, set a default center and zoom, and configure base maps like open street map.
Develop the front end by adding static files in a Django project, downloading the base template, and integrating the static folder into the water watch app.
Create and wire the index view by mapping the root URL to the home view, render the index HTML on request, and load the leaflet map in the browser.
Apply leaflet badges and styling to the index page, add left and right sidebars with toggle buttons, initialize the map, and test styling so the map fills the screen.
Create data endpoints for a map app, exposing two JSON datasets—water consumption and top 10 consumers—serialized from the data model and served via HTTP responses.
Display water consumption data on the map by fetching JSON via Ajax from the water consumption endpoint, render circle markers scaled by kilolitre value, and show suburb popups.
Create a bottom-right legend for the map that defines three circle markers by kilolitre ranges (0–4, 5–10, 11–20), with labels and a title to describe data size.
Create a bar chart of top 10 water consumers in kilolitres by fetching JSON data via ajax, parsing suburb labels and kilolitre values, and rendering with chalkboard js on canvas.
Welcome to the Creating Smart Maps with Python and Leaflet Windows Version course. We'll be building a python GIS application from scratch using a variety of open source technologies. The purpose of this course and many more to follow, is to learn to create geospatial analytics and convert it into a functional application.
In our use case we will be working with residential water consumption data and we will be applying data processing techniques to extract transform and load the data into our spatial database. Once we have processed and cleaned the data, we will use it as a data source for building our GeoDjango Web Map Application.
We will be powering our application with a PostgreSQL and PostGIS database. In the Front-End we'll use Bootstrap, JavaScript, Leaflet and Ajax. On the server side we'll be using Python and Django combined with use of scientific libraries like pandas, for our data transformation and conversion operations. The operating system that we will be working on is Windows 10 and Server 2016.
Some skills that you can expect to derive after completing the course are the following:
You will learn how to build a Spatial Database using Postgresql and PostGIS.
You will learn how to create charts with Chart.js.
You will learn to build Web Maps with Leaflet.js.
You will learn how to build REST API Endpoints.
You will learn some JavaScript programming.
You will learn how to build Web Applications using the Django MVC framework.