Dev - #100
Closed
manuelgrabmayer wants to merge 93 commits into
Closed
Conversation
…-fix-ci-pipeline Fixed indentation error from copilot
…-draft-a-backend-for-frontend feat: implement Backend for Frontend (BFF) layer using FastAPI
…-add-360-giving-api-wrapper feat: Add 360Giving API wrapper and unit tests, update User-Agent hea…
…flagging-for-programme-areas
…-tag-origin-tracing-flagging-for-programme-areas Implement tag origin tracing metadata and upgrade schema to list of o…
…eline, SQLite storage backend, and BFF endpoints (including Map, Grants search, Sankey flows, and Pipeline Admin triggers)
…-case unit tests raising total BFF coverage to 92%
…-feature-implement-uk-charities-data-pipeline-and-refine-bff feat: implement UK Charity Commission and 360Giving API ingestion pip…
… into 83-frontend-draft
…-frontend-draft 83 frontend draft
…-clean-up-code-for-aws-integration 91 clean up code for aws integration
…-aws-account-management-rbac-setup 94 aws account management rbac setup
…-fix-documentation docs: consolidate customer handover
| </div> | ||
| {trendIsLoading && !trends ? <TrendLoadingState /> : trends?.status === "available" && trends.items.length ? <> | ||
| <p className="visually-hidden">Grant awards are shown for {trends.items.length} {trends.granularity} periods in {trends.currency}. Use the chart tooltip to inspect total awarded funding, grant count, and mapped versus unmapped grants for each period.</p> | ||
| <div className={`analytics-chart-plot compact trend-chart-plot${trendIsLoading ? " is-refreshing" : ""}`}><ResponsiveContainer width="100%" height="100%"><BarChart data={trends.items} margin={{ top: 6, right: 8, bottom: 0, left: 0 }}><CartesianGrid strokeDasharray="3 3" stroke="rgba(0,0,0,.09)" /><XAxis dataKey="month" minTickGap={28} tick={{ fill: "#707070", fontSize: 10 }} tickFormatter={value => String(value).slice(2)} /><YAxis width={58} tick={{ fill: "#707070", fontSize: 10 }} tickFormatter={value => formatCurrency(Number(value), trends.currency).replace("£", "£")} /><Tooltip content={({ active, payload: rows, label }) => { const item = rows?.[0]?.payload as TrendItem | undefined; if (!active || !item) return null; return <div className="chart-tooltip"><strong>{label}</strong>{item.coverage_status === "observed" ? <><span>{formatCurrency(item.total_amount, trends.currency)}</span><span>{item.grant_count} grants · {item.mapped_grant_count} mapped · {item.unmapped_grant_count} unmapped</span><small>Click to explore this period.</small></> : <span>{item.coverage_status === "partial" ? "Source records without a valid aggregate." : "No source coverage established; not a confirmed zero."}</span>}</div>; }} /><Bar dataKey="total_amount" name="Awarded funding" fill="var(--nl-chart-primary)" radius={[4, 4, 0, 0]} isAnimationActive={false} cursor="pointer" onClick={data => { const item = data?.payload as TrendItem | undefined; if (item?.grant_count) openDrilldown({ type: "period", value: item.month }); }} /></BarChart></ResponsiveContainer>{trendIsLoading && <div className="trend-chart-refresh"><TrendLoadingState compact /></div>}</div> |
| <div className="chart-card-header programme-card-header"><div><h3 id="programme-chart-title">Grant Allocation by Programme Area</h3><span>{themes?.classification_coverage.classified_percentage ?? "—"}% classification coverage · {themes?.classification_coverage.classified_grant_count ?? 0} classified grants</span></div><div className="programme-controls"><div className="chart-segmented" role="group" aria-label="Classification scope"><button type="button" className={!includeUnclassified ? "active" : ""} aria-pressed={!includeUnclassified} onClick={() => setIncludeUnclassified(false)}>Classified</button><button type="button" className={includeUnclassified ? "active" : ""} aria-pressed={includeUnclassified} onClick={() => setIncludeUnclassified(true)}>All grants</button></div><div className="chart-segmented" role="group" aria-label="Programme category count"><button type="button" className={!showAllProgrammes ? "active" : ""} aria-pressed={!showAllProgrammes} onClick={() => setShowAllProgrammes(false)}>Top 8</button><button type="button" className={showAllProgrammes ? "active" : ""} aria-pressed={showAllProgrammes} onClick={() => setShowAllProgrammes(true)}>All categories</button></div></div></div> | ||
| {loading && !themes ? <div className="chart-loading"><LoaderCircle size={20} /> Loading programme allocation…</div> : themes?.status === "available" && visibleThemeItems.length ? <> | ||
| <p className="visually-hidden">Programme allocation is shown across {visibleThemeItems.length} categories in {themes.currency}. Programme classification coverage is {themes.classification_coverage.classified_percentage} percent.</p> | ||
| <div className="analytics-chart-plot compact programme-chart-plot"><ResponsiveContainer width="100%" height="100%"><BarChart data={visibleThemeItems} layout="vertical" margin={{ top: 0, right: 10, bottom: 0, left: 20 }}><CartesianGrid strokeDasharray="3 3" stroke="rgba(0,0,0,.09)" /><XAxis type="number" tick={{ fill: "#707070", fontSize: 10 }} tickFormatter={value => formatCurrency(Number(value), themes.currency).replace("£", "£")} /><YAxis type="category" width={158} dataKey="programme_area" tick={{ fill: "#3f3f3f", fontSize: 10 }} /><Tooltip formatter={(value) => formatCurrency(Number(value), themes.currency)} /><Bar dataKey="allocated_amount" radius={[0, 4, 4, 0]} isAnimationActive={false}>{visibleThemeItems.map(item => <Cell key={item.programme_area} fill={item.programme_area === "Unclassified" ? "#a6a6a6" : "#a29aff"} cursor="pointer" onClick={() => openDrilldown({ type: "programme_area", value: item.programme_area })} />)}</Bar></BarChart></ResponsiveContainer></div> |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merging dev into main