datadesk / python-elections

A Python wrapper for the Associated Press' U.S. election data service.
python-elections.rtfd.org
176 stars 49 forks source link

There appears to be a special init file for the independent electoral votes in Nebraska and Maine #58

Closed palewire closed 11 years ago

palewire commented 11 years ago

Glory be, /inits/US/US_20121106_district.txt is born

palewire commented 11 years ago

Could we append this to the other reporting units, maybe, please?

palewire commented 11 years ago

Here are the headers for that file, which I just found in the docs and want to memorialize here.

=============================
District File - <SP>_dist.txt
=============================

During Presidential Primaries, this file lists the Delegate Districts in an election where 
delegates are awarded by district. One record for each district in the state per race 
(different races sometimes have different district identifiers).

ra_number ("Race Number" in the delimited results file) - integer 
    Unique id within state for this race. A "race" describes the contest for 
    a single office. See Race File.

re_number - integer 
    Unique id within the state for the district, regardless of district type.

dist_type - string
    Type of district, such as CD for congressional district, PL for PLEO, A
    L for At Large

dist_number - integer
    District number within the district type, e.g.. 4 for Congressional District 4.

dist_name - string
    Distict 1, PLEO, At Large, for example.

dist_precincts - integer
    Total number of precincts within this district
palewire commented 11 years ago

Might make sense as a ".districts" method tacked on to the PresidentialSummary object

palewire commented 11 years ago

AP says the results can found:

In the /ME and /NE directories, in the _D files, e.g., /ME/flat/ME_D.txt.
palewire commented 11 years ago

And I can't get into those folders. Asking AP.

palewire commented 11 years ago

AP does not give everyone access to these files. They gave them to our account after I asked. So I think any feature to implement this has to be optional.