Data Science

By Leen Ayesh

Topic: To what extent can urbanisation be considered a driving factor in the advancement of women’s rights in Sub-Saharan Africa?

A few months ago, The Economist published evidence that societies that treated women badly are also poorer and less stable. The article mentioned that urbanisation is a driving factor in countering this, as “when women move to cities, they earn higher wages and increase their clout at home. Their clan ties tend to loosen, too, since they live surrounded by non-members.” This bold statement made me interested in measuring the relationship between higher rates of urbanisation and women’s rights, particularly in developing countries as they tend to have higher rates of gender disparity.


I chose Sub-Saharan Africa because it is among the fastest urbanising regions in the world. The chart below, which I created using the World Bank API, after converting it from XML to JSON format, shows the constant and persistent growth of the urban population in Sub-Saharan Africa.

Find the JSON here.


Find the JSON here.

Find the JSON here.

While we also notice an upwards trend (though not as sharp) in the percentage of women that make it to age 65, the trend in the numbers of women who are employers is not so clear cut, and so it is safe to say that we should not go into this topic expecting that the outcomes for women in all possible areas are necessarily improving with urbanisation. One interesting thing to note is the lack of data on Sub-Saharan countries, even on the World Bank website, and so I ended up with charts like the one above, which starts from 1991 and ends in 2019, as opposed to starting from 1970 and ending in 2020. On these two charts, I faced issues using the API directly because the missing data would be read as a “0”, which is incorrect. Therefore, I loaded the APIs in this workbook to create a DataFrame and dropped all missing values.


I wanted to compare Sub-Saharan Africa to other regions and show that it is indeed one of the fastest urbanising regions in the world. Therefore, I used Python in this workbook to batch download data for several regions and compare. Interestingly, we notice that the MENA region is also among the faster urbanising regions out of the four.

Find the JSON here.


Find the JSON here.

I found recent GPI data on Statista for Sub-Saharan African countries. It was a straightforward CSV download. I then used this workbook to create a TopoJson. Data cleaning here only included checking for country names that didn’t match and changing that on Excel.


When I regressed GPI on urban population percentage, I found no relationship at all between the two variables, as the R squared came back as 0. I downloaded the urban population percentages on this workbook, sorted the values in excel by date and kept 2020 values, and then uploaded the csv folder to this workbook , merged it with the Statista data and performed the regression analysis.

Find the JSON here.


Find the JSON here.

This map was created in this workbook . I downloaded the data from OECD and it included countries from all over the world, however, it only included the countries' iso3codes as opposed to their full names. I found a way around this by uploading the World Bank urban population dataset from 2019 for the Sub-Saharan countries, as it includes the countries' iso3codes. I merged them together, effectively getting rid of all countries that are not in SubSaharan Africa according to the World Bank Grouping. I created my map and performed my regression analysis in the same workbook. Once again, there is no relationship between having a higher percentage of women politicians and living in a highly urbanised country.

Find the JSON here.


In these charts, I faced the same problem as the above charts, and so I solved it the same way. I also dropped variables that showed “NAN” as this would invalidate my regression analysis. Find the workbook here.

Find the JSON here.

Find the JSON here.


I got into this research with the hypothesis that because urbanisation is linked to economic growth, improved social welfare, and greater job opportunities, women living in highly urbanised countries should be at an advantage compared to those living in more ruralised areas. I was surprised to find that my findings did not prove a correlation between being a highly urbanised country in Sub-Saharan Africa and offering a more equitable environment for women. This might show that urbanisation trends play out differently in different countries, and that gender norms can strongly persist in the city the way they do in the country-side. I recommend policies and urban planning that use a gendered perspective, as expanding cities is not enough if there is no room for a women-friendly infrastructure and environment.