Skip to content

danhphan/spatial-analysis-intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spatial Analysis Introduction

An introduction on spatial analysis with python.

This project uses a study case to introduce basic geometry operations and fundemental spatial analysis skills for newcomers.

We going to explore the crime rate in Victora.

The crime index is calculated for every postcode, similar to the burglarystatistics at racv website.

Datasets

The datasets are publicly available from following websites:

Table of Content

Geometry with Shapely 01_It-starts-with-a-point.ipynb
Tabular analysis with Pandas 02_Tabular-analysis-with-pandas.ipynb
Spatial analysis with Geopandas 03_Spatial-analysis-with-geopandas.ipynb
Victoria household info 04_Melbourne_households.ipynb
Victoria crime index 05_Melbourne-crime-index.ipynb
Visualising spatial data 06_Visualise_spatial_data.ipynb

Installation notes

Following this tutorial will require recent installations of:

  • Python >= 3.6
  • requests
  • numpy
  • shapely
  • matplotlib
  • pandas
  • geopandas >= 0.3.0
  • matplotlib
  • rtree
  • PySAL
  • xlrd
  • openpyxl
  • folium
  • seaborn
  • mapclassify
  • Jupyter Notebook

If you do not yet have these packages installed, it is recommended to use the conda package manager to install all the requirements (you can install miniconda or install the (larger) Anaconda distribution, found at https://www.anaconda.com/download/).

Once this is installed, the following command will install all required packages in your Python environment:

conda create -n spatial python=3.7

conda activate spatial

pip install -r requirements.txt

Fix the error when read excel files using Pandas

!pip install xlrd !pip install openpyxl