
上QQ阅读APP看书,第一时间看更新
How to do it...
The following steps will guide you to download the world's top incomes dataset and install the necessary Python libraries to complete this project:
The original dataset for the world's top incomes can be downloaded from http://topincomes.g-mond.parisschoolofeconomics.eu/. However, the site has been updated several times, which has changed the output format of the data (from .csv to .xlsx). This recipe assumes a .csv file format.
This chapter's repository contains the properly formatted version of the input data file.
This chapter's repository contains the properly formatted version of the input data file.
- Save the world's top incomes dataset to a location on your computer where you will be able to find it.
- Open up a terminal window and start a Python interpreter.
- Check to make sure that the following three libraries, NumPy, matplotlib, and Jinja2, are installed; try to import each:
In [2]: import numpy as np
...: import jinja2
...: import matplotlib as plt
Each of the preceding libraries should import without a comment or remark from Python. If they do, you are good to go. If not, refer to Chapter 1, Preparing Your Data Science Environment, to set up your system.