Permalink
Browse files

Added actual data into uprolls2012 and uprolls2013

  • Loading branch information...
raphael-susewind committed Feb 22, 2016
1 parent 4b15c65 commit 95e52bbc8eaf64059c9062e00f5001eb3cf1a4da
@@ -1,18 +1,14 @@
# Data on religion and politics in India
This roadmap is a reminder to myself what I aim to achieve over the next couple of months (I am not giving firm dates here, out of experience...). I put it online just in case anyone stumbles across it and is willing / able to contribute (I particularly think of form20 results, which tend to be a major hassle to scrape)
This roadmap is a reminder to myself what I aim to achieve for future releases (no firm timeline, though). I put it online just in case anyone stumbles across it and is willing / able to contribute (I particularly think of form20 results, which tend to be a major hassle to scrape and cleanup)
## First proper release:
For the first official release of this dataset, I aim to import and double-check all Uttar Pradesh data that was formerly hosted on my personal website. Specifically, these tasks are still open:
* Add actual data from rolls in 2012 and 2013 and double check lastupdate for both
* Add frontpage stuff from rolls in 2014 into upid
* Wait for a few weeks to see whether any bugs crop up, then make the formal release
For the first official release of this dataset, covering Uttar Pradesh from 2007 to 2014, all data is now incorporated - I just wait for a couple of weeks before making a formal release, to see whether any conspicuous bugs crop up...
## Second proper release:
Once UP is dealt with properly, I will expand to all-India level for the 2014 general elections. Namematching might not cover all states because it eats tons of resources - lets see. Anyway, this would be desirable:
Once UP is dealt with properly, I intend to expand to all-India level for the 2014 general elections. Namematching might not cover all states because it eats tons of resources - lets see. Anyway, this would be desirable:
* Add 2014 Lok Sabha booth level results for more states (to the extent that it is halfway easily accessible)
* Add namematching data from electoral rolls for 2014 across more states (about half of them done already)
@@ -0,0 +1,2 @@
.read upid/upid-a.sql
.read upid/upid-b.sql
Binary file not shown.
@@ -11,7 +11,7 @@
$dbh = DBI->connect("DBI:SQLite:dbname=:memory:", "","", {sqlite_unicode=>1});
$dbh->sqlite_backup_from_file('booths.sqlite');
$dbh->do ("CREATE TABLE uprolls2012 (id INTEGER PRIMARY KEY AUTOINCREMENT, ac_id_09 INTEGER, booth_id_12 INTEGER, electors_12 INTEGER, missing_percent_12 FLOAT, age_avg_12 FLOAT, age_stddev_12 FLOAT, age_muslim_avg_12 FLOAT, age_muslim_stddev_12 FLOAT, women_percent_12 FLOAT, women_muslim_percent_12 FLOAT, muslim_percent_12 FLOAT, buddhist_percent_12 FLOAT, age_buddhist_avg_12 FLOAT, age_buddhist_stddev_12 FLOAT, women_buddhist_percent_12 FLOAT, hindu_percent_12 FLOAT, age_hindu_avg_12 FLOAT, age_hindu_stddev_12 FLOAT, women_hindu_percent_12 FLOAT, jain_percent_12 FLOAT, age_jain_avg_12 FLOAT, age_jain_stddev_12 FLOAT, women_jain_percent_12 FLOAT, parsi_percent_12 FLOAT, age_parsi_avg_12 FLOAT, age_parsi_stddev_12 FLOAT, women_parsi_percent_12 FLOAT, sikh_percent_12 FLOAT, age_sikh_avg_12 FLOAT, age_sikh_stddev_12 FLOAT, women_sikh_percent_12 FLOAT, christian_percent_12 FLOAT, age_christian_avg_12 FLOAT, age_christian_stddev_12 FLOAT, women_christian_percent_12 FLOAT, revision_percent_new_12 FLOAT, revision_percent_deleted_12 FLOAT, revision_percent_modified_12 FLOAT)");
$dbh->do ("INSERT INTO uprolls2012 (ac_id_09, booth_id_12, electors_12, missing_percent_12, age_avg_12, age_stddev_12, age_muslim_avg_12, age_muslim_stddev_12, women_percent_12, women_muslim_percent_12, muslim_percent_12, buddhist_percent_12, age_buddhist_avg_12, age_buddhist_stddev_12, women_buddhist_percent_12, hindu_percent_12, age_hindu_avg_12, age_hindu_stddev_12, women_hindu_percent_12, jain_percent_12, age_jain_avg_12, age_jain_stddev_12, women_jain_percent_12, parsi_percent_12, age_parsi_avg_12, age_parsi_stddev_12, women_parsi_percent_12, sikh_percent_12, age_sikh_avg_12, age_sikh_stddev_12, women_sikh_percent_12, christian_percent_12, age_christian_avg_12, age_christian_stddev_12, women_christian_percent_12) SELECT constituency, booth, voters_total, missing_percent, age_avg, age_stddev, age_muslim_avg, age_muslim_stddev, women_percent, women_muslim_percent, muslim_percent, buddhist_percent, age_buddhist_avg, age_buddhist_stddev, women_buddhist_percent, hindu_percent, age_hindu_avg, age_hindu_stddev, women_hindu_percent, jain_percent, age_jain_avg, age_jain_stddev, women_jain_percent, parsi_percent, age_parsi_avg, age_parsi_stddev, women_parsi_percent, sikh_percent, age_sikh_avg, age_sikh_stddev, women_sikh_percent, christian_percent, age_christian_avg, age_christian_stddev, women_christian_percent, revision12_percent_new, revision12_percent_deleted, revision12_percent_modified FROM booths");
$dbh->do ("INSERT INTO uprolls2012 (ac_id_09, booth_id_12, electors_12, missing_percent_12, age_avg_12, age_stddev_12, age_muslim_avg_12, age_muslim_stddev_12, women_percent_12, women_muslim_percent_12, muslim_percent_12, buddhist_percent_12, age_buddhist_avg_12, age_buddhist_stddev_12, women_buddhist_percent_12, hindu_percent_12, age_hindu_avg_12, age_hindu_stddev_12, women_hindu_percent_12, jain_percent_12, age_jain_avg_12, age_jain_stddev_12, women_jain_percent_12, parsi_percent_12, age_parsi_avg_12, age_parsi_stddev_12, women_parsi_percent_12, sikh_percent_12, age_sikh_avg_12, age_sikh_stddev_12, women_sikh_percent_12, christian_percent_12, age_christian_avg_12, age_christian_stddev_12, women_christian_percent_12, revision_percent_new_12, revision_percent_deleted_12, revision_percent_modified_12) SELECT constituency, booth, voters_total, missing_percent, age_avg, age_stddev, age_muslim_avg, age_muslim_stddev, women_percent, women_muslim_percent, muslim_percent, buddhist_percent, age_buddhist_avg, age_buddhist_stddev, women_buddhist_percent, hindu_percent, age_hindu_avg, age_hindu_stddev, women_hindu_percent, jain_percent, age_jain_avg, age_jain_stddev, women_jain_percent, parsi_percent, age_parsi_avg, age_parsi_stddev, women_parsi_percent, sikh_percent, age_sikh_avg, age_sikh_stddev, women_sikh_percent, christian_percent, age_christian_avg, age_christian_stddev, women_christian_percent, revision12_percent_new, revision12_percent_deleted, revision12_percent_modified FROM booths");
#
# Finally create sqlite dump
Oops, something went wrong.

0 comments on commit 95e52bb

Please sign in to comment.