Skip to content

Commit 5bbb834

Browse files
committed
feat: how to calculate kpi information
1 parent 2e0bedd commit 5bbb834

9 files changed

Lines changed: 96 additions & 35 deletions

File tree

1.8 MB
Binary file not shown.

src/components/react/LivingLabModalSplit.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
TableHeader,
1616
TableRow,
1717
} from "../react-catalyst-ui-kit";
18-
import { Badge, Tabs } from "./ui";
18+
import { Tabs, Tooltip } from "./ui";
1919
import { getKpiValueByMetricType, getYearFromDate } from "../../lib/helpers";
2020
import ModalSplitChart, { type SplitItem } from "./KpiCards/ModalSplitChart";
2121

@@ -251,11 +251,11 @@ export function LivingLabModalSplit({
251251
<tbody className="bg-white divide-y divide-gray-100 content-start">
252252
{modes.map((m) => (
253253
<TableRow key={m.id}>
254-
<TableCell className="max-w-52 content-start items-start">
255-
<label className="whitespace-normal break-words flex flex-row">
254+
<TableCell className="max-w-52 content-start items-start flex gap-1">
255+
<Tooltip content={m.description}>
256256
{m.name}
257-
<Badge color="light" size="sm" tooltip={m.description} />
258-
</label>
257+
{m.description && <></>}
258+
</Tooltip>
259259
{m.type === "NSM" && <TransportTypeBadge type={m.type} />}
260260
</TableCell>
261261
<TableCell className="content-start">

src/components/react/form/BeforeAndAfterDates.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function BeforeAndAfterDates({
7676
<div className="mb-4 flex flex-col md:flex-row items-center justify-center gap-8">
7777
<Field>
7878
<Label>Collection date BEFORE Implementation</Label>
79-
<small>This date will be set for all KPIs.</small>
79+
<small>This date will be set for all KPI values.</small>
8080
<div className="flex flex-row my-auto items-center gap-2">
8181
{!isEditingBefore ? (
8282
<>
@@ -111,7 +111,7 @@ export function BeforeAndAfterDates({
111111
</Field>
112112
<Field>
113113
<Label>Collection date AFTER Implementation</Label>
114-
<small>This date will be for all new KPIs.</small>
114+
<small>This date will be set for all KPI values.</small>
115115
<div className="flex flex-row my-auto items-center gap-2">
116116
{!isEditingAfter ? (
117117
<>

src/components/react/form/LoginForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default function LoginForm() {
9393
<a
9494
// href={getUrl("/lab-admin/signup")}
9595
href={"#"}
96-
className="text-blue-600 hover:text-blue-800 underline"
96+
className="text-blue-800 hover:text-blue-800 underline"
9797
>
9898
Create a new account (coming soon)
9999
</a>

src/components/react/form/SignupForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export default function SignupForm() {
114114
Already have an account?{" "}
115115
<a
116116
href={getUrl("/lab-admin/login")}
117-
className="text-blue-600 hover:text-blue-800 underline"
117+
className="text-blue-800 hover:text-blue-800 underline"
118118
>
119119
Sign in to your account
120120
</a>

src/components/react/ui/Tooltip.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export function Tooltip({
4444
<div
4545
role="tooltip"
4646
className={`w-52 absolute z-50 inline-block p-2 text-xs text-primary transition-opacity duration-300 bg-light rounded-lg shadow-xs tooltip ${
47-
displayTooltip ? "visible opacity-100" : "invisible opacity-0"
47+
content && displayTooltip
48+
? "visible opacity-100"
49+
: "invisible opacity-0"
4850
} ${
4951
placement === "top"
5052
? "bottom-full left-1/2 -translate-x-1/2 mb-2"

src/pages/lab-admin/index.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,19 +220,19 @@ const steps = [
220220
</h3>
221221
<ul class="list-disc list-inside text-sm text-gray-600 space-y-1">
222222
<li>
223-
<a href="/resources" class="text-blue-600 hover:underline">
223+
<a href="/resources" class="text-blue-800 hover:underline">
224224
Access your Living Lab onboarding guide
225225
</a>
226226
</li>
227227
<li>
228-
<a href="/faq" class="text-blue-600 hover:underline">
228+
<a href="/faq" class="text-blue-800 hover:underline">
229229
Visit the FAQ
230230
</a>
231231
</li>
232232
<li>
233233
<a
234234
href="mailto:support@sum-project.eu"
235-
class="text-blue-600 hover:underline"
235+
class="text-blue-800 hover:underline"
236236
>
237237
Contact the SUM coordination team
238238
</a>

src/pages/lab-admin/kpis.astro

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,49 @@ const valueAfterDate = modalSplitResults?.reduce(
5656
<h2>Share your Key Performance Indicators - KPI</h2>
5757

5858
<InfoAlert
59-
title="How to calculate KPIs ?"
59+
title="How to calculate KPI values?"
6060
icon="question"
6161
variant="success"
62-
actionText="Access documentation"
62+
actionText="KPIs template"
63+
actionHref={"/files/SIEF_All_KPIs-template.xlsx"}
6364
>
64-
<small
65-
>Provide KPI values to quantify the impact of urban mobility measures
66-
implemented in your Living Lab.<br />
65+
<div class="text-sm text-gray-700 space-y-4">
66+
<p class="font-medium">
67+
Your contribution is essential to identify the impacts of New Shared
68+
Mobility measures across Europe.
69+
</p>
6770

68-
<strong>Tip:</strong> Use the provided template to ensure all necessary data
69-
is captured. The <strong
70-
><a href="/files/SIEF_All_KPIs-template.xlsx">SIEF KPIs template</a
71-
></strong
72-
> will guide you to calculate the KPI values.</small
73-
>
71+
<ol class="list-decimal list-inside space-y-2">
72+
<li>
73+
<strong>Review the SIEF (Deliverable D1.2)</strong> — identify the data
74+
you need and define a data collection plan for your city. <a
75+
href="/files/SUM_D1.2_KPI Review_V1.0_FINAL.pdf"
76+
class="text-blue-800 hover:underline"
77+
>Download SUM_D1.2_KPI Review_V1.0_FINAL.pdf</a
78+
>.
79+
</li>
80+
<li>
81+
<strong>Compute KPI values from your data</strong> — use the KPI template
82+
spreadsheet to calculate the values. <a
83+
href="/files/SIEF_All_KPIs-template.xlsx"
84+
class="text-blue-800 hover:underline"
85+
>Download SUM D1.2 SIEF_All_KPIs-template</a
86+
>.
87+
</li>
88+
<li>
89+
<strong>Submit your KPI values</strong> — add the computed KPI values
90+
to the SUM Open Data Platform so they can feed analyses and comparisons.
91+
</li>
92+
</ol>
93+
94+
<ul class="list-disc list-inside text-sm text-gray-600 space-y-1">
95+
<li>
96+
If a New Shared Mobility service was introduced after the baseline
97+
period, record it as <strong>0%</strong>
98+
for the "before" measurement.
99+
</li>
100+
</ul>
101+
</div>
74102
</InfoAlert>
75103

76104
<LivingLabKPIsEdition

src/pages/lab-admin/modal-split.astro

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,33 +50,64 @@ const valueAfterDate = modalSplitResults?.reduce(
5050
<div class="mx-auto px-4 py-8 flex flex-col gap-8">
5151
<h2 class="text-2xl font-bold mb-4">Modal split KPI</h2>
5252

53-
<InfoAlert title="" icon="question" variant="info">
53+
<InfoAlert
54+
title="Why are transport modes status important?"
55+
icon="question"
56+
variant="info"
57+
>
5458
<small
5559
>This page collects modal split for all transport modes.<br />
5660
The status of the transport mode provides insights about the scheduled changes
5761
on the transport network within the Living Lab.<br />
5862
<i
5963
>If there is a New Shared Mobility Service introduced, please record
6064
with 0% at the before implementation phase.</i
61-
><br />
65+
>
6266
</small>
6367
</InfoAlert>
6468

6569
<InfoAlert
66-
title=""
70+
title="How to calculate Modal Split KPI values?"
6771
icon="question"
6872
variant="success"
6973
actionText="Modal Split KPI template"
7074
actionHref={"/files/SIEF_Modal_Split_KPI-template.xlsx"}
7175
>
72-
<small>
73-
<strong>Tip:</strong> the Modal Split KPI values can be identified with the
74-
<strong
75-
><a href="/files/SIEF_Modal_Split_KPI-template.xlsx"
76-
>Modal Split template spreadsheet</a
77-
></strong
78-
>, which will guide you to calculate the values.
79-
</small>
76+
<div class="text-sm text-gray-700 space-y-4">
77+
<p class="font-medium">
78+
Your contribution is essential to identify the impacts of New Shared
79+
Mobility measures across Europe.
80+
</p>
81+
82+
<ol class="list-decimal list-inside space-y-2">
83+
<li>
84+
<strong>Review the SIEF (Deliverable D1.2)</strong> — identify the data
85+
you need and define a data collection plan for your city. <a
86+
href="/files/SUM_D1.2_KPI Review_V1.0_FINAL.pdf"
87+
class="text-blue-800 hover:underline"
88+
>Download SUM_D1.2_KPI Review_V1.0_FINAL.pdf</a
89+
>.
90+
</li>
91+
<li>
92+
<strong>Compute KPI values from your data</strong> — use the Modal Split
93+
KPI template spreadsheet to calculate the values. <a
94+
href="/files/SIEF_Modal_Split_KPI-template.xlsx"
95+
class="text-blue-800 hover:underline"
96+
>Download SIEF_Modal_Split_KPI-template</a
97+
>.
98+
</li>
99+
<li>
100+
<strong>Submit your KPI values</strong> — add the computed KPI values
101+
to the SUM Open Data Platform so they can feed analyses and comparisons.
102+
</li>
103+
</ol>
104+
105+
<small>
106+
If a New Shared Mobility service was introduced after the baseline
107+
period, record it as <strong>0%</strong>
108+
for the "before" measurement.
109+
</small>
110+
</div>
80111
</InfoAlert>
81112
</div>
82113

0 commit comments

Comments
 (0)