Skip to content

Commit

Permalink
Add section for explorations
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-strange committed Aug 29, 2024
1 parent 86ed77f commit 60cca48
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
8 changes: 8 additions & 0 deletions src/data/explore/index.vto
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Explore
colour: c5-bg
---
<div class='grid'>
{{ for page of search.pages('section=explore', 'title') }}
{{ comp.navgrid({ heading: page.title , link: page.url, colour: page.colour, desc: page.desc }) }}
{{ /for }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Housing affordability
section: data
section: explore
colour: c7-bg
url: /data/explore/affordability/
desc: Top 5 most and least affordable places to live in England
---
We want to explore which local authorities are the most/least expensive to buy homes in, relative to wages. For this, we wll use the median house price to residence based earning ratio.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Elections and housing
section: data
section: explore
colour: c11-bg
desc: Exploring housing tenures and election results
url: /data/elections-and-housing/
Expand Down Expand Up @@ -498,8 +498,7 @@ plt.show()


<img src="/assets/images/tenure_voting_18_0.png" alt="Strip plot of percentage of homes owned outright coloured by winning constituency" height="400">




Let's calculate the percentage of seats won by the three largest parties that had a higher than average number of people for each type of tenure. First, I'll define a function to calculate that, then call it below for different tenure types.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: House prices and vacant homes
section: data
section: explore
colour: c4-bg
desc: Exploring the relationship between real-terms house prices and the proportion of vacant homes
url: /data/house-prices-vacant-homes/
Expand Down
3 changes: 2 additions & 1 deletion src/data/index.vto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ colour: c5-bg
navorder: 1
---
<div class='grid'>
{{ for page of search.pages('section!=undefined', 'title') }}
{{ for page of search.pages('section=data', 'title') }}
{{ comp.navgrid({ heading: page.title , link: page.url, colour: page.colour, desc: page.desc }) }}
{{ /for }}
{{ comp.navgrid({ heading: 'Explorations' , link: '/data/explore/', colour: 'c12-bg', desc: 'Deeper dives into housing data' }) }}
</div>

0 comments on commit 60cca48

Please sign in to comment.