TOWARDS DATA SCIENCE: COLLABORATIVE ANALYTICS

Recently I decided to beef up my skills towards data science which turned out to be an absolute ground up. This was more so because I chose to deep dive into Python which then leads you to the IDEs, various Libraries and how all these work together.

I used LinkedIn Learning. There is always a lot to learn and one of the novelties topics for me was on collaborative analytics especially plotting and visualizing data using maps. Of course coming from US elections where we were able to zoom into results to the lowest electoral region, I had to try the various tools for collaborative analytics.

In Kenya we should be able to provide the same visualization in future electoral process, we can start with the upcoming Nairobi gubernatorial elections. It can be done.

They say practice makes perfect. I used data for 2019 census to practice some simple collaborative visualization. There are many open data out there which can be used for practice including maps in geojson or shapefile formats.

 DATA SOURCE

2019 Kenya Population and Housing Census 

https://www.knbs.or.ke/?wpdmpro=2019-kenya-population-and-housing-census-volume-i-population-by-county-and-sub-county

https://www.knbs.or.ke/?wpdmpro=2019-kenya-population-and-housing-census-volume-iii-distribution-of-population-by-age-sex-and-administrative-units#

https://www.knbs.or.ke/?wpdmpro=2019-kenya-population-and-housing-census-volume-ii-distribution-of-population-by-administrative-units#

The maps for plotting the counties may have some boundary overlaps.

(You may need to download the files and open in a browser. Openning the link from LinkedIn may not always work as LinkedIn does not allow sharing of html type files)

AVERAGE HOUSEHOLD SIZE PER COUNTY

The data is represented in two interactive maps (using Plotly and Folium Choropleth). You can explore the maps and experience the additional mouse hover tooltip info including zoom capabilities.

  • Nairobi County has the lowest while Mandera has the largest.
  • Our Sahel counties leads.

Worth noting that Mombasa county is geographically the smallest. I had assumed Nairobi is the smallest until I plot the maps only to struggle locating Mombasa.

RATIO OF FEMALE TO MALE PER COUNTY

It is a known fact Kenya’s female’s population is more than that of the males. However the same is not true for all the counties.

  • Sahel counties have more males than females. Mombasa County also has more males than females.
  • Other counties have more females than males. Of these the ratio is almost 1:1 (when rounded to 1 decimal place) except western, Nyanza and Kitui counties which seems to have slightly higher ratios (considerable more females than males)

Explore the maps representation. One of them maps pink and grey counties using colour.

POPULATION DISTRIBUTION BY AGE AND SEX

I have plotted a simple line graph comparing population of males and females in age bands of 5.

  • From the graph Kenya gives birth to slightly more males than females.
  • Males remains more than females until after the ages of 20. What happens to boy child in this period?
  • From the ages of 20s to mid-30s we have more females than males. Actually it widens a lot between 25 and 35 years (the age of marriage).
  • Between the ages of 40 and 55 (sponsor band), we have slightly more males than females.
  • More females than males live beyond the age of 55.


joseph Okiro BSc., MSc., PMP?, PMI-ACP?, CISSP, CCSP, Smartsheet Proj. Mgmt. Certified.

Digital Transformation |Innovation | Cyber Security | Program & Strategy Delivery | ICT & Data Management | Financial Inclusion | Cloud Architect| ICT Consultant

3 年

The upcoming Nairobi gubernatorial elections can be a good pilot to present results using interactive map. This can be done to sub_county/constituency, level, ward level even to polling station level. We just need to improve on the quality of the available map files (geojson or shapefiles), those available has a lot of overlaps. https://drive.google.com/file/d/1LyNERRlyLN8bImmXW_OHrKVynnGEWhn9/view?usp=sharing

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了