
Build a spatial data visualization and machine learning dashboard in python using buka to transform, visualize, and forecast earthquakes from 1965–2016 data for 2017.
Install python version 3.7 on Windows, add to environment variables, verify with python --version, then install anaconda to access Jupiter notebooks for data visualization and machine learning.
Install and upgrade Python tools, then set up Bokeh for dashboards, pandas for data handling, and scikit-learn for machine learning, and download the data set to start the project.
Learn data preparation in Python using Jupiter notebook: load a CSV, extract year from dates, count yearly earthquakes, and convert to a Bokeh column data source for interactive visualizations.
Create a styled bar chart to visualize frequency of earthquakes by year using a reusable style function, customizing titles, axis labels, tooltips, and legend placement.
Create a line chart to visualize yearly earthquakes by loading the data source, configuring tooltips, plotting a teal line with circular markers in a Jupyter notebook.
Create a donut chart in Python to visualize earthquake types with an annular wedge layout. Use a category 20 C color palette and a top-right legend with tooltips.
Create a magnitude plot in Python to visualize the average magnitude and maximum magnitude by year. The plot uses two lines with tooltips for year, average magnitude, and max magnitude.
Create an interactive geo map plot by importing map tiles, transforming latitude and longitude to mercator coordinates, and plotting earthquake magnitudes with tooltips and a custom map style.
Learn to build a grid plot dashboard by combining multiple plots into a grid, returning plots, and rendering the dashboard in an external html view.
Perform data pre-processing to prepare training data (1965–2016) and test data (2017) for earthquake prediction. Clean, rename, and align features (latitude, longitude, magnitude, depth) and remove nulls to train models.
Import machine learning libraries, split data into training and testing sets, and train a random forest regressor; optimize with grid search CV and validate out-of-sample 2017 earthquakes to assess accuracy.
Build a prediction dataset by collecting magnitudes and depths into lists, then create a data frame with latitude, longitude, magnitude, depth, score, and year 2017, noting 82 percent accuracy.
Add predicted earthquake values to the dashboard plots, updating the magnitude plot alongside bar, line, and donut charts, using a dark theme and a single-cell workflow for 2017 predictions.
Enhance magnitude plots by incorporating predicted data in Python, creating average and max magnitude values for 2017, and updating data sources to compare observed and predicted trends.
Add predicted data to a map plot by converting lat/long to Mercator projection and building separate data sources for actual and predicted data.
Create a grid plot dashboard by importing grid plot, building the grid, and showing the final results that integrate actual 1965–2016 earthquake data with 2017 predicted magnitude.
Install Visual Studio Code to write the server that hosts your dashboard for spatial data visualization and machine learning in Python.
Create a project folder, set up a Python virtual environment, install Flask, configure Visual Studio Code, place the dashboard in templates, and build a Flask server to serve it.
Build and run a Flask server to serve a dashboard from templates, using app initialization, render_template, and debugging on port 5000, with styling tweaks for a dark theme.
Welcome to the 'Spatial Data Visualization and Machine Learning in Python' course.
In this course we will be building a spatial data analytics dashboard using bokeh and python.
Bokeh is a very powerful data visualization library that is used for building a wide range
of interactive plots and dashboards using the python programming language.
It also converts python code into html and JavaScript code, which allows plots to be
hosted on servers and displayed in web browsers.
We be building a predictive model that we will use to do a further analysis, on our data
and plot it's forecast results alongside the dataset that we will be focusing on.
We will be visualizing our data in a variety of bokeh charts, which we will explore in depth.
Once we understand each plot in depth, we will be equipped with the knowledge to build a dashboard
that we will use to analyze our data.
And once we have built our dashboard, we will then create a lightweight server that we will use to
serve our dashboard and make it accessible via a URL.
You will learn how to visualize spatial data in maps and charts
You will learn data analysis using jupyter notebook
You will learn how to manipulate, clean and transform data
You will learn how to use the Bokeh library
You will learn machine learning with geospatial data
You will learn basic geo mapping
You will learn how to create dashboards