Skip to content

Commit

Permalink
refer to peters volume data locally
Browse files Browse the repository at this point in the history
  • Loading branch information
jsundram committed Jan 24, 2024
1 parent c2adb8b commit cf9d34b
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import os


def read_json(filename):
with open(filename) as f:
return json.load(f)
Expand Down Expand Up @@ -72,15 +73,15 @@ 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)
data = clean(data)

# 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

Expand Down
70 changes: 70 additions & 0 deletions data/haydn_peters.json
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit cf9d34b

Please sign in to comment.