Transfer the mostly static candidate data from the Google Sheet to a candidates.json.
The rational is to read the Google Sheet once then use the candidates.json file to read the static data by later scripts, rather than having multiple scripts read the Google Sheet directly. The contents of the individual candidate json files will be limited to storing the calculated amounts.
Complete the changes in a branch from dev.
[ ] Create or edit an existing script to read the candidate data from candidate_information and then use it to generate the candidates.json file with the data structure shown below.
[ ] Update Angular code to read from the updated candidates.json file using the revised structure.
{
offices: [
"Mayor",
"City Attorney",
"City Council"
],
candidates: [
{
"candidate name": "Todd Gloria",
"committee name": "Todd Gloria for Mayor 2020",
"office": "Mayor",
"district": "0",
"year": "2000",
"website": "https://toddgloria.com/",
"description": "Assemblymember",
"in general": true,
"calculations": "assets/candidates/2020/mayor/barbara_bry/barbara_bry.json",
"image": "assets/candidates/2020/mayor/barbara_bry/barbara_bry.png"
},
...
{
"candidate name": "Joe LaCava",
"committee name": "Joe LaCava for City Council 2020",
"office": "City Council",
"district": "1",
"year": "2000",
"website": "https://www.joelacava.com/",
"description": "Civil Engineer/ Business Owner",
"in general": true,
"calculations": "",
"image": ""
},
...
]
}
The calculations property name can be changed if needed. The calculations will have an empty value "" when the candidates.json file is generated. A later script will add the file path.
How the image path will be added has not been determined.
Transfer the mostly static candidate data from the Google Sheet to a candidates.json.
The rational is to read the Google Sheet once then use the candidates.json file to read the static data by later scripts, rather than having multiple scripts read the Google Sheet directly. The contents of the individual candidate json files will be limited to storing the calculated amounts.
Complete the changes in a branch from dev.
[ ] Create or edit an existing script to read the candidate data from candidate_information and then use it to generate the candidates.json file with the data structure shown below.
[ ] Update Angular code to read from the updated candidates.json file using the revised structure.
candidate_information Google Sheet: https://docs.google.com/spreadsheets/d/1mENueYg0PhXE_MA9AypWWBJvBLdY03b8H_N_aIW-Ohw
The proposed structure of candidates.json:
The calculations property name can be changed if needed. The calculations will have an empty value "" when the candidates.json file is generated. A later script will add the file path.
How the image path will be added has not been determined.