Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesdring committed Nov 21, 2023
2 parents 53b2f66 + a70d192 commit 18e51df
Show file tree
Hide file tree
Showing 6 changed files with 22,190 additions and 37 deletions.
54 changes: 17 additions & 37 deletions _config.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/_includes/css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
text-align: center;
}

.dashboard-viz {
& svg {
height: min(40em, 30vh);
}
}

.auto-grid .oi-dashboard .panel h3 { font-size: 1.2em; }
/* OI dashboard component */
.oi-dashboard .oi-dashboard-inner { --auto-dashboard-min-size: 200px; width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--auto-dashboard-min-size)), 1fr)); grid-gap: 1em; }
Expand Down
4 changes: 4 additions & 0 deletions src/_includes/partials/dashboard.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
{% endfor %}
</ul>

{% comp 'grid.masonry', { block_width: '20rem' } %}
{% include './dashboard/maps.njk' %}
{% endcomp %}

{% comp 'grid.masonry', { block_width: '20rem' } %}
{% include './dashboard/headlines.njk' %}
{% endcomp %}
Expand Down
53 changes: 53 additions & 0 deletions src/_includes/partials/dashboard/maps.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{% set background = "#005776" %}

{% comp 'grid.block', {
link: '~/maps/neet-factors/index.njk' | url + '?map-selector=total-score',
background: background,
colour: 'white'
} %}

<h3>NEET factors</h3>

<p>
Likelihood of NEET outcome modelled on multiple factors by Local Authority.
</p>

<div class="dashboard-viz">
{{ comp.oi.map.hex_cartogram({
config: {
hexjson: search.data('/maps').uk_local_authority_districts_2021,
data: search.data('/maps/neet-factors').view.total_score.rows,
matchKey: 'local_authority_code',
value: 'value',
scale: 'YFF',
tooltip: '{{ n }}: <strong>{{ value | toFixed(2) }}</strong>'
}
}) | simpleviz | safe }}
</div>
{% endcomp %}

{% comp 'grid.block', {
link: '~/maps/employment/index.njk' | url + '?map-selector=census-youth-unemployed-economically-inactive',
background: background,
colour: 'white'
} %}
<h3>Employment</h3>

<p>
Propoprtion of young people unemployed, economically inactive and not in full-time education by parliamentary consituency.
</p>

<div class="dashboard-viz">
{{ comp.oi.map.hex_cartogram({
config: {
hexjson: search.data('/maps').constituencies,
data: search.data('/maps/employment').view.census_unemployed_or_economically_inactive_and_not_in_fte_youth.rows,
matchKey: 'geography_code',
value: 'rate',
scale: 'YFF',
tooltip: '{{ n }}: <strong>{{ rate | toFixed(1) }}%</strong>'
}
}) | simpleviz | safe }}
</div>

{% endcomp %}
File renamed without changes.
Loading

0 comments on commit 18e51df

Please sign in to comment.