diff --git a/Makefile b/Makefile index cc4f64c..37fa276 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,12 @@ DATA_DIR := data/2021 -OUT_DIR := out +OUT_DIR := out/2021 +YEAR := 2021 XLSX_URL := https://docs.google.com/spreadsheets/d/1l-Zgf1HqaFGd8gRA8kQzaxJ3R7eJy29ORUS8pr5o0nk/export?format=xlsx TSV_URL := https://docs.google.com/spreadsheets/d/1l-Zgf1HqaFGd8gRA8kQzaxJ3R7eJy29ORUS8pr5o0nk/export?format=tsv export DATA_DIR export OUT_DIR +export YEAR .PHONY: $(DATA_DIR)/results.xlsx $(DATA_DIR)/results.tsv diff --git a/data/2021/results.xlsx b/data/2021/results.xlsx index e1e9954..3d1e6a0 100644 Binary files a/data/2021/results.xlsx and b/data/2021/results.xlsx differ diff --git a/out/index.html b/out/index.html new file mode 100644 index 0000000..30b293e --- /dev/null +++ b/out/index.html @@ -0,0 +1,18 @@ + + + + + + + + Koodiklinikan palkkakysely + + +

Koodiklinikan palkkakysely

+ + + diff --git a/out/style.css b/out/style.css new file mode 100644 index 0000000..78f7862 --- /dev/null +++ b/out/style.css @@ -0,0 +1,25 @@ +body { + max-width: 650px; + margin: 40px auto; + padding: 0 10px; + font: 18px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; +} + +h1, h2, h3 { + line-height: 1.2 +} + +@media (prefers-color-scheme: dark) { + body { + color: white; + background: #444 + } + + a:link { + color: #5bf + } + + a:visited { + color: #ccf + } +} diff --git a/pulkka/config.py b/pulkka/config.py index 655474e..3b2c5df 100644 --- a/pulkka/config.py +++ b/pulkka/config.py @@ -3,3 +3,4 @@ from pathlib import Path DATA_DIR = Path(os.environ.get("DATA_DIR", "data")) OUT_DIR = Path(os.environ.get("OUT_DIR", "out")) +YEAR = str(os.environ["YEAR"]) diff --git a/pulkka/massage_templates.py b/pulkka/massage_templates.py index bc49385..9c61dc8 100644 --- a/pulkka/massage_templates.py +++ b/pulkka/massage_templates.py @@ -6,7 +6,7 @@ import jinja2 import numpy import pandas -from pulkka.config import OUT_DIR +from pulkka.config import OUT_DIR, YEAR from pulkka.data_ingest import read_data @@ -19,6 +19,7 @@ def main(): "pd": pandas, "np": numpy, "df": read_data(), + "year": YEAR, } for filename in glob.glob("template/*"): out_filename = OUT_DIR / os.path.relpath(filename, "template") diff --git a/template/index.html b/template/index.html index 20f3463..fa80734 100644 --- a/template/index.html +++ b/template/index.html @@ -26,7 +26,7 @@

Data

-

Kysely

-