From 3631c273e9c0359085bcf09aec9586f7f5f1b346 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Fri, 19 Feb 2021 14:54:21 +0200 Subject: [PATCH] Show some basic stats on the index page --- massage_templates.py | 7 +++++++ template/index.html | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/massage_templates.py b/massage_templates.py index 304da4a..5aa2a6f 100644 --- a/massage_templates.py +++ b/massage_templates.py @@ -3,6 +3,10 @@ import glob import os import jinja2 +import numpy +import pandas + +from data_ingest import read_data def main(): @@ -11,6 +15,9 @@ def main(): ) data = { "date": datetime.datetime.utcnow(), + "pd": pandas, + "np": numpy, + "df": read_data(), } for filename in glob.glob("template/*"): out_filename = os.path.join("out", os.path.relpath(filename, "template")) diff --git a/template/index.html b/template/index.html index a3aa578..cfed1b4 100644 --- a/template/index.html +++ b/template/index.html @@ -10,6 +10,19 @@

Koodiklinikan palkkakysely

+

Tunnusluvut

+ +

Lisää