diff options
Diffstat (limited to 'app/main/datasets.py')
| -rw-r--r-- | app/main/datasets.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/app/main/datasets.py b/app/main/datasets.py index c06b4bf..7245e51 100644 --- a/app/main/datasets.py +++ b/app/main/datasets.py @@ -2,18 +2,11 @@ import os import json +import logging -from flask import current_app + +from app.utils.datasets import md5sum -def load_data_for_chart(name): - dataset_dir = os.path.join( - current_app.instance_path, current_app.config["DATASET_DIR"] - ) - target_filename = os.path.join(dataset_dir, name + ".json") - with open(target_filename, 'rb') as fid: - data = json.load(fid) - chart_data = [{"value": x} for x in data['series']['V1']['raw']] - return {"chart_data": chart_data} |
