MEDSL / 2020-elections-official

8 stars 72 forks source link

VTD in 2020-pa-precinct-general.tab #5

Closed rootsmusic closed 2 years ago

rootsmusic commented 2 years ago

(The codebook doesn't specify which fields are concatenated in the 'precinct' field.) I need the VTD code in 2020-pa-precinct-general.tab. Is VTD part of the 'precinct' field? Thanks.

sbaltzmit commented 2 years ago

Yes, it's after the last underscore. The precinct field in that file is constructed as:

PrecinctCode_CongressionalDistrictSenateDistrictHouseDistrict_vtdCode

rootsmusic commented 2 years ago

Ok @sbaltzmit, but some values in the 'precinct' field has only a single character after the last "_" character. The Census has no VTD coded "0". For example, why do the following 'precinct' values end in a single character?

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

precinct -- 1022_007016187_0 1025_007016187_0 112_005009160_0 114_005009160_0 1150_002001175_0 1246_007016187_0 1247_007016187_0 1248_007016187_0 1302_007016131_0 1305_007016131_0 1560_006029129_0 1675_004024130_0 237_012034171_0 25_009011005_0 3535_005026164_0 4235_002003181_0 5373_003007195_0 5376_003007195_0 700_010031087_0 705_010031087_0 710_010031087_0 715_010031087_0 720_010031199_0 722_010031199_0 724_010031087_0 726_010031199_0 728_010031199_0 730_010031193_0 735_010031193_0 740_010031193_0 745_010031193_0 750_010031193_0 755_010031193_0 757_010031193_0 760_010031193_0 762_010031193_0 774_009011126_0 905_016049017_0

sbaltzmit commented 2 years ago

I see VTD codes of 0 in the precinct level election results from the Pennsylvania Department of State, so it wasn't introduced by our cleaning process, we just retained the values that they used. We don't typically match precinct identifiers to the census

rootsmusic commented 2 years ago

Ok @sbaltzmit, I'm trying to figure it out. Where's the raw data from PA DOS? Thanks.

sbaltzmit commented 2 years ago

The PA precinct data were provided to us directly by the PA government, and to my knowledge those data are not directly publicly available from them. I'm closing this issue for now because it has to do with the agreement between two data sources that are external to us, but I'll make a note to come back to it as we have the bandwidth