For the optimal student experience, we recommend the following hardware configuration:
- OS: Windows 7 SP1 32/64-bit, Windows 8.1 32/64-bit or Windows 10 32/64- bit, Ubuntu 14.04 or later, or macOS Sierra or later
- Processor: Dual Core or better
- Memory: 4GB RAM
- Storage: 10 GB available space software
- Browser: Google Chrome or Mozilla Firefox
- JupyterLab and Jupyter Notebook
- Sublime Text (latest version), Atom IDE (latest version), or other similar text editor applications
- Python 3
- The following Python libraries installed: NumPy, pandas, Matplotlib, seaborn, geoplotlib, Bokeh, and squarify
Installation and Setup
- Before you start this course, we’ll install Python 3.6, pip, and the other libraries used throughout this course. You will find the steps to install them here.
You might need to use the python3 get-pip.py command, due to previous versions of Python on your computer that already use the python command.
Using the pip command, install the following libraries:
- python -m pip install –user numpy matplotlib jupyterlab pandas squarify
- bokeh geoplotlib seaborn
Working with JupyterLab and Jupyter Notebook
You can either download it using GitHub or as a zipped folder by clicking on the green Clone or download button on the upper-right side.
In order to open Jupyter Notebooks, you have to traverse into the directory with your terminal. To do that, type:
- cd Data-Visualization-with-Python/<your current lesson>
For example cd Data-Visualization-with-Python/lesson01/
To complete the process, perform the following steps:
- To reach each activity and exercise, you have to use cd once more to go into each folder, like so: cd Activity01
- Once you are in the folder of your choice, simply call jupyter-lab to start up JupyterLab. Similarly, for Jupyter Notebook, call jupyter notebook.
Importing Python Libraries
- Every exercise and activity in this course will make use of various libraries.
Importing libraries into Python is very simple and here’s how we do it:
- To import libraries, such as NumPy and pandas, we have to run the following code. This will import the whole numpy library into our current file: import numpy # import numpy
- In the first cells of the exercises and activities of this courseware, you will see the following code. We can use np instead ofnumpy in our code to call methods from numpy: import numpy as np # import numpy and assign alias np
- In later lessons, partial imports will be present, as shown in the following code. This only loads the mean method from the library: from numpy import mean # only import the mean method of numpy