This week’s topic: Ukrainian exports
One year ago, Russia invaded Ukraine. The war continues to rage, and we’ve seen no small number of horrific and devastating pictures. Millions of Ukrainians are now refugees, trying to make a new (often temporary) life elsewhere.
Soon after the invasion, a number of commentators pointed to Ukraine’s importance as an exporter of food products. If they cannot export food to the rest of the world, then it’ll obviously be an issue for Ukrainian farmers, and for their economy. But it might also lead to a food shortage for millions of people in other countries.
In response to this problem, a number of countries negotiated the Black Sea Grain Initiative, aimed at helping Ukraine export food products across the Black Sea to Turkey, Mediterranean countries, and elsewhere. The program has been a success; as of earlier this month, more than 700 ships carrying food had left Ukraine.
This week, we’ll look at a data set describing the ships that have left Ukraine as part of this initiative.
The data set comes from humdata.org, which has a variety of humanitarian-related data sets. In particular, we’ll be looking at data from their page on the Black Sea Grain Initiative’s ship movements, at https://data.humdata.org/dataset/black-sea-grain-initiative-vessel-movements. I suggest downloading the data in Excel format, which includes a data dictionary on the “Readme” sheet, and the actual data we’ll use on the “Data” sheet.
The URL to download the data in Excel format is:
https://docs.google.com/spreadsheets/d/e/2PACX-1vRisnQjodySbp6-XXPGhdsVMp2stg_gyuxw42pP41tuxeic63IARau6bV1TgjLiw_ciAWsTO5LarPqT/pub?output=xlsxHere is what I would like for you to do:
- Read the Excel data into a data frame. Again, the “Data” sheet is what interests us.
- Create a pivot table, showing how many tons of each commodity (rows) have left each port (columns).
- Create a pivot table, showing how many tons of each commodity (columns) were going to each destination country (rows).
- The worry was that lower-income countries would not have enough food to eat, because of the war. According to the data's "income group," what proportion of the grain are low-income countries receiving?
- Have we seen growth in the total tonnage shipped each month to developing countries?
- Finally, what 10 flags are most commonly used on the ships coming from Ukraine? Do any country's names appear more than once? If so, why, and how can you fix it?
The learning goals for this week are to work with pivot tables, calculate growth, and clean some weird data.
I’ll be back tomorrow (on Thursday) with my answers to these questions. (Although last week, I managed to mess things up, and publish early… so, who knows?)
Reuven