StataBS / indikatoren

Portal für Statistische Indikatoren des Kantons Basel-Stadt, Schweiz.
http://www.statistik.bs.ch/zahlen/indikatoren/portal.html
3 stars 11 forks source link

Indikatorenportal Statistisches Amt Basel-Stadt

Find and display statistical indicators from the canton of Basel-Stadt, Switzerland. See live version here.

Update charts from ftp server

Create png/pdf files of each chart within an indikatorenset

Manually create svg thumbnails

Local Installation

Install node.js, then run the following command in the console:

npm install

Getting Started

Locally build, start http server, open browser:

npm start

Get Charts from "Umweltbericht beider Basel"

URL Parameters

Parameter View Example Default Description
indikatorenset Indikatorenset Example Switches to Indikatorenset view: Hides sidebar, thema filter, räumliche Gliederung filter, but adds stufe1 and stufe2 filter. Additionally, kuerzelKunde is displayed instead of kuerzel.
stufe Indikatorenset Example 2 Sets the maximum stufe ('Kapitel' / 'Unterkapitel') to be displayed as a dropdown filter control.
showHeader Portal Example false Displays header containing bs.ch logo, StatA text and Link to Indikatorenportal.
PerPage Portal, Indikatorenset Example 16 Sets the number of charts to be displayd per page.
search Portal, Indikatorenset Example Pre-populates the full-text search field.
thema Portal, Indikatorenset Example Pre-populates the thema filter.
unterthema Portal, Indikatorenset Example Pre-populates the thema filter.
raeumlicheGliederung Portal, Indikatorenset Example Pre-populates the raeumlicheGliederung filter.
darstellungsart Portal, Indikatorenset Example Pre-populates the Darstellungsart filter.
stufe1, stufe2, stufe3 Portal, Indikatorenset Example Pre-populates the filter for stufe1, stufe2 and stufe3.
sort Portal, Indikatorenset Example orderKey_asc Sorts charts by a metadata property. Currently supports sorting by kuerzel, kuerzelKunde, orderKey, aktualisierungsdatum.
hideSidebar Portal Example false Hides the sidebar that contains full text search text box, reset button, thema filter, and räumliche Gliederung filter.
hideSearch Portal Example false Hides the full text search text box.
hideResetButton Portal Example false Hides the filter reset button.
hideThema Portal Example false Hides the Thema filter control.
hideUnterthema Portal Example false Hides the Unterthema filter control.
hideRaeumlicheGliederung Portal Example false Hides the Räumliche Gliederung filter control.
hideDarstellungsart Portal Example false Hides the Darstellungsart filter control.
showLastUpdatedSets Portal Example false Shows the table containing the last few updated indikatorensets.
id chart-details.html Example Defines the id of the chart to be displayed.
hideHeaeder chart-details.html Example false Hides the header containing bs.ch logo, StatA text and Link to Indikatorenportal, decreases left margin.
hideTitle chart-details.html Example false Hides the chart Title in the html text below the chart.
hideLesehilfe chart-details.html Example false Hides the Lesehilfe title and text.
hideLesehilfeTitle chart-details.html Example false Hides the Lesehilfe Title but leaves the Lesehilfe text.
hideErlaeuterungen chart-details.html Example false Hides the Erlaeuterungen title and text.
hideErlaeuterungenTitle chart-details.html Example false Hides the Erlaeuterungen Title but leaves the Lesehilfe text.
hideLinks chart-details.html Example false Hides the Links title and list.
hideLinksTitle chart-details.html Example false Hides the Links Title but leaves the Link list.

Development

Add or Update Data

Copy the data as tab-separated tsv file named id.tsv into the folder 'data'. Refresh browser.

Add or Update Metadata

Add or Update Chart Configurations

Create Kennzahlensets for Print: Copy Data and Chart Configurations

Build Application Locally

To build the application, create the json config files and the svg images of the charts that have changed since the last build:

npm run build

To build the application and rebuild all json config files and all chart's svg images:

npm run rebuild

Manually create svg thumbnails:

What does the build script do?

The build script does the following things:

Develop in a private github repository

Develop using cloud9

How to create new charts

Licensing

Highcharts is free for personal, school or non-profit projects under the Creative Commons Attribution - Non Commercial 3.0 License. For commercial and governmental websites and projects, you need to buy a license. See License and Pricing.