top of page
Search

Analyzing World Bank Data with SQL

  • Writer: Bryan Eckard
    Bryan Eckard
  • Feb 6, 2023
  • 2 min read

ree

Analysis of International Development Association (IDA) Credits and Grants using SQL


Overview

The purpose of this project was to practice basic SQL statements and aggregate functions. IDA credits are public and publicly guaranteed debt extended by the World Bank Group. They assist their member countries by helping them meet their development needs through various funding avenues. All amounts are listed in US dollars.


Some insights I gained were:

  • The total amount due to the IDA is $20,526,620,109,947.17, and the highest amount owed is $793,256,127.64.

  • Nicaragua has 13,922 separate amounts owed for different projects.

  • Honduras has 1,444 projects with an interest rate greater than 1.

The Data

The World Bank Group dataset can be found at through the following link:

https://finances.worldbank.org/Loans-and-Credits/IDA-Statement-Of-Credits-and-Grants-Historical-Dat/tdwh-3krx . At the time of this post, it contains approximately 1.13M rows, 30 columns, and each row represents a credit or grant.


I downloaded the data as a CSV file and uploaded it to https://bit.io . This site offers serverless postgres SQL. It was quick and easy to get started with practicing SQL statements and functions.


The Analysis

To begin the analysis, I used the basic SELECT statement to query the database and make sure everything looked like it should.


SELECT
ree

ree

The next statements I practiced were LIMIT, Alias (AS), and WHERE:


LIMIT
ree

ree

AS
ree

ree

WHERE
ree

ree

Then I tried some aggregate functions (COUNT, MAX, SUM, and AVG) and used the GROUP BY and ORDER BY statements:


COUNT
ree

ree

ree

ree

The above COUNT statement was how I determined how many separate projects Nicaragua was paying for.


COUNT and GROUP BY
ree

ree

MAX
ree

ree

Determined that the most someone owes right now is $793,256,127.64.


SUM
ree

ree

Determined the total amount owed to World Bank Group: $20,526,620,109,947.17


AVG
ree

ree

ORDER BY
ree

ree

I finished by practicing the operators AND, OR, and NOT:


AND
ree

ree

Determined how many projects Honduras has over 1% interest.


OR
ree

ree

NOT
ree

ree

Final Thoughts

This project was great practice on a real-world dataset. I was able to determine some interesting information about how much is currently due to the IDA and how many projects different countries have: the total amount due to the IDA was $20,526,620,109,947.17, and the highest amount owed was $793,256,127.64; Nicaragua has 13,922 separate amounts owed for different projects; and Honduras has 1,444 projects with an interest rate greater than 1.


Thank you for reading! Please contact me below or connect with me on LinkedIn with any questions or comments.



 
 
 

Comments


Bryan Eckard | Data Analyst

  • alt.text.label.LinkedIn

©2023 by Bryan Eckard | Aspiring Data Scientist. Proudly created with Wix.com

bottom of page