The course structure and some online resources for the UCL Business Management Dataviz module.
Due to the Covid disruption and to accommodate the majority of students in time-zones to the east of the UK, lectures/workshops will run from 10am to 1pm London/UK time. In order to reduce the intensity of a three hour online session, the workshop will be interspersed with mini challenges.
1 (Friday 29 May) 10:00 - 13:00
Introduction to the Module, stating key learning aims, workshop structure and covering any tools that will be used (e.g. Python Jupyter notebooks)
Exploring data using Python notebooks.
Python notebooks have become to the goto environment for much data science and exploratory data visualization work. Here we’ll use one to explore some contemporary Corona Virus and Brexit datasets.
Using Plotly to generate web-friendly charts using Python notebooks
We will take some of the data charts and maps produced and see how easy it is to embed them in a web-page.
2 (Monday 1 June) 10:00 - 1300
We will also look at Scaleable Vector Graphics (SVG), the markup language used (by D3 and others) to produce many of the iconic modern data visualizations.
3 (Wednesday 3 June) 10:00 - 1300
- see Ch. 16 DVPJ
4 (Friday 5 June) 10:00 - 1300
Putting D3 to working
5 (Monday 8 June) 10:00 - 1300
An open session. This time will allow students to focus on any of the previous topics, discuss possible thesis visualizations etc. Students are encouraged to send questions and suggestions via email: firstname.lastname@example.org
Installing Python Environment for Jupyter Notebooks
We will be using Python Jupyter notebooks for the exploratory dataviz. This will involve running a notebook locally and viewing it on your browser of choice. The installation instructions can be found here:
JupyterLab is a newish, more full-featured notebook environment which gains functionality but does have a steeper learning curve. For the purpose of this module the older, simpler Jupyter notebooks are fine.
We will be using Python 3.5 (and newer versions) to run our notebooks. I recommend using a virtual environment to install the necessary libraries. If you’re using Anaconda (https://www.anaconda.com/products/individual) then this will be sorted for you. Otherwise you can use the
venv Python library:
If you don’t want to deal with virtual environments don’t worry - it should be fine to install these libraries globally. At the command line use Python’s
pip to install the necessary libraries:
(ucl) ➜ pip install pandas matplotlib plotly seaborn jupyter
To test that the installation worked go to your work directory and start
(ucl) ➜ ucl jupyter notebook [I 14:07:31.642 NotebookApp] Writing notebook server cookie secret to /home/kyran/.local/share/jupyte r/runtime/notebook_cookie_secret [I 14:07:31.907 NotebookApp] Serving notebooks from local directory: /home/kyran/Dropbox/clients/ucl [I 14:07:31.908 NotebookApp] The Jupyter Notebook is running at: [I 14:07:31.908 NotebookApp] http://localhost:8888/?token=b94f61712fd471df42cee235c1182a04faa8cf74 ...
This should open up a browser window at address localhost:8888 (otherwise open a browser tab using the address and token provided) with a Jupyter notebook. Select
File->New Notebook and paste the following into the first cell:
import pandas as pd import matplotlib.pyplot as plt import plotly import seaborn as sns
Then run the cell using shift+return. If all goes well this will run error free and number the cell 1.
We’re now good to start the Python based exploratory dataviz.
You can find a test notebook (test_setup.ipynb) and pip requirements.txt at the Dropbox folder (https://www.dropbox.com/sh/92rpcc8e0ckbcv7/AACZftR5x5oME0WIMz64jk-4a?dl=0)
If you have any problems feel free to send me an email (email@example.com) or, better yet, open a discussion in the forum so we can pool fixes.
I’ll be adding to these in the next few weeks (as of early May)