diff --git a/clean.py b/clean.py index 97d9ece..5963f33 100644 --- a/clean.py +++ b/clean.py @@ -2,6 +2,7 @@ import json import os + def read_json(filename): with open(filename) as f: return json.load(f) @@ -72,7 +73,7 @@ def clean(recordings): def main(): - peters = read_json('../haydn_bingo/haydn_peters.json') + peters = read_json('./data/haydn_peters.json') recordings = read_csv('./extracted/appendix.csv') data = merge(peters, recordings) @@ -80,7 +81,7 @@ def main(): # This ignores the "Source" column, which ... I don't know what to do with anyway. :) cols = 'Catalog, Opus, Number, Peters, Date, Ensemble, Label, Issue, Notes'.split(', ') - write(data, './viz', 'recordings.csv', cols) + write(data, './site', 'recordings.csv', cols) return data diff --git a/data/haydn_peters.json b/data/haydn_peters.json new file mode 100644 index 0000000..992937c --- /dev/null +++ b/data/haydn_peters.json @@ -0,0 +1,70 @@ +{ + "001_0": null, + "001_1": 4, + "001_2": 4, + "001_3": 4, + "001_4": 4, + "001_6": 4, + "002_1": 4, + "002_2": 4, + "002_4": 4, + "002_6": 4, + "009_1": 3, + "009_2": 1, + "009_3": 3, + "009_4": 3, + "009_5": 3, + "009_6": 3, + "017_1": 3, + "017_2": 3, + "017_3": 3, + "017_4": 3, + "017_5": 1, + "017_6": 3, + "020_1": 4, + "020_2": 4, + "020_3": 4, + "020_4": 2, + "020_5": 2, + "020_6": 2, + "033_1": 4, + "033_2": 2, + "033_3": 2, + "033_4": 4, + "033_5": 4, + "033_6": 2, + "042": 3, + "050_1": 3, + "050_2": 3, + "050_3": 3, + "050_4": 3, + "050_5": 3, + "050_6": 1, + "054_1": 1, + "054_2": 1, + "054_3": 1, + "055_1": 3, + "055_2": 3, + "055_3": 3, + "064_1": 3, + "064_2": 1, + "064_3": 1, + "064_4": 1, + "064_5": 2, + "064_6": 2, + "071_1": 4, + "071_2": 4, + "071_3": 4, + "074_1": 1, + "074_2": 1, + "074_3": 1, + "076_1": 2, + "076_2": 2, + "076_3": 2, + "076_4": 2, + "076_5": 2, + "076_6": 2, + "077_1": 1, + "077_2": 1, + "103": 4 +} \ No newline at end of file