Skip to content

Latest commit

 

History

History

Lab07

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

logo

Intro to geospatial analysis and database using Python - PTUA 2024

This is repository containing materials for Programming Tools for Urban Analytics Class

The lab is going to be run in jupyter notebook

Lab requirements

Please create new environmet for this lab using Python 3.12

Using Anaconda please install the following

Note: if you use MacOS, you can install the packages via terminal directly. if you use Windows, you can open Anaconda Prompt or cmd.exe Prompt and install the packages from there.

#Check current conda channel priority

conda config --get channels

#Switch your default conda channel to conda-forge and set it as the highest priority

conda config --add channels conda-forge 

#Create new environment

conda create --name geospatial python=3.12

#Check existing conda environment

conda info --envs

#Make sure that you are going to work in newly created environment

conda activate geospatial

# Install jupyter lab

conda install -c conda-forge jupyterlab

# Install packages

conda install -c conda-forge geopandas
conda install -c conda-forge matplotlib
conda install -c conda-forge mapclassify
conda install -c conda-forge contextily
conda install -c conda-forge pyarrow
conda install -c conda-forge geoplot
conda install -c conda-forge seaborn
conda install -c conda-forge descartes 

#Alternatively run the installation in one line

conda install -c conda-forge jupyterlab matplotlib geopandas mapclassify contextily pyarrow geoplot seaborn descartes 

#Start the  jupyter lab

jupyter lab

More information about creating python virtual environment with conda can be found from here. More details about managing conda channel can be found from 1 and 2. Difference between Anaconda Prompt and Anaconda Powershell Prompt can be found from 3.

If you have difficult to install contextily from conda install, you can also try to use mamba to install. Here is the mamba installation guidance and explanation in conda-forge.