by @tozCSS

This notebook contains some maps and plots regarding the last two general election results in Turkey (held in Jun 7, 2015 and Nov 1, 2015).

I also estimate the vote transition rates (the image on the right) using a recursive method developed by Andreadis (An R script and the instructions are also made available). To get the exact transition values you can mouse-over the links in the interactive Sankey diagram at the bottom of this notebook.

Finally, I respond to the fraud claims due to the high increase in the number of registered voters (and valid votes) in 5 months by looking at the correlation between the changes in party shares and the valid votes.

Data Source

Both Jun 7 and Nov 1 election results are scraped from the Nov 1, 2015 election results page of the Yenisafak daily. Scraped datasets are available in two files as Nov 1,2015 and Jun 7,2015 in csv format.

[UPDATE] : Town level data added. Nov 1,2015 and Jun 7,2015

Election Results Maps

I created maps for the last two general election results of Turkey for four parties with different legends. If you click on any of the cities in those maps (below), vote shares of the four parties are shown for that particular election.

The colors in these maps represent the party vote share in those cities. Since one of the more interesting questions regarding the Nov 1, 2015 election is in which cities AKP increased its votes, I also created its Jun 7, 2015 election density map to facilitate us seeing the change.

Vote Share Scatter Plots of Each Party per City for the Last Two Elections

For all of the parties, their vote shares in the last two elections is compared in a scatter plot where the dots represent the cities and their colors represent the geographic region they belong to. One interesting pattern for example is that unlike other parties, CHP increased its vote share in some cities and lost some in others. On the other hand we see that AKP increased its vote share in every city, whereas MHP and HDP lost their shares almost in every single city.

In [1]:
import json
import pandas as pd
from unidecode import unidecode
import folium
from IPython.display import HTML
from os import chdir
%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use('ggplot')

import plotly.plotly as py
import cufflinks as cf
import plotly.graph_objs as go
cf.set_config_file(offline=False, world_readable=True, theme='ggplot')
In [2]:
#read YSK data
df = pd.read_csv('data/ysk.csv')
df = df.rename(columns={'AK PARTİ':'AKP','İL ADI':'il','İLÇE ADI':'ilce','OY KULLANAN SEÇMEN SAYISI':'kullanan','SEÇMEN SAYISI':'kayitli','GEÇERLİ OY TOPLAMI':'gecerli','GEÇERSİZ OY TOPLAMI':'gecersiz','MAHALLE/KÖY':'mahalle','SANDIK NO':'sandik','İTİRAZSIZ GEÇERLİ OY SAYISI':'itirazsiz','İTİRAZLI GEÇERLİ OY SAYISI':'itirazli'})
df = df.fillna(0)
In [3]:
parties = ['AKP','CHP','MHP','HDP','OTHERS']
vals = ['il','ilce','mahalle','sandik','kayitli','kullanan','itirazsiz','itirazli','gecerli','gecersiz']
others = set(df.columns) - set(parties+vals)
df['OTHERS'] = df[list(others)].sum(axis=1)
df = df[parties+vals]
rates = [p+'R' for p in parties]
df[rates] = df[parties].div(df.gecerli,axis='index')
In [4]:
#df.pivot_table(index='il')[rates].plot(kind='barh',stacked=True,figsize=(10,25),xlim=(0,1),color=['orange','r','g','purple','grey'])
il = df.pivot_table(index='il')[rates]
il.iplot(kind='bar',barmode='stack', filename='ysk/il',colors=['orange','red','green','purple','grey'],legend=False)
Out[4]:
In [2]:
#read the data
nov = pd.read_csv('data/nov.csv')
jun = pd.read_csv('data/jun.csv')
nt = pd.read_csv('data/nov_towns.csv')
jt = pd.read_csv('data/jun_towns.csv')
nt = nt[nt.AKP > 0] #this is to filter some towns
jt = jt[jt.AKP > 0] #with all zeros in Yenisafak site
# see for example row of ondokuzmayis here: http://www.yenisafak.com/secim-2015-kasim/samsun-ili-secim-sonuclari
In [3]:
def create_map(is_nov,threshold_scale,fill_color,party):
    chdir('maps/')
    mapname = party+'_share_nov' if is_nov else party+'_share_jun'
    electiondate = 'Nov 1, 2015' if is_nov else 'Jun 7, 2015'
    tr_geo = 'tr_nov.geojson' if is_nov else 'tr_jun.geojson'
    df = nov if is_nov else jun
    tr = folium.Map(location=[39.5, 35], zoom_start=6, tiles='Mapbox Bright')
    tr.geo_json(geo_path=tr_geo, data=df, data_out=mapname+'.json',
                columns=['city', party],
                threshold_scale=threshold_scale,
                key_on='feature.properties.name',
                fill_color=fill_color, fill_opacity=0.7, line_opacity=0.2,
                legend_name=party+' Vote Shares (%), '+electiondate+' Turkish General Elections')
    tr.create_map(path=mapname+'.html')
    chdir('..')
    return HTML('<iframe src=maps/'+mapname+'.html style="width: 100%; height: 500px; border: none"></iframe>')
