Garrett Mayock's Blog


SQL in Python: Analyzing CIA Factbook Data

Learning to use the sqlite3 module in Python and practicing SQL

  Garrett Mayock posted 2019-05-30 21:33:53 UTC


I'm currently earning the "Data Analyst – Python" certification through and part of their process is including a guided project for each course section. I'm currently reviewing SQL for some interviews so I've jumped ahead in the Dataquest training to review their SQL sections. I do use MySQL in this website and have completed the official 40-hour Microsoft Certified "Querying Microsoft SQL Server" course, so it's more a refresher than anything.

Case Description

This project is done to show proof that I can create and execute simple and nested SQL queries to use in Python. To show this, I perform some basic analysis on data from the CIA Factbook.

The lesson and this project cover:

Find the data and IPython Notebook in my GitHub repository, linked below.


GitHub repo:

CIA Factbook:

Source Data for factbook.db:

contact me