Authors: Bryn Pickering, Stefan Pfenninger
License: MIT
A tutorial on how to visualise data with Python, consisting of three Jupyter Notebooks:
- 01-matplotlib.ipynb shows how to use matplotlib, the workhorse of plotting in Python, together with pandas and seaborn.
- 01-matplotlib-exercise.ipynb contains a single exercise on the basics of matplotlib, intended to cover the first half of the
01-matplotlib.ipynb
notebook. - 02-web-based.ipynb introduces Plotly and Bokeh, modern web-based libraries which make it very easy to create interactive visualisations.
- 03-touching-up.ipynb shows how to save vector graphics from matplotlib, Plotly or Bokeh for final touching up in a separate tool, for example the free and open-source Inkscape.
- 04-maps.ipynb shows some ways to plot maps.
Download the Anaconda Python distribution and run the downloaded installer:
https://www.anaconda.com/download/
Make sure you download the Python 3 version.
Once Anaconda is installed, create a new conda environment with the required packages, by running the following command in a terminal (Linux or macOS) or a command-line window (Windows), making sure you run this command inside the directory containing our requirements.yml
file:
conda env create -f requirements.yml
If you are unfamiliar with the Jupyter Notebook, have a look at this quick start guide, in particular the section on running the notebook.
During the tutorial session we will not have time to solve installation problems, so make sure that you are able to run the Jupyter Notebook before you arrive.
We are using data made available from the Open Power System Data project for this tutorial. These datasets can be found in the data
subdirectory and are based on the following download links:
- d3 (e.g. mpld3)
- airbnb superset
- vega
- altair