In [4]:
# AKP Vote Shares (%), Nov 1, 2015 Turkish General Elections
create_map(True,[15,25,35,45,55,65],'YlOrRd','AKP')
Out[4]:
In [5]:
# Vote Shares (%), Jun 7, 2015 Turkish General Elections
create_map(False,[15,25,35,45,55,65],'YlOrRd','AKP')
Out[5]:
In [6]:
# CHP Vote Shares (%), Nov 1, 2015 Turkish General Elections
create_map(True,[10,15,20,25,30,35],'PuRd','CHP')
Out[6]:
In [7]:
# CHP Vote Shares (%), Jun 7, 2015 Turkish General Elections
create_map(False,[10,15,20,25,30,35],'PuRd','CHP')
Out[7]:
In [8]:
# MHP Vote Shares (%), Nov 1, 2015 Turkish General Elections
create_map(True,[5,10,15,20,25,30],'GnBu','MHP')
Out[8]:
In [9]:
# MHP Vote Shares (%), Jun 7, 2015 Turkish General Elections
create_map(False,[5,10,15,20,25,30],'GnBu','MHP')
Out[9]:
In [10]:
# HDP Vote Shares (%), Nov 1, 2015 Turkish General Elections
create_map(True,[5,10,15,20,25,30],'BuPu','HDP')
Out[10]:
In [11]:
# HDP Vote Shares (%), Jun 7, 2015 Turkish General Elections
create_map(False,[5,10,15,20,25,30],'BuPu','HDP')
Out[11]:
In [ ]:
#Scatter plot
import plotly.plotly as py
from plotly.graph_objs import *
from palettable.colorbrewer.qualitative import Dark2_7 as colmap

il = pd.read_csv('data/city_meta.csv',usecols=['il','bolge'])
colors = dict(zip(il['bolge'].unique().tolist(),colmap.hex_colors))
parties = ['AKP', 'CHP','MHP','HDP']
jun['bolge'] = il['bolge']
nov['bolge'] = il['bolge']

for p in parties:
    lim = max(nov[p].max(),jun[p].max())
    #each region is a trace, otherwise they do not show up in the legend
    traces = [Scatter(x=jun[jun.bolge==b][p],y=nov[nov.bolge==b][p],
                      mode='markers', text=il[il.bolge==b]['il'], name=b,
                      marker=Marker(color=v)) for b,v in colors.items()]
    traces.append(Scatter(x=[0,lim],y=[0,lim],mode='lines', name='y=x',
                        line=Line(color='grey',dash='dash')))
    data = Data(traces)
    layout = Layout(title=p+' Nov 1, 2015 vs Jun 7, 2015 Vote Shares',
                    autosize=True,
                    xaxis=XAxis(title=p+" Jun 7, 2015 Vote Shares",zeroline=False),
                    yaxis=YAxis(title=p+" Nov 1, 2015 Vote Shares",zeroline=False),
                    legend=Legend(x=.01,y=1))
    fig = Figure(data=data,layout=layout)
    url = py.plot(fig,filename= p+' Nov 1, 2015 vs Jun 7, 2015 Vote Shares')
