Data Processing

  1. The raw datasets were downloaded from the ECI website in XLS format.
  1. Please refer to the file code/create_constituency_master.R to follow the steps to process data for each constituency.

  2. Please refer to the file code/create-candidate-profile.R to follow the steps to process data for each candidate.

  3. The Parliament Constituency (PC) GIS file (shape file) was downloaded from the DataMeet website from this link

  4. To plot all data on the map it is important that the geographic entities (States, PC) are referred by same Name or ID’s in the data file and shape file. Please refer to the file code/geography-matching.R to see the list of geographies that had to be updated to ensure common geographies between both files.

  5. A master file of constituencies was created by merging the data file and the shape file. Please refer to the file code/merge-data-gis.R to follow the steps to merge both files.