Shared publicly  - 
 
Alright, so the parser is moving along nicely; it can parse the file for data necessary, it can stick that data in a dictionary with ID#:Occurences. I was given a list of ID#:Names (think of the data as a list of accidents:occurences and you're not far from what it's actually about). Since I'm lazy, I didn't hardcode the dictionary of ID#:Names, instead I did:

for i in range(lowestID#, highestID#+1):
__list_of_IDs.append(str(i))

id_and_names = dict(zip(list_of_IDs, list_of_names))
Obviously they're not named that in the actual code.

Lastly, since we're not looking at more than maybe 116 different ID numbers, I decided to just pull the data with:
for item in occurencesDict:
__if item in id_and_names:
____print(id_and_names[item], "-", occurencesDict[item])

Oh well. At least now I know I can get the data I want; from now on I must prettify the process!
1
Add a comment...