In [12]:
HTML("""<div><a href="https://plot.ly/~toz/828/" target="_blank" title="AKP Nov 1, 2015 vs Jun 7, 2015 Vote Shares" style="display: block; text-align: center;"><img src="https://plot.ly/~toz/828.png" alt="AKP Nov 1, 2015 vs Jun 7, 2015 Vote Shares" style="max-width: 100%;width: 600px;"  width="600" onerror="this.onerror=null;this.src='https://plot.ly/404.png';" /></a><script data-plotly="toz:828"  src="https://plot.ly/embed.js" async></script></div>""")
Out[12]:
AKP Nov 1, 2015 vs Jun 7, 2015 Vote Shares
In [13]:
HTML("""<div><a href="https://plot.ly/~toz/830/" target="_blank" title="CHP Nov 1, 2015 vs Jun 7, 2015 Vote Shares" style="display: block; text-align: center;"><img src="https://plot.ly/~toz/830.png" alt="CHP Nov 1, 2015 vs Jun 7, 2015 Vote Shares" style="max-width: 100%;width: 600px;"  width="600" onerror="this.onerror=null;this.src='https://plot.ly/404.png';" /></a><script data-plotly="toz:830"  src="https://plot.ly/embed.js" async></script></div>""")
Out[13]:
CHP Nov 1, 2015 vs Jun 7, 2015 Vote Shares
In [14]:
HTML("""<div><a href="https://plot.ly/~toz/832/" target="_blank" title="MHP Nov 1, 2015 vs Jun 7, 2015 Vote Shares" style="display: block; text-align: center;"><img src="https://plot.ly/~toz/832.png" alt="MHP Nov 1, 2015 vs Jun 7, 2015 Vote Shares" style="max-width: 100%;width: 600px;"  width="600" onerror="this.onerror=null;this.src='https://plot.ly/404.png';" /></a><script data-plotly="toz:832"  src="https://plot.ly/embed.js" async></script></div>""")
Out[14]:
MHP Nov 1, 2015 vs Jun 7, 2015 Vote Shares
In [15]:
HTML("""<div><a href="https://plot.ly/~toz/834/" target="_blank" title="HDP Nov 1, 2015 vs Jun 7, 2015 Vote Shares" style="display: block; text-align: center;"><img src="https://plot.ly/~toz/834.png" alt="HDP Nov 1, 2015 vs Jun 7, 2015 Vote Shares" style="max-width: 100%;width: 600px;"  width="600" onerror="this.onerror=null;this.src='https://plot.ly/404.png';" /></a><script data-plotly="toz:834"  src="https://plot.ly/embed.js" async></script></div>""")
Out[15]:
HDP Nov 1, 2015 vs Jun 7, 2015 Vote Shares
In [16]:
HTML("""<iframe width="50%" height="450" src="//jsfiddle.net/v5rw0y75/39/embedded/result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>""")
Out[16]:
In [17]:
print('Total increase in the registered voters:',nov.registered.sum() - jun.registered.sum())
print('Total increase in the valid votes:',nov.valid.sum() - jun.valid.sum())
Total increase in the registered voters: 1555664.0
Total increase in the valid votes: 1769286.0

Some claimed that it is not normal to have such high number of registered voters (or valid votes) increase in five months. It smells fraud to many. However, I couldn't find any support to these claims in the city level data: there is no significant positive or negative correlation between the changes in the valid votes and changes in any of the party shares. [See the output of the following cell]

