Skip to content

Commit

Permalink
Dashboard updates
Browse files Browse the repository at this point in the history
  • Loading branch information
taz-chiles committed Oct 1, 2024
1 parent 09d28f2 commit b2057fe
Show file tree
Hide file tree
Showing 10 changed files with 859 additions and 19 deletions.
842 changes: 842 additions & 0 deletions scripts/lcip/transform-lcip.ipynb

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions scripts/lcip/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def process_diversity_metrics(data, out_path, name):
for theme in unique_themes:
applied_theme = applied[applied['THEME'] == theme]
funded_theme = funded[funded['THEME'] == theme]
print(applied_theme)

diversity_theme = pd.merge(
applied_theme[['THEME', 'METRIC', 'TOTAL']],
Expand All @@ -82,8 +81,7 @@ def process_diversity_metrics(data, out_path, name):
suffixes=('_APPLIED', '_FUNDED')
)

diversity_theme = diversity_theme.drop(columns={'THEME'})
diversity_theme = diversity_theme.loc[(diversity_theme != 0).any(axis=1)]
diversity_theme = diversity_theme.drop(columns={'THEME'}).dropna()

diversity_theme['TOTAL_APPLIED'] = diversity_theme['TOTAL_APPLIED'].round(0).astype(int)
diversity_theme['TOTAL_FUNDED'] = diversity_theme['TOTAL_FUNDED'].round(0).astype(int)
Expand Down
2 changes: 1 addition & 1 deletion src/lcip/activate/funding-invested/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Activate - Funding Invested (TBC)

{% comp "dashboard.pane" %}
<h3>Funding invested from others</h3>
{% comp "dashboard.big_number", { number: 'XXX'} %}{% endcomp %}
{% comp "dashboard.big_number", { number: viz.lcip.activate.funding['rows'][0]['Funding invested from others'] } %}{% endcomp %}
{% endcomp %}

{% comp "dashboard.pane" %}
Expand Down
2 changes: 1 addition & 1 deletion src/lcip/activate/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ title: Activate

{% comp "dashboard.pane", { link: "/lcip/activate/funding-invested/" } %}
<h3>Funding invested</h3>
{% comp "dashboard.big_number", { number: 'XXX'} %}{% endcomp %}
{% comp "dashboard.big_number", { number: viz.lcip.grow-project.funding['rows'][0]['Funding invested from others'] + viz.lcip.activate.funding['rows'][0]['Funding invested from Leeds City Council']} %}{% endcomp %}
<p class="footnote">Investment</p>
{% endcomp %}

Expand Down
2 changes: 1 addition & 1 deletion src/lcip/cultural_anchors/funding-invested/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Cultural Anchors - Funding Invested (TBC)

{% comp "dashboard.pane" %}
<h3>Funding invested from others</h3>
{% comp "dashboard.big_number", { number: 'XXX'} %}{% endcomp %}
{% comp "dashboard.big_number", { number: viz.lcip.cultural-anchors.funding['rows'][0]['Funding invested from others'] } %}{% endcomp %}
{% endcomp %}

{% comp "dashboard.pane" %}
Expand Down
18 changes: 9 additions & 9 deletions src/lcip/grow_project/applications/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ title: Grow - Project - Applications

{% comp "dashboard.pane" %}
<h3>Eligible applications</h3>
{% comp "dashboard.big_number", { number: viz.grow-project.applications_received['rows'][0]['No. of eligible applications'] } %}{% endcomp %}
{% comp "dashboard.big_number", { number: viz.lcip.grow_project.applications_received['rows'][0]['No. of eligible applications'] } %}{% endcomp %}
{% endcomp %}

{% comp "dashboard.pane" %}
<h3>Ineligible applications</h3>
{% comp "dashboard.big_number", { number: viz.grow-project.applications_received['rows'][0]['No. of ineligible'] } %}{% endcomp %}
{% comp "dashboard.big_number", { number: viz.lcip.grow_project.applications_received['rows'][0]['No. of ineligible'] } %}{% endcomp %}
{% endcomp %}

{% comp "dashboard.pane" %}
<h3>Individual artists</h3>
{% comp "dashboard.big_number", { number: viz.grow-project.applications_received['rows'][0]['from an individual artist'] } %}{% endcomp %}
{% comp "dashboard.big_number", { number: viz.lcip.grow_project.applications_received['rows'][0]['from an individual artist'] } %}{% endcomp %}
{% endcomp %}

{% comp "dashboard.pane" %}
<h3>Organisations</h3>
{% comp "dashboard.big_number", { number: viz.grow-project.applications_received['rows'][0]['from an organisation'] } %}{% endcomp %}
{% comp "dashboard.big_number", { number: viz.lcip.grow_project.applications_received['rows'][0]['from an organisation'] } %}{% endcomp %}
{% endcomp %}
{% endcomp %}

