Install Required Python libraries#

In the previous tutorial, we have installed Anaconda Python distribution. Anaconda comes with a lot of useful libraries for scientific computing. However, we need to install a few more libraries for this tutorial.

Is it necessary to install Anaconda and JupyterLab?

No! You can also complete the course without installing Anaconda and JupyterLab. As far as you can edit python Notebooks and do the version controling with GitHub, you are good to go. You can use any IDE you like such as PyCharm, Spyder, VSCode, Google Colab, etc.

General guide for installing packages with Conda#

Conda has an excellent online user guide which covers most of the basic things, such as installing new packages.

Conda install#

You can install new packages using the conda install command. The basic syntax for installing packages is conda install package-name. In addition, we also want to specify the conda channel from where the package is downloaded using the parameter -c.

Installing Pandas package from the conda-forge channel:

conda install -c conda-forge pandas

Once you run this command, you will see also other packages getting installed and/or updated as conda checks for dependencies of the installed package. Read more about package installations in the conda documentation It’s a good idea to search for installation instructions for each package online.

You can install other useful packages in a similar way:

conda install -c conda-forge bokeh
conda install -c conda-forge geopandas

Conda channels

Conda channels are remote locations where packages are stored. During this course (and in general when installing packages for scientific computing and GIS analysis) we download most packages from the conda-forge channel.

Some of the useful packages for this course#

In the following, we list some of the useful packages for this course. You can install them using the conda install command as shown above. Some of these packages are already installed with Anaconda. You can check the installed packages using the conda list command.

  • Pandas is a Python library for data analysis.

  • Matplotlib is a Python library for plotting.

  • Bokeh is a Python library for interactive plotting.

  • Seaborn is a Python library for statistical data visualization.

  • Folium is a Python library for creating interactive maps.

  • Geopandas is a Python library for working with geospatial data.

  • Shapely is a Python library for working with geometric objects.

  • Pyproj is a Python library for working with projections.

  • Cartopy is a Python library for working with maps and projections.

  • Scikit-learn is a Python library for machine learning.

  • Scipy is a Python library for scientific computing.

  • Statsmodels is a Python library for statistical modeling.

  • tabulate is a Python library for printing tables.

  • branca is a Python library for creating HTML maps.