In [18]:
#check the correlation of change in registered voters with the change in the party shares
parties = ['AKP', 'CHP','MHP','HDP','others']
change = nov[parties] - jun[parties]
change['registered'] = (nov['registered'] - jun['registered'])/nov['registered']
change.index = nov['city']
change.corr() #change in registered voters vs change in party shares
Out[18]:
AKP CHP MHP HDP others registered
AKP 1.000000 -0.250031 -0.345152 -0.348651 -0.170495 -0.120211
CHP -0.250031 1.000000 0.004348 -0.253937 -0.030682 0.002432
MHP -0.345152 0.004348 1.000000 -0.465819 -0.334473 0.215103
HDP -0.348651 -0.253937 -0.465819 1.000000 0.061552 0.049348
others -0.170495 -0.030682 -0.334473 0.061552 1.000000 -0.156149
registered -0.120211 0.002432 0.215103 0.049348 -0.156149 1.000000
In [19]:
nt.merge(jt,on=['city','town'],suffixes=('_n','_j')) #nov and jun combined
Out[19]:
city town AKP_n CHP_n MHP_n HDP_n others_n AKP_j CHP_j MHP_j HDP_j others_j
0 Adana ALADAĞ 57.02 11.91 27.67 0.35 1.02 50.09 11.50 33.47 0.51 1.75
1 Adana CEYHAN 33.10 27.70 21.82 15.43 0.48 25.84 25.84 27.22 18.27 1.19
2 Adana ÇUKUROVA 28.06 43.19 21.55 5.35 0.57 23.15 40.80 25.79 7.29 1.47
3 Adana FEKE 54.69 15.14 25.56 0.27 1.00 47.01 15.32 31.49 0.67 2.09
4 Adana İMAMOĞLU 53.09 18.22 24.42 1.68 1.00 45.92 22.17 25.52 2.37 2.20
5 Adana KARAİSALI 59.73 9.45 27.77 0.41 0.75 55.30 9.36 30.95 0.62 1.63
6 Adana KARATAŞ 27.17 40.15 26.17 4.94 0.34 23.22 41.66 26.37 6.69 0.78
7 Adana KOZAN 50.13 18.25 28.12 0.61 0.99 42.90 20.71 30.72 1.29 2.37
8 Adana POZANTI 52.71 20.43 22.92 1.00 0.98 45.38 21.22 27.08 1.81 2.42
9 Adana SAİMBEYLİ 54.62 11.06 30.83 0.35 0.79 48.36 11.86 34.82 0.55 1.40
10 Adana SARIÇAM 44.69 16.19 32.97 3.87 0.67 36.64 16.35 38.78 4.98 1.78
11 Adana SEYHAN 32.24 32.95 14.57 18.32 0.63 25.88 31.42 18.06 21.43 1.49
12 Adana TUFANBEYLİ 47.31 19.73 28.93 0.61 0.89 35.36 18.99 38.95 1.01 2.61
13 Adana YUMURTALIK 37.26 26.59 31.62 1.53 0.80 32.96 25.98 35.66 2.50 0.99
14 Adana YÜREĞİR 42.75 24.65 15.48 15.10 0.60 33.78 24.15 18.58 19.63 1.37
15 Adıyaman BESNİ 67.43 16.54 4.20 8.83 1.03 52.42 24.03 4.67 15.17 1.42
16 Adıyaman ÇELİKHAN 65.63 9.44 1.49 20.74 1.19 57.56 9.16 2.00 27.14 2.74
17 Adıyaman GERGER 85.12 3.36 0.96 7.67 1.02 70.91 5.00 1.38 17.44 2.70
18 Adıyaman GÖLBAŞI 58.12 25.11 8.03 5.99 0.63 48.50 27.82 10.95 9.14 1.29
19 Adıyaman KAHTA 82.78 2.24 0.64 12.52 0.66 68.59 1.71 0.94 25.76 1.45
20 Adıyaman Merkez 64.19 11.97 2.91 19.00 0.64 54.49 9.66 4.51 27.80 2.28
21 Adıyaman SAMSAT 86.19 2.85 2.32 5.81 1.97 71.21 2.71 2.80 16.32 5.75
22 Adıyaman SİNCİK 95.94 0.85 0.60 1.55 0.42 90.71 1.00 1.07 5.12 1.04
23 Adıyaman TUT 66.21 20.46 5.51 4.75 0.60 56.24 24.51 8.06 6.57 1.80
24 Afyonkarahisar BAŞMAKÇI 48.93 29.83 18.19 0.32 0.70 41.26 31.42 22.56 0.65 0.95
25 Afyonkarahisar BAYAT 62.03 17.62 14.99 0.65 1.89 51.46 18.63 22.11 2.05 1.90
26 Afyonkarahisar BOLVADİN 71.59 10.13 15.71 0.43 0.67 62.56 10.56 22.44 0.98 1.80
27 Afyonkarahisar ÇAY 54.12 23.24 19.36 0.54 0.66 45.45 22.73 26.83 0.94 1.60
28 Afyonkarahisar ÇOBANLAR 64.61 11.89 21.55 0.18 0.55 53.05 14.38 29.11 0.53 1.50
29 Afyonkarahisar DAZKIRI 51.72 24.24 20.77 0.36 0.69 43.37 27.75 25.06 0.53 1.40
... ... ... ... ... ... ... ... ... ... ... ... ...
940 Van SARAY 11.84 0.47 0.63 85.65 0.55 4.35 0.23 0.62 94.26 0.14
941 Van TUŞBA 36.22 1.42 0.97 59.62 0.50 22.72 1.26 2.01 71.37 0.73
942 Yalova ALTINOVA 53.62 29.99 8.05 5.51 0.77 44.97 29.98 13.90 7.44 2.02
943 Yalova ARMUTLU 53.54 23.39 14.60 5.08 1.41 46.11 22.20 21.06 5.62 2.95
944 Yalova ÇINARCIK 42.82 38.55 10.36 5.64 0.58 34.51 36.13 18.54 7.37 1.45
945 Yalova ÇİFTLİKKÖY 49.60 32.26 10.98 4.22 0.96 40.99 30.19 19.86 5.12 2.05
946 Yalova Merkez 48.48 31.29 9.52 7.59 0.82 38.26 27.96 20.36 9.96 1.88
947 Yalova TERMAL 60.65 23.16 10.15 1.24 2.32 49.71 20.44 22.42 1.98 3.63
948 Yozgat AKDAĞMADENİ 62.03 4.04 7.82 0.17 21.85 61.02 7.22 26.33 0.49 3.46
949 Yozgat AYDINCIK 70.69 8.65 8.13 0.44 8.99 64.01 10.10 21.56 0.99 1.78
950 Yozgat BOĞAZLIYAN 51.53 20.85 14.81 0.64 9.36 43.40 22.85 29.47 1.01 1.72
951 Yozgat ÇANDIR 50.55 20.47 23.20 0.18 3.09 44.20 17.98 34.37 0.59 1.21
952 Yozgat ÇAYIRALAN 55.80 15.93 12.62 0.27 11.31 50.85 17.63 27.52 0.47 1.60
953 Yozgat ÇEKEREK 75.19 8.45 6.37 0.40 6.18 68.01 9.15 17.58 0.63 3.05
954 Yozgat KADIŞEHRİ 77.02 7.13 5.33 0.09 7.56 72.71 8.46 14.36 0.32 2.58
955 Yozgat Merkez 63.66 6.23 15.14 0.39 12.02 53.91 6.42 35.33 0.90 2.44
956 Yozgat SARAYKENT 75.74 0.69 7.29 0.10 12.86 72.97 1.51 22.74 0.19 1.32
957 Yozgat SARIKAYA 69.72 2.91 13.47 0.31 10.35 64.79 4.95 25.75 0.99 1.93
958 Yozgat SORGUN 74.80 3.93 9.47 0.33 8.42 68.69 5.90 20.31 0.62 3.43
959 Yozgat ŞEFAATLİ 50.32 6.34 15.83 0.27 23.80 46.75 10.72 39.58 0.50 1.23
960 Yozgat YENİFAKILI 48.66 21.50 19.42 0.14 7.41 42.28 23.93 30.23 0.76 1.28
961 Yozgat YERKÖY 57.81 5.94 18.18 2.00 12.70 50.84 8.85 33.07 3.21 2.63
962 Zonguldak ALAPLI 59.90 27.84 8.15 0.61 1.23 48.61 29.17 16.92 0.93 2.53
963 Zonguldak ÇAYCUMA 47.46 39.51 8.10 0.54 1.56 35.19 44.81 13.35 0.75 3.28
964 Zonguldak DEVREK 56.94 29.22 8.22 0.51 1.85 45.62 31.91 14.02 0.76 4.46
965 Zonguldak EREĞLİ 51.00 35.26 9.63 0.91 0.83 39.34 37.45 17.80 1.38 2.03
966 Zonguldak GÖKÇEBEY 48.95 38.57 6.95 0.43 1.66 36.31 43.54 12.42 0.76 3.46
967 Zonguldak KİLİMLİ 41.62 42.28 11.74 0.38 2.24 31.33 44.74 16.81 0.72 4.77
968 Zonguldak KOZLU 52.17 31.60 10.83 0.92 1.88 39.39 34.78 17.81 1.39 4.82
969 Zonguldak Merkez 42.39 41.78 10.93 1.11 1.70 32.48 42.65 17.93 1.68 3.57

