6.1. Introduction

The World Factbook provides information on the history, people, government, economy, geography, communications, transportation, military, and transnational issues for 267 world entities. It is a rich source of information that can be combined with many data sets. In fact you used a form of this data in the World Happiness project. In this module we will go more in-depth and use Pandas to explore and visualize the data. The Factbook is in the public domain. Accordingly, it may be copied freely without permission of the Central Intelligence Agency.

6.1.1. Reading List

As a warmup exercise and maybe to stimulate some questions for investigation take the Gapminder quiz

Let’s start by loading some data about countries. This data has been compiled by combining information from files at: http://gsociology.icaap.org/dataupload.html we are going to use it to warm up our pandas skills. In this first part of the module we will continue with some data that should be familair to you but we will use it in Pandas instead of a spreadsheet. In the second part we will focus on several different kinds of textual analysis using data from the United Nations.

The goals for Part I of the module are:

  • Loading data into pandas
  • Using Altair to make some quick visualization of the data
  • Querying (filtering) our data
  • Sorting data
  • Adding new columns of data

6.1.2. Exploratory Questions to get started

  • What are the minimum and maximum values of the data in each column?
  • How does the birth rate compare across countries? What is the distribution of the birth rates?
  • Is there are connection between the area of a country and its population?
  • How can we find all of the details on a specific country?

Lesson Feedback

    During this lesson I was primarily in my...
  • Comfort Zone
  • Learning Zone
  • Panic Zone
    Completing this lesson took...
  • Very little time
  • A reasonable amount of time
  • More time than is reasonable
    Based on my own interests and needs, the things taught in this lesson...
  • Don't seem worth learning
  • May be worth learning
  • Are definitely worth learning
    For me to master the things taught in this lesson feels...
  • Definitely within reach
  • Within reach if I try my hardest
  • Out of reach no matter how hard I try
Next Section - 6.2. World Factbook: Exploratory Data Analysis