dhmit / democracy_africa

dhmit's spring 2020 project - Democracy and Development: Perspectives from Africa
4 stars 2 forks source link

Campaign - reorganized population data in front end #82

Closed amy-lei closed 4 years ago

amy-lei commented 4 years ago

We thought it would be easier and more efficient to store the population as a dictionary mapping provinces to a citizen list and supporter count. Prior to this, we used two separate states. One to store a list of all citizens in a given country, and the second to store a dictionary that maps provinces to supporter counts and population size. This caused us to have to look through the same data multiple times.

(Making this PR now so the rest of the team can use the up-to-date data)