Expand All @@ -30,12 +30,12 @@ title: Grow - Project - Applications

{% comp "dashboard.pane" %}
<h3>Applications started</h3>
{% comp "dashboard.big_number", { fontsize: '2.6em', number: viz.grow-project.leeds_culture_programmes_website['rows'][0]['No. applications started'] } %}{% endcomp %}
{% comp "dashboard.big_number", { fontsize: '2.6em', number: viz.lcip.grow_project.leeds_culture_programmes_website['rows'][0]['No. applications started'] } %}{% endcomp %}
{% endcomp %}

{% comp "dashboard.pane" %}
<h3>Applications completed</h3>
{% comp "dashboard.big_number", { fontsize: '2.6em', number: viz.grow-project.leeds_culture_programmes_website['rows'][0]['No. of applications completed'] } %}{% endcomp %}
{% comp "dashboard.big_number", { fontsize: '2.6em', number: viz.lcip.grow_project.leeds_culture_programmes_website['rows'][0]['No. of applications completed'] } %}{% endcomp %}
{% endcomp %}

{% endcomp %}
Expand All @@ -49,7 +49,7 @@ title: Grow - Project - Applications
{{ comp.oi.map.hex_cartogram({
config: {
hexjson: hex.wards_leeds,
data: viz.grow-project.wards_applicant_based,
data: viz.lcip.grow_project.wards_applicant_based,
scale: 'rgb(30, 172, 175) 0%, rgb(0, 69, 99) 100%',
matchKey: 'ward_code',
min: 0,
Expand All @@ -73,7 +73,7 @@ title: Grow - Project - Applications
{{ comp.oi.map.hex_cartogram({
config: {
hexjson: hex.wards_leeds,
data: viz.grow-project.wards_funded,
data: viz.lcip.grow_project.wards_funded,
scale: 'rgb(30, 172, 175) 0%, rgb(0, 69, 99) 100%',
matchKey: 'ward_code',
value: 'value',
Expand All @@ -95,7 +95,7 @@ title: Grow - Project - Applications

{% comp "dashboard.pane" %}
<h3>Funding requested</h3>
{% comp "dashboard.big_number", { fontsize: '2.6em', number: viz.grow-project.applications_received['rows'][0]['Total amount of funding requested (£)'], prefix: "£"} %}{% endcomp %}
{% comp "dashboard.big_number", { fontsize: '2.6em', number: viz.lcip.grow_project.applications_received['rows'][0]['Total amount of funding requested (£)'], prefix: "£"} %}{% endcomp %}
{% endcomp %}

{% endcomp %}
Expand Down
2 changes: 1 addition & 1 deletion src/lcip/grow_project/funding-invested/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Grow - Project - Funding Invested (TBC)

{% comp "dashboard.pane" %}
<h3>Funding invested from others</h3>
{% comp "dashboard.big_number", { number: 'XXX'} %}{% endcomp %}
{% comp "dashboard.big_number", { number: viz.lcip.grow-project.funding['rows'][0]['Funding invested from others'] } %}{% endcomp %}
{% endcomp %}

{% comp "dashboard.pane" %}
Expand Down
2 changes: 1 addition & 1 deletion src/lcip/grow_revenue/funding-invested/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Grow - Revenue - Funding Invested (TBC)

{% comp "dashboard.pane" %}
<h3>Funding invested from others</h3>
{% comp "dashboard.big_number", { number: 'XXX'} %}{% endcomp %}
{% comp "dashboard.big_number", { number: viz.lcip.grow_revenue.funding['rows'][0]['Funding invested from others'] } %}{% endcomp %}
{% endcomp %}

{% comp "dashboard.pane" %}
Expand Down
2 changes: 1 addition & 1 deletion src/lcip/inspire/funding-invested/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Inspire - Funding Invested (TBC)

{% comp "dashboard.pane" %}
<h3>Funding invested from others</h3>
{% comp "dashboard.big_number", { number: 'XXX'} %}{% endcomp %}
{% comp "dashboard.big_number", { number: viz.lcip.inspire.funding['rows'][0]['Funding invested from others'] } %}{% endcomp %}
{% endcomp %}

{% comp "dashboard.pane" %}
Expand Down
2 changes: 1 addition & 1 deletion src/lcip/thrive/funding-invested/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Thrive - Funding Invested (TBC)

{% comp "dashboard.pane" %}
<h3>Funding invested from others</h3>
{% comp "dashboard.big_number", { number: 'XXX'} %}{% endcomp %}
{% comp "dashboard.big_number", { number: viz.lcip.thrive.funding['rows'][0]['Funding invested from others'] } %}{% endcomp %}
{% endcomp %}

{% comp "dashboard.pane" %}
Expand Down

0 comments on commit b2057fe

Please sign in to comment.