Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ You can also check the
runtime, to avoid having to rebuild the application when the key is rotated
- Use AGENTS.md instead of CLAUDE.md and adjust context according to recent
findings of studies about the impact of context files for coding AIs
- Remove LINDASOld endpoint configurations
- Documentation
- added publiccode.yml for discoverability

Expand Down Expand Up @@ -1440,6 +1441,7 @@ visualize.admin.ch are now noticeable faster.
#### Performance

- Improved performance of cube data fetching

- Added LRU cache to min max queries
- Added query cache to bulk queries
- Ordered filter so that non-discriminant filter are last
Expand Down
2 changes: 1 addition & 1 deletion app/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DATABASE_URL=postgres://postgres:password@localhost:5432/visualization_tool
ENDPOINT=sparql+https://cached.lindas.admin.ch/query
SPARQL_GEO_ENDPOINT=https://geo.ld.admin.ch/query
GRAPHQL_ENDPOINT=/api/graphql
WHITELISTED_DATA_SOURCES=["Prod", "Prod-uncached", "Int", "Int-uncached", "Test", "Test-uncached", "LINDASold-Prod", "LINDASold-Prod-uncached", "LINDASold-Int", "LINDASold-Int-uncached", "LINDASold-Test", "LINDASold-Test-uncached"]
WHITELISTED_DATA_SOURCES=["Prod", "Prod-uncached", "Int", "Int-uncached", "Test", "Test-uncached"]
SENTRY_IGNORE_API_RESOLUTION_ERROR=1
MAPTILER_API_KEY=123
ADFS_PROFILE_URL=https://www.myaccount-r.eiam.admin.ch/
Expand Down
2 changes: 1 addition & 1 deletion app/configurator/components/add-dataset-drawer.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const photovoltaikChartStateMock: ConfiguratorStateConfiguringChart = {
state: "CONFIGURING_CHART",
dataSource: {
type: "sparql",
url: "https://lindas-cached.int.cluster.ldbar.ch/query",
url: "https://int.cached.lindas.admin.ch/query",
},
layout: {
activeField: "y",
Expand Down
2 changes: 1 addition & 1 deletion app/pages/_pivot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Card = styled(MUICard)({
});

const intDatasource = {
sourceUrl: "https://lindas-cached.int.cluster.ldbar.ch/query",
sourceUrl: "https://int.cached.lindas.admin.ch/query",
sourceType: "sparql",
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"dataSet": "https://environment.ld.admin.ch/foen/ubd0104/11",
"dataSource": {
"url": "https://lindas-cached.int.cluster.ldbar.ch/query",
"url": "https://int.cached.lindas.admin.ch/query",
"type": "sparql"
},
"chartConfig": {
Expand Down
2 changes: 1 addition & 1 deletion app/test/__fixtures/config/int/column-heavy-metals.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dataSet": "https://environment.ld.admin.ch/foen/ubd0066/15",
"dataSource": {
"type": "sparql",
"url": "https://lindas-cached.int.cluster.ldbar.ch/query"
"url": "https://int.cached.lindas.admin.ch/query"
},
"chartConfig": {
"version": "1.2.1",
Expand Down
2 changes: 1 addition & 1 deletion app/test/__fixtures/config/int/map-nfi.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dataSet": "https://environment.ld.admin.ch/foen/nfi/nfi_C-98/cube/2023-1",
"dataSource": {
"type": "sparql",
"url": "https://lindas-cached.int.cluster.ldbar.ch/query"
"url": "https://int.cached.lindas.admin.ch/query"
},
"meta": {
"title": {
Expand Down
2 changes: 1 addition & 1 deletion app/test/__fixtures/config/int/pie-red-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dataSet": "https://environment.ld.admin.ch/foen/UBD003002/5",
"dataSource": {
"type": "sparql",
"url": "https://lindas-cached.int.cluster.ldbar.ch/query"
"url": "https://int.cached.lindas.admin.ch/query"
},
"meta": {
"title": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dataSet": "https://environment.ld.admin.ch/foen/palmer-penguins/18",
"dataSource": {
"type": "sparql",
"url": "https://lindas-cached.int.cluster.ldbar.ch/query"
"url": "https://int.cached.lindas.admin.ch/query"
},
"meta": {
"title": {
Expand Down
6 changes: 2 additions & 4 deletions e2e/color-mapping-maps.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ test("@noci should be possible to de-select options from color component in maps
})
);

const filtersButton = await filterControlSection.findByRole("button", {
name: "Edit filters",
});
await filtersButton.click();
await page.getByRole("button", { name: "Edit filters" }).click();

const filters = selectors.edition.filterDrawer().within();
await (await filters.findByText("Canton of Zurich")).click();
await (await filters.findByText("Apply filters")).click();
Expand Down
3 changes: 2 additions & 1 deletion e2e/edition.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import offentlicheAusgabenChartConfigFixture from "./fixtures/offentliche-ausgab

const { expect, test } = setup();

test("should be possible to edit filters of a hierarchy", async ({
// skipped due to probable issues with query for multiple cubes (see chart config)
test.skip("should be possible to edit filters of a hierarchy", async ({
page,
screen,
selectors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dataSet": "https://environment.ld.admin.ch/foen/fab_hierarchy_test12_switzerland_canton_municipality/5",
"dataSource": {
"type": "sparql",
"url": "https://lindas-cached.int.cluster.ldbar.ch/query"
"url": "https://int.cached.lindas.admin.ch/query"
},
"meta": {
"title": { "de": "", "fr": "", "it": "", "en": "" },
Expand Down
251 changes: 128 additions & 123 deletions e2e/fixtures/offentliche-ausgaben-chart-config.json
Original file line number Diff line number Diff line change
@@ -1,137 +1,142 @@
{
"version": "5.2.0",
"state": "CONFIGURING_CHART",
"dataSet": "https://environment.ld.admin.ch/foen/fab_Offentliche_Ausgaben_test3/7",
"dataSource": {
"type": "sparql",
"url": "https://lindas-cached.int.cluster.ldbar.ch/query"
"url": "https://cached.lindas.admin.ch/query"
},
"meta": {
"title": { "de": "", "fr": "", "it": "", "en": "" },
"description": { "de": "", "fr": "", "it": "", "en": "" }
},
"chartConfig": {
"version": "1.2.1",
"chartType": "column",
"filters": {
"https://environment.ld.admin.ch/foen/fab_Offentliche_Ausgaben_test3/kurzel": {
"type": "single",
"value": "Bd"
"layout": {
"type": "tab",
"meta": {
"title": {
"de": "",
"en": "",
"fr": "",
"it": ""
},
"https://environment.ld.admin.ch/foen/fab_Offentliche_Ausgaben_test3/code": {
"type": "multi",
"values": {
"https://ld.admin.ch/cube/dimension/cofog/gf02": true,
"https://ld.admin.ch/cube/dimension/cofog/gf07": true,
"https://ld.admin.ch/cube/dimension/cofog/gf10": true
}
}
},
"interactiveFiltersConfig": {
"legend": { "active": false, "componentIri": "" },
"timeRange": {
"active": false,
"componentIri": "",
"presets": { "type": "range", "from": "", "to": "" }
"description": {
"de": "",
"en": "",
"fr": "",
"it": ""
},
"dataFilters": { "active": false, "componentIris": [] }
"label": {
"de": "",
"en": "",
"fr": "",
"it": ""
}
},
"fields": {
"x": {
"componentIri": "https://environment.ld.admin.ch/foen/fab_Offentliche_Ausgaben_test3/jahr",
"sorting": { "sortingType": "byDimensionLabel", "sortingOrder": "asc" }
"blocks": [
{
"type": "chart",
"key": "aK2t_tmCrG35",
"initialized": false
}
]
},
"chartConfigs": [
{
"key": "aK2t_tmCrG35",
"version": "5.2.0",
"meta": {
"title": {
"en": "",
"de": "",
"fr": "",
"it": ""
},
"description": {
"en": "",
"de": "",
"fr": "",
"it": ""
},
"label": {
"en": "",
"de": "",
"fr": "",
"it": ""
}
},
"y": {
"componentIri": "https://environment.ld.admin.ch/foen/fab_Offentliche_Ausgaben_test3/in-pct"
"cubes": [
{
"iri": "https://environment.ld.admin.ch/foen/EFV_cofog_international/2",
"filters": {
"https://environment.ld.admin.ch/foen/EFV_cofog_international(VISUALIZE.ADMIN_COMPONENT_ID_SEPARATOR)https://environment.ld.admin.ch/foen/EFV_cofog_international/cofog": {
"type": "single",
"value": "https://ld.admin.ch/cube/dimension/cofog/gf01"
},
"https://environment.ld.admin.ch/foen/EFV_cofog_international(VISUALIZE.ADMIN_COMPONENT_ID_SEPARATOR)https://environment.ld.admin.ch/foen/EFV_cofog_international/country": {
"type": "single",
"value": "https://environment.ld.admin.ch/foen/EFV_cofog_international/Country/AUS"
}
}
}
],
"interactiveFiltersConfig": {
"legend": {
"active": false,
"componentId": ""
},
"timeRange": {
"active": false,
"componentId": "https://environment.ld.admin.ch/foen/EFV_cofog_international(VISUALIZE.ADMIN_COMPONENT_ID_SEPARATOR)https://environment.ld.admin.ch/foen/EFV_cofog_international/jahr",
"presets": {
"type": "range",
"from": "",
"to": ""
}
},
"dataFilters": {
"active": false,
"componentIds": [],
"defaultValueOverrides": {},
"filterTypes": {},
"defaultOpen": true
},
"calculation": {
"active": false,
"type": "identity"
}
},
"segment": {
"componentIri": "https://environment.ld.admin.ch/foen/fab_Offentliche_Ausgaben_test3/code",
"palette": "category10",
"type": "stacked",
"sorting": { "sortingType": "byDimensionLabel", "sortingOrder": "asc" },
"colorMapping": {
"https://ld.admin.ch/cube/dimension/cofog/gf01": "#1f77b4",
"https://ld.admin.ch/cube/dimension/cofog/gf0101": "#ff7f0e",
"https://ld.admin.ch/cube/dimension/cofog/gf0102": "#2ca02c",
"https://ld.admin.ch/cube/dimension/cofog/gf0103": "#d62728",
"https://ld.admin.ch/cube/dimension/cofog/gf0104": "#9467bd",
"https://ld.admin.ch/cube/dimension/cofog/gf0105": "#8c564b",
"https://ld.admin.ch/cube/dimension/cofog/gf0106": "#e377c2",
"https://ld.admin.ch/cube/dimension/cofog/gf0107": "#7f7f7f",
"https://ld.admin.ch/cube/dimension/cofog/gf0108": "#bcbd22",
"https://ld.admin.ch/cube/dimension/cofog/gf02": "#17becf",
"https://ld.admin.ch/cube/dimension/cofog/gf0201": "#1f77b4",
"https://ld.admin.ch/cube/dimension/cofog/gf0202": "#ff7f0e",
"https://ld.admin.ch/cube/dimension/cofog/gf0203": "#2ca02c",
"https://ld.admin.ch/cube/dimension/cofog/gf0204": "#d62728",
"https://ld.admin.ch/cube/dimension/cofog/gf0205": "#9467bd",
"https://ld.admin.ch/cube/dimension/cofog/gf03": "#8c564b",
"https://ld.admin.ch/cube/dimension/cofog/gf0301": "#e377c2",
"https://ld.admin.ch/cube/dimension/cofog/gf0302": "#7f7f7f",
"https://ld.admin.ch/cube/dimension/cofog/gf0303": "#bcbd22",
"https://ld.admin.ch/cube/dimension/cofog/gf0304": "#17becf",
"https://ld.admin.ch/cube/dimension/cofog/gf0305": "#1f77b4",
"https://ld.admin.ch/cube/dimension/cofog/gf0306": "#ff7f0e",
"https://ld.admin.ch/cube/dimension/cofog/gf04": "#2ca02c",
"https://ld.admin.ch/cube/dimension/cofog/gf0401": "#d62728",
"https://ld.admin.ch/cube/dimension/cofog/gf0402": "#9467bd",
"https://ld.admin.ch/cube/dimension/cofog/gf0403": "#8c564b",
"https://ld.admin.ch/cube/dimension/cofog/gf0404": "#e377c2",
"https://ld.admin.ch/cube/dimension/cofog/gf0405": "#7f7f7f",
"https://ld.admin.ch/cube/dimension/cofog/gf0406": "#bcbd22",
"https://ld.admin.ch/cube/dimension/cofog/gf0407": "#17becf",
"https://ld.admin.ch/cube/dimension/cofog/gf0408": "#1f77b4",
"https://ld.admin.ch/cube/dimension/cofog/gf0409": "#ff7f0e",
"https://ld.admin.ch/cube/dimension/cofog/gf05": "#2ca02c",
"https://ld.admin.ch/cube/dimension/cofog/gf0501": "#d62728",
"https://ld.admin.ch/cube/dimension/cofog/gf0502": "#9467bd",
"https://ld.admin.ch/cube/dimension/cofog/gf0503": "#8c564b",
"https://ld.admin.ch/cube/dimension/cofog/gf0504": "#e377c2",
"https://ld.admin.ch/cube/dimension/cofog/gf0505": "#7f7f7f",
"https://ld.admin.ch/cube/dimension/cofog/gf0506": "#bcbd22",
"https://ld.admin.ch/cube/dimension/cofog/gf06": "#17becf",
"https://ld.admin.ch/cube/dimension/cofog/gf0601": "#1f77b4",
"https://ld.admin.ch/cube/dimension/cofog/gf0602": "#ff7f0e",
"https://ld.admin.ch/cube/dimension/cofog/gf0603": "#2ca02c",
"https://ld.admin.ch/cube/dimension/cofog/gf0604": "#d62728",
"https://ld.admin.ch/cube/dimension/cofog/gf0605": "#9467bd",
"https://ld.admin.ch/cube/dimension/cofog/gf0606": "#8c564b",
"https://ld.admin.ch/cube/dimension/cofog/gf07": "#e377c2",
"https://ld.admin.ch/cube/dimension/cofog/gf0701": "#7f7f7f",
"https://ld.admin.ch/cube/dimension/cofog/gf0702": "#bcbd22",
"https://ld.admin.ch/cube/dimension/cofog/gf0703": "#17becf",
"https://ld.admin.ch/cube/dimension/cofog/gf0704": "#1f77b4",
"https://ld.admin.ch/cube/dimension/cofog/gf0705": "#ff7f0e",
"https://ld.admin.ch/cube/dimension/cofog/gf0706": "#2ca02c",
"https://ld.admin.ch/cube/dimension/cofog/gf08": "#d62728",
"https://ld.admin.ch/cube/dimension/cofog/gf0801": "#9467bd",
"https://ld.admin.ch/cube/dimension/cofog/gf0802": "#8c564b",
"https://ld.admin.ch/cube/dimension/cofog/gf0803": "#e377c2",
"https://ld.admin.ch/cube/dimension/cofog/gf0804": "#7f7f7f",
"https://ld.admin.ch/cube/dimension/cofog/gf0805": "#bcbd22",
"https://ld.admin.ch/cube/dimension/cofog/gf0806": "#17becf",
"https://ld.admin.ch/cube/dimension/cofog/gf09": "#1f77b4",
"https://ld.admin.ch/cube/dimension/cofog/gf0901": "#ff7f0e",
"https://ld.admin.ch/cube/dimension/cofog/gf0902": "#2ca02c",
"https://ld.admin.ch/cube/dimension/cofog/gf0903": "#d62728",
"https://ld.admin.ch/cube/dimension/cofog/gf0904": "#9467bd",
"https://ld.admin.ch/cube/dimension/cofog/gf0905": "#8c564b",
"https://ld.admin.ch/cube/dimension/cofog/gf0906": "#e377c2",
"https://ld.admin.ch/cube/dimension/cofog/gf0907": "#7f7f7f",
"https://ld.admin.ch/cube/dimension/cofog/gf0908": "#bcbd22",
"https://ld.admin.ch/cube/dimension/cofog/gf10": "#17becf",
"https://ld.admin.ch/cube/dimension/cofog/gf1001": "#1f77b4",
"https://ld.admin.ch/cube/dimension/cofog/gf1002": "#ff7f0e",
"https://ld.admin.ch/cube/dimension/cofog/gf1003": "#2ca02c",
"https://ld.admin.ch/cube/dimension/cofog/gf1004": "#d62728",
"https://ld.admin.ch/cube/dimension/cofog/gf1005": "#9467bd",
"https://ld.admin.ch/cube/dimension/cofog/gf1006": "#8c564b",
"https://ld.admin.ch/cube/dimension/cofog/gf1007": "#e377c2",
"https://ld.admin.ch/cube/dimension/cofog/gf1008": "#7f7f7f",
"https://ld.admin.ch/cube/dimension/cofog/gf1009": "#bcbd22",
"https://ld.admin.ch/cube/dimension/cofog/gftot": "#17becf"
"annotations": [],
"limits": {},
"conversionUnitsByComponentId": {},
"chartType": "column",
"fields": {
"x": {
"componentId": "https://environment.ld.admin.ch/foen/EFV_cofog_international(VISUALIZE.ADMIN_COMPONENT_ID_SEPARATOR)https://environment.ld.admin.ch/foen/EFV_cofog_international/jahr",
"sorting": {
"sortingType": "byAuto",
"sortingOrder": "asc"
}
},
"y": {
"componentId": "https://environment.ld.admin.ch/foen/EFV_cofog_international(VISUALIZE.ADMIN_COMPONENT_ID_SEPARATOR)https://environment.ld.admin.ch/foen/EFV_cofog_international/domesticcurrency"
},
"color": {
"type": "single",
"paletteId": "category10",
"color": "#1d4ed8"
}
},
"activeField": "y"
}
],
"activeChartKey": "aK2t_tmCrG35",
"dashboardFilters": {
"timeRange": {
"active": false,
"timeUnit": "",
"presets": {
"from": "",
"to": ""
}
},
"dataFilters": {
"componentIds": [],
"filters": {}
}
},
"activeField": "segment"
}
}
Loading
Loading