electiondata
electiondata copied to clipboard
Implement tools to upload external data to db & access it via scatterplot app
- [ ] Given data by sub jurisdiction (e.g., census data), upsert data into ExternalData and ExternalDataSet tables.
- [ ] Associate a record in ExternalDataSet to a particular Election
- [ ] Given an election-jurisdiction pair, find -- in order -- all data categories available for major sub jurisdiction (e.g., Population by age, Population by race)
- [ ] Given an e-j pair and a data category, find -- in order -- all available counts (labeled, e.g., by '30 to 49'), along with short source for attribution -- counts only for major subdivision, though.
- [ ] Given e-j pair, data category and count label, get vector of counts (for analysis, display, etc.)
How to handle data missing from only some subdivisions? One option: just ignore it....
Columns: Election_Id, Jurisdiction_Id, SubJurisdiction_Id, ShortDataSource, Category, Label, Value, InCategoryOrder, DataYear ?