Garrett Mayock's Blog

blawg

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

Background

I'm currently earning the "Data Analyst – Python" certification through Dataquest.io 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.

Links

GitHub repo:

https://github.com/gmayock/sql_fundamentals_cia_factbook

CIA Factbook:

https://www.cia.gov/library/publications/the-world-factbook/

Source Data for factbook.db:

https://github.com/factbook/factbook.sql/releases

contact me