Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Added more candidates. Moved .csv to .tsv

  • Loading branch information...
1 parent 7ab005b commit 6443ab001f1e77a6d47c2dc16885a516e61a3bef @davorg committed
2  bin/dump_cand
@@ -7,7 +7,7 @@ use 5.010;
use lib 'lib';
use TwittElection::Schema;
-my $file = shift || 'db/candidate.csv';
+my $file = shift || 'db/candidate.tsv';
my $sch = TwittElection::Schema->connect(
"dbi:mysql:database=$ENV{TE_DB}", $ENV{TE_USER}, $ENV{TE_PASS},
4 bin/load_cand
@@ -7,7 +7,7 @@ use 5.010;
use lib 'lib';
use TwittElection::Schema;
-my $file = shift || 'db/candidate.csv';
+my $file = shift || 'db/candidate.tsv';
my $sch = TwittElection::Schema->connect(
"dbi:mysql:database=$ENV{TE_DB}", $ENV{TE_USER}, $ENV{TE_PASS},
@@ -25,7 +25,7 @@ $sch->resultset('Candidate')->delete;
while (<$fh>) {
- my ($name, $twitter, $party, $constituency) = split /\|/;
+ my ($name, $twitter, $party, $constituency) = split /\t/;
my $con = $con_rs->find({
name => $constituency,
14 db/candidate.csv
@@ -1,14 +0,0 @@
-Jane Ellison|janeellisonmp|Conservative|Battersea
-Dan Watkins|DanWatkins|Conservative|Tooting
-Nadine Dorries|NadineDorriesMP|Conservative|Mid Bedfordshire
-Will Martindale|WillJMartindale|Labour|Battersea
-Sadiq Khan|SadiqKhan|Labour|Tooting
-Charlynne Pullen|CharlynnePullen|Labour|Mid Bedfordshire
-Douglas Carswell|DouglasCarswell|Conservative|Clacton
-Stephen Kinnock|SKinnock|Labour|Aberavon
-Guto Bebb|GutoBebb|Conservative|Aberconwy
-Frank Doran||Labour|Aberdeen North
-Anne Begg|annebegg|Labour|Aberdeen South
-Pamela Nash|pamela_nash|Labour|Airdrie and Shotts
-Gerald Howarth|geraldhowarth|Conservative|Aldershot
-Richard Shepherd||Conservative|Aldridge-Brownhills
26 db/candidate.tsv
@@ -0,0 +1,26 @@
+Jane Ellison janeellisonmp Conservative Battersea
+Dan Watkins DanWatkins Conservative Tooting
+Nadine Dorries NadineDorriesMP Conservative Mid Bedfordshire
+Will Martindale WillJMartindale Labour Battersea
+Sadiq Khan SadiqKhan Labour Tooting
+Charlynne Pullen CharlynnePullen Labour Mid Bedfordshire
+Douglas Carswell DouglasCarswell Conservative Clacton
+Stephen Kinnock SKinnock Labour Aberavon
+Guto Bebb GutoBebb Conservative Aberconwy
+Frank Doran Labour Aberdeen North
+Anne Begg annebegg Labour Aberdeen South
+Pamela Nash pamela_nash Labour Airdrie and Shotts
+Gerald Howarth geraldhowarth Conservative Aldershot
+Richard Shepherd Conservative Aldridge-Brownhills
+Graham Brady grahambradymp Conservative Altrincham and Sale West
+Mark Tami MarkTamiMP Labour Alyn and Deeside
+Nigel Mills NigelMillsMP Conservative Amber Valley
+Mike Weir mikeweirsnp SNP Angus
+Hywel Williams HywelWilliamsMP Plaid Cymru Arfon
+Alan Reid Liberal Democrat Argyll and Bute
+Nick Herbert nickherbertmp Conservative Arundel and South Downs
+Gloria De Piero GloriaDePieroMP Labour Ashfield
+Damian Green Conservative Ashford
+David Heyes davidheyesmp Labour Ashton-under-Lyne
+David Lidington DLidington Conservative Aylesbury
+Sandra Osborne Labour Ayr, Carrick and Cumnock
2  lib/TwittElection/Schema/Result/
@@ -148,7 +148,7 @@ __PACKAGE__->belongs_to(
sub dump {
my $self = shift;
- my $delim = $_[0] || '|';
+ my $delim = $_[0] || "\t";
return join $delim, $self->name, $self->twitter,
$self->party->name, $self->constituency->name;

0 comments on commit 6443ab0

Please sign in to comment.
Something went wrong with that request. Please try again.