From 6a19b4ba4076b415bf8dbede616d9b33ff4a0332 Mon Sep 17 00:00:00 2001 From: TydeONS <166495740+TydeONS@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:48:06 +0100 Subject: [PATCH 1/5] Update python_install_anaconda.md --- _docs/guides/python_install_anaconda.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/_docs/guides/python_install_anaconda.md b/_docs/guides/python_install_anaconda.md index 0214928..da8f15e 100644 --- a/_docs/guides/python_install_anaconda.md +++ b/_docs/guides/python_install_anaconda.md @@ -8,8 +8,9 @@ description: Step-by-step installation instructions for Python geospatial packag ## Before you start: - -You will need to install **Anaconda** This is a Python distribution used for data science, [more information here](https://www.anaconda.com/download). +The goal of this guide is to create a Python virtual environment which will support geospatial work in Python. A virtual environment has two components: the Python interpreter that the virtual environment runs on, and a folder containing the libraries installed in the virtual environment. The main reason we use virtual environments is to isolate different Python projects because Python cannot simultaneously use multiple versions of the same package. The isolated environment also ensures that there are no complications with different tasks requiring different and conflicting dependencies. + +Before you create the Python virtual environment, you will need to install **Anaconda**. This is a distribution of Python used for data science, [more information here]((https://www.anaconda.com/download). If you are part of another government department and using a networked laptop, please approach your IT team for how to install Anaconda Suite. @@ -50,7 +51,7 @@ If the steps until now have worked it will now say “(geopy38)” before the pr *conda install pip* -This could also take a little while as it’s a large install. This would be a good time to make use of that coffee from earlier. ☕ +This could also take a little while as it’s a large install. This would be a good time to make use of that coffee from earlier. ☕ PIP (Package Installer for Python) is used to install and manage packages that are not part of the [Python standard library](https://docs.python.org/3/py-modindex.html). You can use pip to install, upgrade, and uninstall packages. ![Setting up the new environment](img/geopy_install_05_pip.png) @@ -88,7 +89,16 @@ Now we can install the packages. Type each of these in sequence, followed by ent *python -m ipykernel install \--user \--name geopy38* - +Why install these packages in particular? +numpy: +Useful for creating arrays (of XY coordinates or an elevation raster, for example) and manipulating numerical data inside them. +pandas: +Data manipulation package for tabular data (DataFrames). Import, export, clean, aggregate data with pandas. +ipython: +An interactive python shell. Acts as a kernel for Jupyter notebooks. +ipykernel: +Built on top of ipython. In Jupyter notebooks, you’re using ipykernel to execute code interactively. + ## Testing the installation & further activities: From e017cbff9b762088f08dcf149a4183e406b5a119 Mon Sep 17 00:00:00 2001 From: TydeONS <166495740+TydeONS@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:50:24 +0100 Subject: [PATCH 2/5] Update python_install_anaconda.md --- _docs/guides/python_install_anaconda.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/_docs/guides/python_install_anaconda.md b/_docs/guides/python_install_anaconda.md index da8f15e..e75dbc6 100644 --- a/_docs/guides/python_install_anaconda.md +++ b/_docs/guides/python_install_anaconda.md @@ -89,14 +89,14 @@ Now we can install the packages. Type each of these in sequence, followed by ent *python -m ipykernel install \--user \--name geopy38* -Why install these packages in particular? -numpy: -Useful for creating arrays (of XY coordinates or an elevation raster, for example) and manipulating numerical data inside them. -pandas: -Data manipulation package for tabular data (DataFrames). Import, export, clean, aggregate data with pandas. -ipython: -An interactive python shell. Acts as a kernel for Jupyter notebooks. -ipykernel: +Why install these packages in particular?\ +numpy:\ +Useful for creating arrays (of XY coordinates or an elevation raster, for example) and manipulating numerical data inside them.\ +pandas:\ +Data manipulation package for tabular data (DataFrames). Import, export, clean, aggregate data with pandas.\ +ipython:\ +An interactive python shell. Acts as a kernel for Jupyter notebooks.\ +ipykernel:\ Built on top of ipython. In Jupyter notebooks, you’re using ipykernel to execute code interactively. From 8f61176e5f866656c1db679acb4d48511b13d8dc Mon Sep 17 00:00:00 2001 From: TydeONS <166495740+TydeONS@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:57:48 +0100 Subject: [PATCH 3/5] Update python_install_anaconda.md --- _docs/guides/python_install_anaconda.md | 35 ++++++++++++++++++++----- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/_docs/guides/python_install_anaconda.md b/_docs/guides/python_install_anaconda.md index e75dbc6..5aaa978 100644 --- a/_docs/guides/python_install_anaconda.md +++ b/_docs/guides/python_install_anaconda.md @@ -89,16 +89,39 @@ Now we can install the packages. Type each of these in sequence, followed by ent *python -m ipykernel install \--user \--name geopy38* + Why install these packages in particular?\ -numpy:\ +**numpy**:\ Useful for creating arrays (of XY coordinates or an elevation raster, for example) and manipulating numerical data inside them.\ -pandas:\ +**pandas**:\ Data manipulation package for tabular data (DataFrames). Import, export, clean, aggregate data with pandas.\ -ipython:\ +**ipython**:\ An interactive python shell. Acts as a kernel for Jupyter notebooks.\ -ipykernel:\ -Built on top of ipython. In Jupyter notebooks, you’re using ipykernel to execute code interactively. - +**ipykernel**:\ +Built on top of ipython. In Jupyter notebooks, you’re using ipykernel to execute code interactively.\ +**rtree**:\ +Provides spatial indexing features like nearest neighbour search, intersection, union, joins etc.\ +**gdal**:\ +Geospatial data abstraction library. GDAL provides useful command line utilities for data translation, processing, and conversion. QGIS and ArcGIS uses gdal as a backend library.\ +**fiona**:\ +Streams simple feature data to and from GIS formats like GeoPackage and Shapefile. Used in combination with Shapely.\ +**pyproj**:\ +Can project and transform coordinates across various geographic reference systems.\ +**shapely**:\ +Create and work with vector geometries.\ +**geopandas**:\ +Extension of pandas library but handles GeoDataFrames. These are DataFrames with a geometry column.\ +**matplotlib**:\ +visualizations of geospatial data; scatterplots/heatmaps/choropleths maps etc.\ +**mapclassify**:\ +Handles classifying data e.g for choropleth maps by providing classification schemes. Use in conjunction with geo-visualisation packages like GeoPandas.\ +**folium**:\ +Data visualisation library for creating interactive maps.\ + + +Now you have your geopy38 virtual environment with all the packages above installed. To use the geopy38 environment as a Jupyter notebook kernel, type the following command:\ + +*python -m ipykernel install --user --name geopy38* ## Testing the installation & further activities: From 4abaaac6c1545c1c8f9e10ae967d974f228ddab8 Mon Sep 17 00:00:00 2001 From: TydeONS <166495740+TydeONS@users.noreply.github.com> Date: Tue, 9 Jul 2024 17:01:03 +0100 Subject: [PATCH 4/5] Update python_install_anaconda.md --- _docs/guides/python_install_anaconda.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/_docs/guides/python_install_anaconda.md b/_docs/guides/python_install_anaconda.md index 5aaa978..a276ed6 100644 --- a/_docs/guides/python_install_anaconda.md +++ b/_docs/guides/python_install_anaconda.md @@ -90,6 +90,8 @@ Now we can install the packages. Type each of these in sequence, followed by ent *python -m ipykernel install \--user \--name geopy38* + + Why install these packages in particular?\ **numpy**:\ Useful for creating arrays (of XY coordinates or an elevation raster, for example) and manipulating numerical data inside them.\ @@ -116,10 +118,11 @@ visualizations of geospatial data; scatterplots/heatmaps/choropleths maps etc.\ **mapclassify**:\ Handles classifying data e.g for choropleth maps by providing classification schemes. Use in conjunction with geo-visualisation packages like GeoPandas.\ **folium**:\ -Data visualisation library for creating interactive maps.\ +Data visualisation library for creating interactive maps. + -Now you have your geopy38 virtual environment with all the packages above installed. To use the geopy38 environment as a Jupyter notebook kernel, type the following command:\ +Now you have your geopy38 virtual environment with all the packages above installed. To use the geopy38 environment as a Jupyter notebook kernel, type the following command: *python -m ipykernel install --user --name geopy38* From c154138c59089a55d834d57286af6f88e0271466 Mon Sep 17 00:00:00 2001 From: TydeONS <166495740+TydeONS@users.noreply.github.com> Date: Tue, 9 Jul 2024 17:02:43 +0100 Subject: [PATCH 5/5] Update python_install_anaconda.md --- _docs/guides/python_install_anaconda.md | 39 +++++++++---------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/_docs/guides/python_install_anaconda.md b/_docs/guides/python_install_anaconda.md index a276ed6..d6c373d 100644 --- a/_docs/guides/python_install_anaconda.md +++ b/_docs/guides/python_install_anaconda.md @@ -93,32 +93,19 @@ Now we can install the packages. Type each of these in sequence, followed by ent Why install these packages in particular?\ -**numpy**:\ -Useful for creating arrays (of XY coordinates or an elevation raster, for example) and manipulating numerical data inside them.\ -**pandas**:\ -Data manipulation package for tabular data (DataFrames). Import, export, clean, aggregate data with pandas.\ -**ipython**:\ -An interactive python shell. Acts as a kernel for Jupyter notebooks.\ -**ipykernel**:\ -Built on top of ipython. In Jupyter notebooks, you’re using ipykernel to execute code interactively.\ -**rtree**:\ -Provides spatial indexing features like nearest neighbour search, intersection, union, joins etc.\ -**gdal**:\ -Geospatial data abstraction library. GDAL provides useful command line utilities for data translation, processing, and conversion. QGIS and ArcGIS uses gdal as a backend library.\ -**fiona**:\ -Streams simple feature data to and from GIS formats like GeoPackage and Shapefile. Used in combination with Shapely.\ -**pyproj**:\ -Can project and transform coordinates across various geographic reference systems.\ -**shapely**:\ -Create and work with vector geometries.\ -**geopandas**:\ -Extension of pandas library but handles GeoDataFrames. These are DataFrames with a geometry column.\ -**matplotlib**:\ -visualizations of geospatial data; scatterplots/heatmaps/choropleths maps etc.\ -**mapclassify**:\ -Handles classifying data e.g for choropleth maps by providing classification schemes. Use in conjunction with geo-visualisation packages like GeoPandas.\ -**folium**:\ -Data visualisation library for creating interactive maps. +**numpy**: Useful for creating arrays (of XY coordinates or an elevation raster, for example) and manipulating numerical data inside them.\ +**pandas**: Data manipulation package for tabular data (DataFrames). Import, export, clean, aggregate data with pandas.\ +**ipython**: An interactive python shell. Acts as a kernel for Jupyter notebooks.\ +**ipykernel**: Built on top of ipython. In Jupyter notebooks, you’re using ipykernel to execute code interactively.\ +**rtree**: Provides spatial indexing features like nearest neighbour search, intersection, union, joins etc.\ +**gdal**: Geospatial data abstraction library. GDAL provides useful command line utilities for data translation, processing, and conversion. QGIS and ArcGIS uses gdal as a backend library.\ +**fiona**: Streams simple feature data to and from GIS formats like GeoPackage and Shapefile. Used in combination with Shapely.\ +**pyproj**: Can project and transform coordinates across various geographic reference systems.\ +**shapely**: Create and work with vector geometries.\ +**geopandas**: Extension of pandas library but handles GeoDataFrames. These are DataFrames with a geometry column.\ +**matplotlib**: Visualizations of geospatial data; scatterplots/heatmaps/choropleths maps etc.\ +**mapclassify**: Handles classifying data e.g for choropleth maps by providing classification schemes. Use in conjunction with geo-visualisation packages like GeoPandas.\ +**folium**: Data visualisation library for creating interactive maps.