970 rows × 12 columns

In [20]:
#let's look at the towns who changed their party preference in favor of AKP the most
df = nt[parties]-jt[parties]
df.index = nt.town + ', ' + nt.city
df = df.sort('AKP',ascending=False)
df.ix[:25]
Out[20]:
AKP CHP MHP HDP others
KÖPRÜKÖY, Erzurum 34.98 0.04 -6.89 -26.60 -0.66
AKÇAKALE, Şanlıurfa 30.52 -2.87 -19.40 -3.14 -0.45
HARRAN, Şanlıurfa 28.53 -0.98 -24.85 -1.19 -0.48
ELEŞKİRT, Ağrı 27.88 -0.08 -1.10 -24.54 -1.32
SİVEREK, Şanlıurfa 24.10 -5.66 1.18 -7.66 -0.28
HİLVAN, Şanlıurfa 22.28 -7.43 2.64 -4.70 -0.69
Merkez, Iğdır 21.20 -1.68 -16.85 -2.86 -0.03
HAMUR, Ağrı 20.83 0.99 -0.15 -19.98 -1.31
PASİNLER, Erzurum 19.77 -0.02 -12.80 -4.79 -1.65
ÇERMİK, Diyarbakır 19.62 0.81 -0.41 -13.52 -4.93
HORASAN, Erzurum 19.42 -0.43 -6.59 -10.55 -0.58
SOLHAN, Bingöl 18.95 -0.20 -0.49 -11.28 -4.68
ADAKLI, Bingöl 18.91 0.93 0.28 -16.73 -0.34
KARAKOYUNLU, Iğdır 18.83 -2.69 -9.84 -6.93 0.46
YEŞİLLİ, Mardin 18.53 -2.77 -0.22 -6.78 -0.29
PALANDÖKEN, Erzurum 18.31 0.23 -12.64 -4.24 -1.84
ARTUKLU, Mardin 18.23 0.22 -0.50 -8.52 -0.70
KARLIOVA, Bingöl 18.05 0.25 -0.51 -10.52 -5.45
GENÇ, Bingöl 18.03 -0.22 -0.96 -11.13 -3.46
KAZIMKARABEKİR, Karaman 17.68 2.94 -19.75 -0.45 -0.34
PALU, Elazığ 17.64 -5.78 -1.24 -7.32 -3.01
ARICAK, Elazığ 17.62 -1.40 -1.13 -15.43 -0.24
MUTKİ, Bitlis 17.52 3.51 -1.72 -16.73 -0.67
TUZLUCA, Iğdır 17.52 -1.84 -8.80 -7.48 0.41
Merkez, Kilis 17.34 5.06 -18.97 -2.06 -0.71
In [21]:
ax = df.ix[:25].plot(kind='bar',figsize=(17,5),title='Towns of New AKP Converts (Top 25)')
ax.set_ylabel("Change in vote shares (%)");
In [22]:
df.sort('CHP',ascending=False).ix[:25]
Out[22]:
AKP CHP MHP HDP others
SAMANDAĞ, Hatay 0.33 13.49 0.19 6.88 -0.63
HANAK, Ardahan 2.26 12.45 3.94 -4.25 -10.58
PEHLİVANKÖY, Kırklareli 0.11 11.83 -11.08 -0.19 0.06
PÜLÜMÜR, Tunceli -0.42 10.20 -1.08 -7.82 -0.38
PERTEK, Tunceli 1.83 9.22 -2.98 -7.97 -0.25
SARAY, Tekirdağ 6.03 8.93 -13.57 -0.84 -0.54
NAZIMİYE, Tunceli -0.74 8.87 -0.43 -7.11 0.02
Merkez, Tunceli -1.09 8.86 -4.22 -3.21 -0.38
BABAESKİ, Kırklareli 1.04 8.60 -8.69 -0.31 -0.03
Merkez, Ardahan 7.75 8.32 1.76 -7.15 -9.12
NURHAK, Kahramanmaraş 6.36 8.18 -3.75 -7.11 -2.63
Merkez, Kırklareli 7.77 7.94 -14.51 -0.58 -0.40
ŞAVŞAT, Artvin 3.62 7.89 -9.99 -0.53 -0.77
OVACIK, Tunceli -0.63 7.64 -1.68 -4.51 -0.30
SUSUZ, Kars 3.50 7.11 0.50 -9.82 -0.30
YEDİSU, Bingöl 7.93 7.06 -0.65 -14.40 0.09
SELİM, Kars 9.47 6.98 -3.52 -10.87 -0.44
PAZARYERİ, Bilecik 10.38 6.55 -15.51 -1.33 -0.53
HOPA, Artvin 4.33 6.48 -9.13 -1.61 -0.61
Merkez, Bilecik 9.54 5.94 -13.96 -0.74 -0.95
Merkez, Artvin 5.65 5.72 -9.93 -0.67 -0.75
DATÇA, Muğla -0.23 5.67 -2.31 -1.26 -1.26
ÇILDIR, Ardahan 11.02 5.23 2.32 -1.88 -13.84
HOZAT, Tunceli 0.27 5.16 -1.80 -2.95 -0.15
Merkez, Kilis 17.34 5.06 -18.97 -2.06 -0.71
In [23]:
df.sort('MHP',ascending=False).ix[:25]
Out[23]:
AKP CHP MHP HDP others
HANAK, Ardahan 2.26 12.45 3.94 -4.25 -10.58
TAŞOVA, Amasya 2.54 -4.18 3.04 -0.35 -0.58
HİLVAN, Şanlıurfa 22.28 -7.43 2.64 -4.70 -0.69
ÇILDIR, Ardahan 11.02 5.23 2.32 -1.88 -13.84
HEKİMHAN, Malatya 3.40 -4.00 1.95 -0.76 -0.73
Merkez, Ardahan 7.75 8.32 1.76 -7.15 -9.12
GÜLNAR, Mersin 7.26 -8.27 1.29 -0.33 -0.61
SİVEREK, Şanlıurfa 24.10 -5.66 1.18 -7.66 -0.28
YENİCE, Karabük 10.91 -10.06 1.15 -0.15 -1.43
SÖKE, Aydın 4.31 -1.46 0.61 -2.84 -0.43
SARAYKÖY, Denizli 1.12 -0.55 0.58 -1.32 -0.20
SUSUZ, Kars 3.50 7.11 0.50 -9.82 -0.30
YENİPAZAR, Aydın 1.70 -1.34 0.50 -0.32 -0.42
KIRIKHAN, Hatay 8.71 -5.94 0.48 -1.57 -1.35
BAYKAN, Siirt 12.25 0.79 0.39 -13.00 -0.38
ADAKLI, Bingöl 18.91 0.93 0.28 -16.73 -0.34
DAMAL, Ardahan 2.86 2.89 0.21 -1.69 -3.32
SAMANDAĞ, Hatay 0.33 13.49 0.19 6.88 -0.63
SARAY, Van 7.49 0.24 0.01 -8.61 0.41
ERGANİ, Diyarbakır 9.75 -0.02 -0.03 -6.85 -2.45
Merkez, Kars 6.38 3.64 -0.05 -8.72 -0.47
HASKÖY, Muş 10.85 1.06 -0.06 -11.42 -0.28
BAŞKALE, Van 1.63 0.22 -0.07 -1.72 -0.07
KORKUT, Muş 9.62 0.33 -0.08 -10.29 -0.01
KOCAKÖY, Diyarbakır 1.94 0.32 -0.12 -2.09 -0.05
In [24]:
df.sort('HDP',ascending=False).ix[:25]
Out[24]:
AKP CHP MHP HDP others
SAMANDAĞ, Hatay 0.33 13.49 0.19 6.88 -0.63
DEFNE, Hatay 0.29 0.83 -0.37 3.57 -0.06
GÜÇLÜKONAK, Şırnak 0.44 -0.43 -2.51 2.54 -0.18
BEYTÜŞŞEBAP, Şırnak 0.07 0.76 -1.82 1.43 0.00
CİZRE, Şırnak 0.63 0.03 -0.66 1.27 -0.87
ULUDERE, Şırnak 1.23 0.20 -2.27 1.06 -0.19
ARSUZ, Hatay 2.50 -0.40 -0.46 0.34 -0.35
YAYLADAĞI, Hatay 5.60 -2.02 -2.10 0.25 -1.00
ÇUKURCA, Hakkari 1.83 -0.35 -1.56 0.18 -0.22
BOĞAZKALE, Çorum 7.70 -0.32 -6.85 0.18 -1.23
ANTAKYA, Hatay 4.91 0.74 -3.40 0.12 -1.24
KANGAL, Sivas 11.79 -0.56 -9.30 0.12 -2.26
KOFÇAZ, Kırklareli 4.51 3.14 -6.15 0.10 -0.50
DEMİRÖZÜ, Bayburt 14.30 -1.55 -10.65 0.09 -2.07
DEREBUCAK, Konya 6.00 1.22 -7.46 0.08 -0.62
PAZARYOLU, Erzurum 4.92 -0.21 -2.54 0.08 -2.64
KORGUN, Çankırı 10.28 -0.64 -6.85 0.07 -2.32
SARAYDÜZÜ, Sinop 7.82 1.51 -7.47 0.06 -1.08
ORTAKÖY, Çorum 8.24 -1.24 -6.27 0.05 -1.27
YAPRAKLI, Çankırı 5.25 -0.26 -4.17 0.04 -0.54
FELAHİYE, Kayseri 7.99 0.06 -8.11 0.02 -1.00
UĞURLUDAĞ, Çorum 9.14 -1.32 -6.63 0.01 -1.15
YENİŞARBADEMLİ, Isparta 2.92 2.53 -5.89 0.01 -0.51
AĞLI, Kastamonu 13.18 -1.26 -10.40 0.00 -0.52
AYDINTEPE, Bayburt 9.35 -0.18 -7.92 -0.02 -1.38
In [25]:
df.sort('AKP').ix[:25] #bottom 25 towns among 970 in turning to AKP
Out[25]:
AKP CHP MHP HDP others
DİCLE, Diyarbakır -5.57 0.24 -0.61 -10.56 16.75
Merkez, Tunceli -1.09 8.86 -4.22 -3.21 -0.38
NAZIMİYE, Tunceli -0.74 8.87 -0.43 -7.11 0.02
OVACIK, Tunceli -0.63 7.64 -1.68 -4.51 -0.30
PÜLÜMÜR, Tunceli -0.42 10.20 -1.08 -7.82 -0.38
DATÇA, Muğla -0.23 5.67 -2.31 -1.26 -1.26
MAZGİRT, Tunceli -0.03 2.63 -0.75 -2.18 0.35
BEYTÜŞŞEBAP, Şırnak 0.07 0.76 -1.82 1.43 0.00
PEHLİVANKÖY, Kırklareli 0.11 11.83 -11.08 -0.19 0.06
HOZAT, Tunceli 0.27 5.16 -1.80 -2.95 -0.15
DEFNE, Hatay 0.29 0.83 -0.37 3.57 -0.06
SAMANDAĞ, Hatay 0.33 13.49 0.19 6.88 -0.63
GÜÇLÜKONAK, Şırnak 0.44 -0.43 -2.51 2.54 -0.18
LİCE, Diyarbakır 0.60 -0.01 -0.28 -0.19 -0.04
CİZRE, Şırnak 0.63 0.03 -0.66 1.27 -0.87
YÜKSEKOVA, Hakkari 0.85 0.01 -0.70 -0.35 0.03
AKDAĞMADENİ, Yozgat 1.01 -3.18 -18.51 -0.32 18.39
BABAESKİ, Kırklareli 1.04 8.60 -8.69 -0.31 -0.03
SARAYKÖY, Denizli 1.12 -0.55 0.58 -1.32 -0.20
VARTO, Muş 1.16 1.34 -0.24 -2.51 0.07
ENEZ, Edirne 1.18 1.57 -2.57 -0.19 -0.44
ULUDERE, Şırnak 1.23 0.20 -2.27 1.06 -0.19
GÜNEY, Denizli 1.26 -0.42 -1.43 -0.29 -0.02
BAŞKALE, Van 1.63 0.22 -0.07 -1.72 -0.07
YENİPAZAR, Aydın 1.70 -1.34 0.50 -0.32 -0.42