Our CFG Project: Analysing Statutory Homelessness in the UK

After a great response to my article about my first coding lesson, I thought I’d do a follow-up article to show you what kinds of things you could learn to do with Python, or achieve by the end of a course with Code First: Girls.

Designing our project

I partnered up with my classmate Michelle to develop what we’d learned about .cvs files (comma separated values) into our final programming project. We were given three potential project options, and as we wanted to challenge ourselves, we chose the assignment we understood the least!

We were provided with a sample data set by CFG, which we initially used to practice what we’d learned. However, we then decided to apply our new knowledge to a new data set: the GOV.UK statistics on number of households in statutory homeless, by ethnicity over time (2007-2018).


After successfully completing the course requirements, we set ourselves the following extension goals:

  • Collect all of the data for each ethnicity for 2007 and 2018 into lists
  • Compare the numbers of homeless for each ethnicity for 2007 vs 2018 
  • Compare the ethnicity percentage breakdown for 2007 vs 2018

To do this, we worked together to use our understanding of csv. files, functions and variables to process and calculate the figures. We had to reformat some of the statistics for them to be processed, but had a great chat with our instructor Marlene, who helped us to do this.

A sample of some of our project code, using what we had learned over the previous 5 weeks

Our results

Our programme analysed the original dataset and output a variety of statistics:

For example, we found that the overall number of households in the UK in statutory homelessness has decreased -22.87% from 2007-2018 (-16,780). The majority of these households come from a white ethnic background. However, in the same period of 2007-2017, whilst the number of white households in statutory homelessness has decreased by -35.6% (-19,350), the number of BAME households has increased by +18.6% (+2,820).

Furthermore, we got some hands-on experience in how using Python can be used to tackle real-life dataset issues. As part of our process, we asked our programme to sum up the different ethnicity statistics and output the total homeless for 2018. However, we found that our results (56,590) differed from the listed government figures for total households (56,580). Upon further investigation, we discovered that we had found a flaw in the official statistics – the total number given was more than the sum of the components added together. This taught us a valuable lesson in how good programmes can catch flaws and irregularities in data!

Lessons and next steps

We were really pleased with our project and enjoyed presenting about it to the rest of our CFG cohort. I was so impressed by the quality and creativity of my class’ work, and learned a lot from my peers about their coding journeys!

Having passed the 8-week course, I’m now working on self-teaching more Python, and exploring other programming languages. I’ve completed a Coursera Introduction to Python Course and am now getting to grips with Harvard’s Introduction to Computer Science CS50!

I will shortly be creating a blog post of all my favourite free e-learning resources for anyone interested in beginning to code. As always, feel free to drop me a message if there’s anything I can help out with.

Finally, I just wanted to say thanks to my great teammate Michelle for all her hard work, and our brilliant instructors! This has been a challenging and inspiring first step into developing my technical skill set.


2 thoughts on “Our CFG Project: Analysing Statutory Homelessness in the UK

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.