Permalink
Browse files

Added UP rolls 2017, fixed a number of mistaked in aggregation and ot…

…her stuff
  • Loading branch information...
raphael-susewind committed Apr 24, 2017
1 parent 7ef1f71 commit ba72516292529e01c4ee24ca18266a59e097ec7e
View
@@ -48,6 +48,7 @@ table | description
[uploksabha2009](https://github.com/raphael-susewind/india-religion-politics/tree/master/uploksabha2009) | Booth-level (form 20) results for the 2009 Lok Sabha election from Uttar Pradesh
[upvidhansabha2012](https://github.com/raphael-susewind/india-religion-politics/tree/master/upvidhansabha2012) | Booth-level (form 20) results for the 2012 Vidhan Sabha election in Uttar Pradesh
[uploksabha2014](https://github.com/raphael-susewind/india-religion-politics/tree/master/uploksabha2014) | Booth-level (form 20) results for the 2014 Lok Sabha election from Uttar Pradesh
[upvidhansabha2017](https://github.com/raphael-susewind/india-religion-politics/tree/master/upvidhansabha2017) | Booth-level (form 20) results for the 2017 Vidhan Sabha election in Uttar Pradesh
[upcandidates2007](https://github.com/raphael-susewind/india-religion-politics/tree/master/upcandidates2007) | Candidates and their likely religion for the 2007 Vidhan Sabha election in Uttar Pradesh
[upcandidates2009](https://github.com/raphael-susewind/india-religion-politics/tree/master/upcandidates2009) | Candidates and their likely religion for the 2009 Lok Sabha election from Uttar Pradesh
[upcandidates2012](https://github.com/raphael-susewind/india-religion-politics/tree/master/upcandidates2012) | Candidates and their likely religion for the 2012 Vidhan Sabha election in Uttar Pradesh
@@ -59,6 +60,7 @@ table | description
[uprolls2014](https://github.com/raphael-susewind/india-religion-politics/tree/master/uprolls2014) | Booth-level estimates of religious demography for 2014 across Uttar Pradesh
[uprolls2015](https://github.com/raphael-susewind/india-religion-politics/tree/master/uprolls2015) | Booth-level estimates of religious demography for 2015 across Uttar Pradesh
[uprolls2016](https://github.com/raphael-susewind/india-religion-politics/tree/master/uprolls2016) | Booth-level estimates of religious demography for 2016 across Uttar Pradesh
[uprolls2017](https://github.com/raphael-susewind/india-religion-politics/tree/master/uprolls2017) | Booth-level estimates of religious demography for 2017 across Uttar Pradesh
If you wish to **recreate the whole database**, the easiest way would be to clone this repository in its entirety, and then run the equivalent of `cat combined-a.sql | sqlite3 combined.sqlite` and `cat combined-b.sql | sqlite3 combined.sqlite` on your system. This will automatically create a new combined.sqlite file by running all table.sql files in the correct order. You can then extract your data from one or multiple tables for further processing using standard SQL commands.
View
@@ -2,13 +2,6 @@
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)
## UP special interim release:
Sometime this spring, I hope to put UP data up-to-date as people might find it useful. This means:
* Add UP namematching data for 2017 (currently running on ARC servers)
* Add UP form20 results for vidhan sabha 2017
## Second proper release:
As a next step, I intend to expand to all-India level for the 2014 general elections. This would be desirable:
View
@@ -23,10 +23,13 @@ pragma temp_store_directory = '.';
.read uprolls2014/uprolls2014-b.sql
.read uprolls2015/uprolls2015.sql
.read uprolls2016/uprolls2016.sql
.read uprolls2017/uprolls2017-a.sql
.read uprolls2017/uprolls2017-b.sql
.read upcandidates2007/upcandidates2007.sql
.read upcandidates2009/upcandidates2009.sql
.read upcandidates2012/upcandidates2012.sql
.read upcandidates2014/upcandidates2014.sql
.read upcandidates2017/upcandidates2017.sql
.read upgis/upgis.sql
.read gujloksabha2014/gujloksabha2014-a.sql
.read gujloksabha2014/gujloksabha2014-b.sql
@@ -44562,5 +44562,4 @@ INSERT INTO "gujid" VALUES(182,NULL,NULL,253,154430,'Patragadh Govada 1');
INSERT INTO "gujid" VALUES(182,NULL,NULL,254,154430,'Patragadh Govada 2');
INSERT INTO "gujid" VALUES(182,NULL,NULL,255,154430,'Patragadh Govada 3');
INSERT INTO "gujid" VALUES(182,NULL,NULL,256,154431,'Kankaralipada Govada 4');
CREATE INDEX booth_id_14 ON gujid (booth_id_14);
COMMIT;
@@ -1,3 +1,4 @@
CREATE INDEX ac_booth_14 ON gujid (ac_id_09, booth_id_14);
ALTER TABLE gujid ADD COLUMN pincode_14 INTEGER;
ALTER TABLE gujid ADD COLUMN booth_name_14 CHAR;
ALTER TABLE gujid ADD COLUMN address_14 CHAR;
@@ -16,6 +16,7 @@
open (FILE, ">gujrolls2014-b.sql");
print FILE "CREATE INDEX ac_booth_14 ON gujid (ac_id_09, booth_id_14);\n";
print FILE "ALTER TABLE gujid ADD COLUMN pincode_14 INTEGER;\n";
print FILE "ALTER TABLE gujid ADD COLUMN booth_name_14 CHAR;\n";
print FILE "ALTER TABLE gujid ADD COLUMN address_14 CHAR;\n";
Oops, something went wrong.

0 comments on commit ba72516

Please sign in to comment.