next up previous contents
Next: Hand-Matching: The Correspondence between Up: Merging Census and Electoral Previous: Aggregate and Merge Electoral

Filenames Used

Merge Program Sequence

* XX is state abbreviation wildcard
* YY is year wildcard

PROGRAM         FUNCTION
-------         --------

copyall.bat     Copies all programs (below) from the programs path
                to a state's path, renaming the state-specific filenames.

stfcv_XX.bat    Converts STF3A files to SAS format

stfmg_XX.sas    Merges all STF3A files into one (mcd-level) file
                Input:  original STF3A files in SAS format
                Output: stfmcdXX.sd2

mcdpr_XX.sas    Reads in precinct-level PL94 data and
                outputs in format for PLVDKEY program
                Input:  original PL94 data
                Output: XX.mcd, mcdpr_XX.sd2 (pared-down PL94 file)

plvdkey.exe     Assigns optimal MCD groups
                Input:  XX.mcd, XX.mge (exceptions file)
                Output: XX.mg (key file), XX.mgl (log of process),
                        XX.mgs (MCDgroup statistics)

getdbf.bat      Unzips and translates original PLVD datafiles.

matct2XX.sas    Assigns county and MCD group codes to PLVD data and
                PL94-based Census precinct match file
                Input:  XX.mg, mcdpr_XX.sd2
                Output: key.sd2, key1.sd2, key2.sd2 (SAS versions of plvdkey
                        output), four original PLVD files, and census.sd2
                        (a PL94-based Census precinct file for matching)
                [NOTE: No state-specific information in this one.]

matcYYXX.sas    Runs computer match of Census and PLVD precincts
                and outputs results in Excel format for hand-matching
                Input:  original PLVD file, census.sd2
                Output: matcYYXX.xls, matc__XX.log
                        (and census2.sd2 & plvd.sd2, which can be dropped
                        once the operation is successful)

[first look for county exceptions; if found, create a .MGE file, unzip
and translate original copies of the PLVD voting data files using
GETDBF.BAT, translate them to SAS 6.04 (SSD) format, and and re-run
plvdkey, matctyXX.sas and matcYYXX.sas]

matfYYXX.sas    Takes hand-matched precinct info from Excel file
                and inserts MCD group codes into PLVD dataset;
                deletes absentee and unmatched precincts
                Input:  mathYYXX.xls, original PLVD file
                Output: matf__XX.log, matfYYXX.sd2

matstfXX.sas    Adds MCD group codes to (mcd-level) STF3A dataset
                [make sure you do this *after* running the exceptions
                for plvdkey]
                Input:  stfmcdXX.sd2, key2.sd2
                Output: stfmcdXX.sd2

mgpvXX.sas      Aggregates PLVD dataset to MCDgroup-level
                Input:  matfYYXX.sd2 (all years)
                Output: mgpvXX.sd2

mgstfXX.sas     Aggregates STF3A dataset to MCDgroup-level
                Input:  stfmcdXX.sd2
                Output: mgstfXX.sd2

mg_XX.sas       Merges aggregate PLVD and STF3A data at MCDgroup-level
                Input:  mgpvXX.sd2, mgstfXX.sd2
                Output: mg_XX.sd2

labeler.sas     Adds SAS variable labels to final dataset (not implemented)




Copyright © 1997-2004 [ROAD Home] Questions? Contact the ROAD webmaster.