Skip to content

Commit

Permalink
Add sitemap. Update wages
Browse files Browse the repository at this point in the history
  • Loading branch information
slowe committed Apr 2, 2024
1 parent d73f8a0 commit 42e2c16
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 22 deletions.
7 changes: 5 additions & 2 deletions _config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import lume from "lume/mod.ts";
import nunjucks from "lume/plugins/nunjucks.ts";
import nunjucks from "lume/plugins/nunjucks.ts"; // Lume 2.0 requires us to add Nunjucks
import base_path from "lume/plugins/base_path.ts";
import date from "lume/plugins/date.ts";
import metas from "lume/plugins/metas.ts";
import postcss from "lume/plugins/postcss.ts";
import { walkSync } from 'std/fs/mod.ts';
import sitemap from "lume/plugins/sitemap.ts"; // To build a site map

// Importing the OI Lume charts and utilities
import oiCharts from "https://deno.land/x/[email protected]/mod.ts";
Expand All @@ -18,8 +19,10 @@ const site = lume({
location: new URL("https://constituencies.open-innovations.org/"),
});

// Lume 2.0 requires us to add Nunjucks
site.use(nunjucks());
site.use(sitemap({
query: "!draft"
}));

// Register a series of extensions to be loaded by the OI CSV loader
// https://lume.land/docs/core/loaders/
Expand Down
33 changes: 21 additions & 12 deletions pipelines/economy/dvc.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ stages:
deps:
- path: pipelines/economy/economy.py
hash: md5
md5: d5b6527bf7e849c69dd6f88bf8ff2363
size: 2448
md5: d941878440b87600348dc8900c540b72
size: 2495
- path: pipelines/util.py
hash: md5
md5: 26230f637818c0c982b393dc9b152ced
Expand All @@ -19,33 +19,42 @@ stages:
hash: md5
md5: c60c7e52b3394e05a5207a955e180b9d
size: 9175510
- path: raw-data/median-wages.csv
hash: md5
md5: 45326e7ae00e381e5a3fe6122b20a379
size: 218806
- path: raw-data/unemployment.xlsx
hash: md5
md5: 3480e7209fd05326147ed339e9265664
size: 15143627
outs:
- path: src/_data/sources/economy/covid_grants_arg.csv
hash: md5
md5: 07caefeedba81e23b9b66a8dd3250aa9
size: 31156
md5: 0d5a1efc0b567b444b9faca73c54741d
size: 30622
isexec: true
- path: src/_data/sources/economy/covid_grants_ohlg.csv
hash: md5
md5: f4ec45e70c8dbe7a8879ca79b001a2c0
size: 29320
md5: 57f9fe58ebdd4bac887872625b6b4f82
size: 28786
isexec: true
- path: src/_data/sources/economy/house_price_wage_ratio.csv
hash: md5
md5: 77b980ebd73cb3413d369a72370db383
size: 158460
md5: b1e187158dc5272e2789cf34a9df7c6b
size: 157809
isexec: true
- path: src/_data/sources/economy/house_prices.csv
hash: md5
md5: a1c2a9757b65b5cc8fc78b9fcd509326
size: 462978
md5: 9f02f9dd949519d78bdad07370520d5f
size: 462327
isexec: true
- path: src/_data/sources/economy/unemployment_rate.csv
hash: md5
md5: bd2a40ac249ea43811aa3369f6769f06
size: 213616
md5: e6249d773eebb0ce2f8655272b626b5a
size: 87945
isexec: true
- path: src/_data/sources/economy/wages.csv
hash: md5
md5: f88d129af071c399a97ffbf07ec4dc73
size: 77084
isexec: true
6 changes: 3 additions & 3 deletions pipelines/economy/dvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ stages:
- raw-data/covid-grants-april-2022.xlsx
- raw-data/house-prices.xlsx
- raw-data/unemployment.xlsx
#- raw-data/median-wages.csv
- raw-data/median-wages.csv
outs:
- src/_data/sources/economy/covid_grants_arg.csv:
cache: false
- src/_data/sources/economy/covid_grants_ohlg.csv:
cache: false
#- src/_data/sources/economy/wages.csv:
# cache: false
- src/_data/sources/economy/wages.csv:
cache: false
- src/_data/sources/economy/house_prices.csv:
cache: false
- src/_data/sources/economy/house_price_wage_ratio.csv:
Expand Down
2 changes: 1 addition & 1 deletion src/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ title: Welcome

<h2>Recently updated visualisations...</h2>
<ul class="grid-list">
{% for page in search.pages("theme_page theme!=undefined !draft updated!=undefined", "order updated=desc", 6) %}
{% for page in search.pages("theme_page theme!=undefined !draft updated!=undefined", "order updated=desc", 9) %}
<li><a href="{{ page.url }}" class="{{ data.themes[page.theme].class | safe }}">
{{ data.themes[page.theme].icon | safe }}
<h3>{{ page.title }}</h3>
Expand Down
8 changes: 4 additions & 4 deletions src/themes/economy/wages.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Wages (England, Scotland & Wales)
theme: economy
created: 2023-08-10T20:35
updated: 2023-08-10T20:35
updated: 2024-04-02T22:20
description: |
Constituency-level data on wages.
config:
Expand All @@ -12,7 +12,7 @@ config:
columns:
- name: "filterLabel"
template: "{{ ConstituencyName }} ({{ RegionName }})"
value: "2022"
value: "2023"
scale: Viridis
min: 0
max: 50000
Expand All @@ -34,13 +34,13 @@ config:
label: '0'
tools:
slider:
columns: ["2010","2011","2012","2013","2014","2015","2016","2017","2018","2019","2020","2021","2022"]
columns: ["2010","2011","2012","2013","2014","2015","2016","2017","2018","2019","2020","2021","2022","2023"]
width: 500px
filter:
label: filterLabel
tooltip: "<strong>{{ n }}</strong><br />Median gross annual pay ({{ _value }}): <strong>&pound;{{ {{ _value }} | toLocaleString() }}</strong>"
attribution: |
Data: <a href="https://www.nomisweb.co.uk/articles/295.aspx">The Annual Survey of Hours and Earnings</a> &copy; ONS Crown Copyright (from Nomis on 15 August 2023)
Data: <a href="https://www.nomisweb.co.uk/articles/295.aspx">The Annual Survey of Hours and Earnings</a> &copy; ONS Crown Copyright (from Nomis on 2 April 2024)
---


Expand Down

0 comments on commit 42e2c16

Please sign in to comment.