Skip to content

widdowquinn/Teaching-Data-Visualisation

Repository files navigation

README.md - 2016-07-28_manchester_datavis

This repository contains files for the Python hands-on session of the Software Sustainability Institute Research Data Visualisation Workshop (RDVW) at the University of Manchester, 28th July 2016.

Running this workshop in your browser

These workshop materials are designed to be compatible with MyBinder. To start an instance of this repository, click on the badge below:

Binder

Acknowledgements

These exercises borrow heavily and adapt or use material from several excellent sources, including:

If you recognise some of this content and are not acknowledged here, please let me know and I will correct that! I don't think I'm in breach of any copyright or licensing, but if you notice any such breaches please let me know and I will rectify as soon as is possible.

Exercises

One-variable, continuous data

Learning Outcomes

  • Generating randomly-distributed example data
  • Representing one-dimensional continuous-valued data with histograms, KDE plots, and rug plots
  • Using matplotlib and seaborn libraries
  • Presenting arrays of images
  • Use of figure() and subplots() 1D continuous data example

Two-variable, continuous x, y data

Learning Outcomes

  • Representing two-dimensional continuous x and y data using matplotlib and seaborn libraries
  • Use of figure() and subplots
  • Annotating plots with text
  • Working with long and wide form DataFrames in pandas
  • Using statistical overlays and seaborn's statistical plots

continuous x, y data example

Grammar of Graphics

Learning Outcomes

  • Understand the Grammar of Graphics
  • Use the Grammar of Graphics with the ggplot module to produce plots from aesthetics and geometric representations.
  • Use layers to produce new visualisations specifically to suit your data, showing data and statistical summaries
  • Use multi-panel figures to display complex datasets

grammar of graphics example

Imaging 2D arrays, colormaps, and 3D surface plots

Learning Outcomes

  • Read and use NetCDF format data using Python
  • Visualise array data as a heatmap/image
  • Explore array data visualisation with a range of colour palettes, and understand how selection and normalisation of colour palettes can influence the interpretation of data
  • Visualise 2D array data as a 3D surface plot
  • Explore the application and influence of colour palettes and lighting effects on the interpretation of 3D surface plots

3D surface plot

Interactive map with bokeh

Learning Outcomes

  • Import and process shapefile GIS data using pyshp
  • Import public .csv (electoral) data using pandas
  • Render GIS boundary data in an interactive bokeh plot
  • Colour geospatial data by results in an interactive bokeh plot

interactive map screenshot

Making movies with matplotlib and seaborn

Learning Outcomes

  • Understand matplotlib's animation functionality
  • Generate animations using FuncAnimation
  • Generate line graph and bubble plot animations

bubble chart screenshot