Usage
This page shows a few small, practical ways to use the published outputs.
Download The Current Release
The links below are constructed from the latest generated release tag. They point to the release assets produced by the workflow.
Latest release links will appear here after the page loads.
Example: Read The Long CSV In Pandas
import pandas as pd
url = (
"https://github.com/steenhulthin/ruks-data/releases/latest/download/"
"ruks_hovedresultater_long.csv.gz"
)
df = pd.read_csv(url)
asthma = df[
(df["disease_label"] == "astma")
& (df["measure_code"] == "incidence")
& (df["geo_level"] == "country")
& (df["sex_code"] == "both")
& (df["age_group_code"] == "alle-aldre")
& (df["value_kind"] == "count")
]
print(asthma[["year", "value"]].head())Example: Query The SQLite Snapshot
import sqlite3
import pandas as pd
conn = sqlite3.connect("ruks.sqlite")
sql = """
select
f.year,
f.value
from fact_observation f
join dim_disease d on d.disease_id = f.disease_id
join dim_measure m on m.measure_id = f.measure_id
join dim_geography g on g.geography_id = f.geography_id
join dim_sex s on s.sex_id = f.sex_id
join dim_age_group a on a.age_group_id = f.age_group_id
join dim_unit u on u.unit_id = f.unit_id
where d.disease_slug = 'astma'
and m.measure_code = 'incidence'
and g.geo_level = 'country'
and s.sex_code = 'both'
and a.age_group_code = 'alle-aldre'
and u.unit_code = 'count__persons__none'
order by f.year
"""
df = pd.read_sql_query(sql, conn)
print(df)Example: Static-Site Preview
Because the site is static, it does not load the full dataset into the browser. Instead, it uses a small generated JSON summary. The table below is rendered in the browser from site/data/latest-summary.json and shows national asthma incidence counts and rates.
Example series preview will appear here after the page loads.