block by michalskop 9866725

SK: Presidential elections 2014 - 2nd round - "Volebné obvody"

Full Screen

index.html

<!DOCTYPE html>
<html>
  <head>
    <title>Slovak presidential election 2014 - 2nd round</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
	<script src="//code.jquery.com/jquery-1.8.2.min.js"></script>
	
	
	<script>
	  // see //leafletjs.com/reference.html
	  L_PREFER_CANVAS = true;
	</script>

	<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">
    <link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
	 <!--[if lte IE 8]>
		 <link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
	 <![endif]-->
    <script src="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>

    <style type="text/css">

		html, body, #map {
		  width: 100%;
		  height: 100%;
		  margin: 0;
		  padding: 0;
		}
		.leaflet-tile-pane {
		  opacity: .3
		}
		.leaflet-container {
          background-color: #fff;
        }

    </style>
  </head>
  <body>
  
    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <a class="navbar-brand" href="#">Slovak presidential election 2014 - 2nd round - "Volebné obvody"</a>
        </div>
      </div>
    </div>
    
    <div style="position:fixed;top:50px;z-index:1000;">
      <div class="alert alert-info" >The <strong>size</strong> of bubbles represents number of voters, the <strong>color</strong> represents the winner and <strong>opacity</strong> margin of victory. <strong><span style="color:#00f">Kiska</span></strong> vs. <strong><span style="color:#f00">Fico</span></strong></div>
    </div>

    <div id="map" style="margin-top:40px;"></div>
    <script type="text/javascript">


		// Create the map
		var map = L.map('map',{zoomControl: false}).setView([48.695493,19.467773], 8);
		map.addControl( L.control.zoom({position: 'topright'}) );
		
		// add an OpenStreetMap tile layer
		// also see //wiki.openstreetmap.org/wiki/Tiles
		//L.tileLayer('//{s}.tile.osm.org/{z}/{x}/{y}.png', {
		L.tileLayer('//{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png', {
			attribution: '&copy; <a href="//osm.org/copyright">OpenStreetMap</a> contributors'
		}).addTo(map);
		
		//add circles
		$.getJSON( "sk_president_2014_2_fico_kiska_obvody.json", function (data) {
		    $.each(data.votes, function (index, value) {
		        
		        description = "<strong>" + value.town + "</strong><br>";
		        
		        tuples = [];
		        for (var key in value.votes) {
		          tuples.push([key,parseInt(value.votes[key])]);
		        }
		        
		        tuples.sort(function(a, b) {
                    a = a[1];
                    b = b[1];
                    return a < b ? 1 : (a > b ? -1 : 0);
                });
                for (i = 0; i <= 1; i++) {
                  tmp = Math.round(parseInt(tuples[i][1]) / parseInt(value.population) * 100);
                  description += data.people[tuples[i][0]] + ": " +  tmp + "% (" + tuples[i][1].toLocaleString()  +")<br>";
                }
		    
		    
				circle = L.circle([value.lat, value.lng], Math.sqrt(parseInt(value.population)*2000), {
					color: data.colors[value.winner_class],
					fillColor: data.colors[value.winner_class],
					fillOpacity: 
					  2.86*(Math.max(parseInt(value.votes[0]),parseInt(value.votes[1])) / value.population - 0.5),
					weight: 2,
				}).addTo(map);
				

				circle.bindPopup(description);
		  });
		});

	</script>
  </body>
</html>

data2json2.py

# -*- coding: utf-8 -*-

# Fico, Kiska
import csv
import json
import unicodedata

i = 0
people = []
votes = []
winners = {}
double = [0,1]
with open('obvody3.1.csv','r') as f:
  csvreader = csv.reader(f,delimiter=",")
  for row in csvreader:
    if i == 0:
      for j in double:
        people.append(row[j+6])
        winners[row[j+6]] = 0
    else:
      r = {}
      r['id'] = row[0]
      r['town'] = row[3]
      r['lat'] = row[4]
      r['lng'] = row[5]
      r['votes'] = []
      maxi = 0
      sumi = 0
      for j in double:
        r['votes'].append(row[j+6])
        sumi = sumi + int(row[j+6])
        if (int(row[j+6])) > maxi:
          if (j == double[0]):
            winner = people[0]
          else:
            winner = people[1]
        maxi = int(row[j+6])
      r['winner'] = winner
      r['winner_class'] = unicodedata.normalize('NFKD', winner.decode('utf8')).encode('ASCII', 'ignore').lower()
      r['population'] = sumi
      winners[winner] = winners[winner] + 1  
      votes.append(r)
#      print winners

#      print people
#      print r
#      raise(Exception,'dipy')  

    i = i + 1
#Bárdos	Behýl	Čarnogurský	Fico	Fischer	Hrušovský	Jurišta	Kiska	Kňažko	Martinčko	Melník	Mezenská	Procházka	Šimko
colors = {'fico':'#f00','kiska':'#00f'}
print winners #F39C2D
data = {'people':people,'votes':votes,'colors':colors}
with open('sk_president_2014_2_fico_kiska_obvody.json', 'w') as outfile:
  json.dump(data, outfile)
outfile.close()

index2.html


    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

	<script src="//code.jquery.com/jquery-1.8.2.min.js"></script>
	
	
	<script>
	  // see //leafletjs.com/reference.html
	  L_PREFER_CANVAS = true;
	</script>

    <link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
	 <!--[if lte IE 8]>
		 <link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
	 <![endif]-->
    <script src="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>

    <style type="text/css">

		html, body, #map {
		  width: 100%;
		  height: 100%;
		  margin: 0;
		  padding: 0;
		}
		.leaflet-tile-pane {
		  opacity: .3
		}
		.leaflet-container {
          background-color: #fff;
        }

    </style>

  
    <div id="map"></div>
    <script type="text/javascript">


		// Create the map
		var map = L.map('map',{zoomControl: false}).setView([48.695493,19.467773], 7);
		map.addControl( L.control.zoom({position: 'topright'}) );
		
		// add an OpenStreetMap tile layer
		// also see //wiki.openstreetmap.org/wiki/Tiles
		//L.tileLayer('//{s}.tile.osm.org/{z}/{x}/{y}.png', {
		L.tileLayer('//{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png', {
			attribution: '&copy; <a href="//osm.org/copyright">OpenStreetMap</a> contributors'
		}).addTo(map);
		
		//add circles
		$.getJSON( "sk_president_2014_2_fico_kiska_obvody.json", function (data) {
		    $.each(data.votes, function (index, value) {
		        
		        description = "<strong>" + value.town + "</strong><br>";
		        
		        tuples = [];
		        for (var key in value.votes) {
		          tuples.push([key,parseInt(value.votes[key])]);
		        }
		        
		        tuples.sort(function(a, b) {
                    a = a[1];
                    b = b[1];
                    return a < b ? 1 : (a > b ? -1 : 0);
                });
                for (i = 0; i <= 1; i++) {
                  tmp = Math.round(parseInt(tuples[i][1]) / parseInt(value.population) * 100);
                  description += data.people[tuples[i][0]] + ": " +  tmp + "% (" + tuples[i][1].toLocaleString()  +")<br>";
                }
		    
		    
				circle = L.circle([value.lat, value.lng], Math.sqrt(parseInt(value.population)*2000), {
					color: data.colors[value.winner_class],
					fillColor: data.colors[value.winner_class],
					fillOpacity: 
					  2.86*(Math.max(parseInt(value.votes[0]),parseInt(value.votes[1])) / value.population - 0.5),
					weight: 1,
				}).addTo(map);
				

				circle.bindPopup(description);
		  });
		});

	</script>

index3.html

    <h1>Tady je Ficovo</h1>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

	<script src="//code.jquery.com/jquery-1.8.2.min.js"></script>
	
	
	<script>
	  // see //leafletjs.com/reference.html
	  L_PREFER_CANVAS = true;
	</script>

    <link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
	 <!--[if lte IE 8]>
		 <link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
	 <![endif]-->
    <script src="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>

    <style type="text/css">

		html, body, #map {
		  width: 100%;
		  height: 100%;
		  margin: 0;
		  padding: 0;
		}
		.leaflet-tile-pane {
		  opacity: .3
		}
		.leaflet-container {
          background-color: #fff;
        }

    </style>

  
    <div id="map"></div>
    <script type="text/javascript">


		// Create the map
		var map = L.map('map',{zoomControl: false}).setView([48.695493,19.467773], 7);
		map.addControl( L.control.zoom({position: 'topright'}) );
		
		// add an OpenStreetMap tile layer
		// also see //wiki.openstreetmap.org/wiki/Tiles
		//L.tileLayer('//{s}.tile.osm.org/{z}/{x}/{y}.png', {
		L.tileLayer('//{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png', {
			attribution: '&copy; <a href="//osm.org/copyright">OpenStreetMap</a> contributors'
		}).addTo(map);
		
		//add circles
		$.getJSON( "sk_president_2014_2_fico_kiska_obvody.json", function (data) {
		    $.each(data.votes, function (index, value) {
		        
		        description = "<strong>" + value.town + "</strong><br>";
		        
		        tuples = [];
		        for (var key in value.votes) {
		          tuples.push([key,parseInt(value.votes[key])]);
		        }
		        
		        tuples.sort(function(a, b) {
                    a = a[1];
                    b = b[1];
                    return a < b ? 1 : (a > b ? -1 : 0);
                });
                for (i = 0; i <= 1; i++) {
                  tmp = Math.round(parseInt(tuples[i][1]) / parseInt(value.population) * 100);
                  description += data.people[tuples[i][0]] + ": " +  tmp + "% (" + tuples[i][1].toLocaleString()  +")<br>";
                }
		    
		      if (parseInt(value.votes[0]) > parseInt(value.votes[1])) {
				circle = L.circle([value.lat, value.lng], Math.sqrt(parseInt(value.population)*2000), {
					color: data.colors[value.winner_class],
					fillColor: data.colors[value.winner_class],
					fillOpacity: 
					  2.86*(Math.max(parseInt(value.votes[0]),parseInt(value.votes[1])) / value.population - 0.5),
					weight: 2,
				}).addTo(map);
				

				circle.bindPopup(description);
		      }
		  });
		});

	</script>

index4.html

    <h1>Tady je Kiskovo</h1>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

	<script src="//code.jquery.com/jquery-1.8.2.min.js"></script>
	
	
	<script>
	  // see //leafletjs.com/reference.html
	  L_PREFER_CANVAS = true;
	</script>

    <link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
	 <!--[if lte IE 8]>
		 <link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
	 <![endif]-->
    <script src="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>

    <style type="text/css">

		html, body, #map {
		  width: 100%;
		  height: 100%;
		  margin: 0;
		  padding: 0;
		}
		.leaflet-tile-pane {
		  opacity: .3
		}
		.leaflet-container {
          background-color: #fff;
        }

    </style>

  
    <div id="map"></div>
    <script type="text/javascript">


		// Create the map
		var map = L.map('map',{zoomControl: false}).setView([48.695493,19.467773], 7);
		map.addControl( L.control.zoom({position: 'topright'}) );
		
		// add an OpenStreetMap tile layer
		// also see //wiki.openstreetmap.org/wiki/Tiles
		//L.tileLayer('//{s}.tile.osm.org/{z}/{x}/{y}.png', {
		L.tileLayer('//{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png', {
			attribution: '&copy; <a href="//osm.org/copyright">OpenStreetMap</a> contributors'
		}).addTo(map);
		
		//add circles
		$.getJSON( "sk_president_2014_2_fico_kiska_obvody.json", function (data) {
		    $.each(data.votes, function (index, value) {
		        
		        description = "<strong>" + value.town + "</strong><br>";
		        
		        tuples = [];
		        for (var key in value.votes) {
		          tuples.push([key,parseInt(value.votes[key])]);
		        }
		        
		        tuples.sort(function(a, b) {
                    a = a[1];
                    b = b[1];
                    return a < b ? 1 : (a > b ? -1 : 0);
                });
                for (i = 0; i <= 1; i++) {
                  tmp = Math.round(parseInt(tuples[i][1]) / parseInt(value.population) * 100);
                  description += data.people[tuples[i][0]] + ": " +  tmp + "% (" + tuples[i][1].toLocaleString()  +")<br>";
                }
		    
		      if (parseInt(value.votes[0]) < parseInt(value.votes[1])) {
				circle = L.circle([value.lat, value.lng], Math.sqrt(parseInt(value.population)*2000), {
					color: data.colors[value.winner_class],
					fillColor: data.colors[value.winner_class],
					fillOpacity: 
					  2.86*(Math.max(parseInt(value.votes[0]),parseInt(value.votes[1])) / value.population - 0.5),
					weight: 2,
				}).addTo(map);
				

				circle.bindPopup(description);
		      }
		  });
		});

	</script>

index6.html


    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

	<script src="//code.jquery.com/jquery-1.8.2.min.js"></script>
	
	
	<script>
	  // see //leafletjs.com/reference.html
	  L_PREFER_CANVAS = true;
	</script>

    <link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
	 <!--[if lte IE 8]>
		 <link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
	 <![endif]-->
    <script src="//cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>

    <style type="text/css">

		html, body, #map {
		  width: 100%;
		  height: 100%;
		  margin: 0;
		  padding: 0;
		}
		.leaflet-tile-pane {
		  opacity: .3
		}
		.leaflet-container {
          background-color: #fff;
        }

    </style>

  
    <div id="map"></div>
    <script type="text/javascript">

        //colors:
        var amax = Array(255,0,0);
		var bmax = Array(0,0,255);
		
		// Create the map
		var map = L.map('map',{zoomControl: false}).setView([48.695493,19.467773], 7);
		map.addControl( L.control.zoom({position: 'topright'}) );
		
		// add an OpenStreetMap tile layer
		// also see //wiki.openstreetmap.org/wiki/Tiles
		//L.tileLayer('//{s}.tile.osm.org/{z}/{x}/{y}.png', {
		L.tileLayer('//{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png', {
			attribution: '&copy; <a href="//osm.org/copyright">OpenStreetMap</a> contributors'
		}).addTo(map);
		
		//add circles
		$.getJSON( "sk_president_2014_2_fico_kiska_obvody.json", function (data) {
		    $.each(data.votes, function (index, value) {
		        
		        description = "<strong>" + value.town + "</strong><br>";
		        
		        tuples = [];
		        for (var key in value.votes) {
		          tuples.push([key,parseInt(value.votes[key])]);
		        }
		        
		        tuples.sort(function(a, b) {
                    a = a[1];
                    b = b[1];
                    return a < b ? 1 : (a > b ? -1 : 0);
                });
                for (i = 0; i <= 1; i++) {
                  tmp = Math.round(parseInt(tuples[i][1]) / parseInt(value.population) * 100);
                  description += data.people[tuples[i][0]] + ": " +  tmp + "% (" + tuples[i][1].toLocaleString()  +")<br>";
                }
		    
		    
				circle = L.circle([value.lat, value.lng], Math.sqrt(parseInt(value.population)*2000), {
					color: data.colors[value.winner_class],
					fillColor: values2color(parseInt(value.votes[0]),parseInt(value.votes[1])),
					fillOpacity: 1,
					weight: 1,
				}).addTo(map);
				

				circle.bindPopup(description);
		  });
		});
		
		function values2color(a,b) {
		  //amax = Array(127,0,0);
		  //bmax = Array(0,127,0);
		  color = Array();
		  if (a >= b)
		    return val2col(1-(2*b/(a+b)),amax);
		  else
		    return val2col(1-(2*a/(a+b)),bmax);
		}
		
		// color scale over white
		//r - rate [0,1], c ~ max. color Array(127,0,0)
		//0 ~ white, 1 ~ full color
		function val2col(r,c) {
		  maxover = 255 - Math.max.apply(Math, c);
		  maxcol = Array();
		  col = Array();
		  for (i=0;i<=2;i++) {
		     maxcol[i] = 255 + c[i]
		  }
		  for (i=0;i<=2;i++) {
		    col[i] = Math.round(Math.min(255,maxcol[i] * (1 - r)))
		    //if (col[i] > 255) col[i] = 255;
		    //if (col[i] < 0) col[i] = 0;
		  }
		  return "rgb(" + col[0] + "," + col[1] + "," + col[2] + ")";
		}		

	</script>

sk_president_2014_2_fico_kiska_obvody.json

{"votes": [{"town": "Bratislava", "votes": ["59572", "171001"], "winner": "Kiska", "lat": "48.166085", "lng": "17.108231", "winner_class": "kiska", "id": "1.1", "population": 230573}, {"town": "\u017dilina", "votes": ["47726", "48839"], "winner": "Kiska", "lat": "49.2215903", "lng": "18.7419519", "winner_class": "kiska", "id": "1285", "population": 96565}, {"town": "Ko\u0161ice", "votes": ["27951", "66324"], "winner": "Kiska", "lat": "48.73989", "lng": "21.262436", "winner_class": "kiska", "id": "2466.1", "population": 94275}, {"town": "Nitra", "votes": ["41914", "46639"], "winner": "Kiska", "lat": "48.3148451", "lng": "18.0879864", "winner_class": "kiska", "id": "800", "population": 88553}, {"town": "Pre\u0161ov", "votes": ["33365", "51412"], "winner": "Kiska", "lat": "48.9979058", "lng": "21.2396073", "winner_class": "kiska", "id": "2197", "population": 84777}, {"town": "Prievidza", "votes": ["42715", "37621"], "winner": "Fico", "lat": "48.7707098", "lng": "18.6209537", "winner_class": "fico", "id": "541", "population": 80336}, {"town": "Tren\u010d\u00edn", "votes": ["36118", "41980"], "winner": "Kiska", "lat": "48.8944464", "lng": "18.0407528", "winner_class": "kiska", "id": "610", "population": 78098}, {"town": "Trnava", "votes": ["34417", "42530"], "winner": "Kiska", "lat": "48.3804163", "lng": "17.5878194", "winner_class": "kiska", "id": "333", "population": 76947}, {"town": "Nov\u00e9 Z\u00e1mky", "votes": ["18530", "38464"], "winner": "Kiska", "lat": "47.9860672", "lng": "18.1640649", "winner_class": "kiska", "id": "880", "population": 56994}, {"town": "Poprad", "votes": ["18298", "37442"], "winner": "Kiska", "lat": "49.055188", "lng": "20.3014328", "winner_class": "kiska", "id": "2085", "population": 55740}, {"town": "Martin", "votes": ["23336", "27491"], "winner": "Kiska", "lat": "49.0652929", "lng": "18.9218558", "winner_class": "kiska", "id": "1107", "population": 50827}, {"town": "Zvolen", "votes": ["24652", "25484"], "winner": "Kiska", "lat": "48.5758623", "lng": "19.1256291", "winner_class": "kiska", "id": "1730", "population": 50136}, {"town": "Dunajsk\u00e1 Streda", "votes": ["3553", "45433"], "winner": "Kiska", "lat": "47.9916214", "lng": "17.6206515", "winner_class": "kiska", "id": "104", "population": 48986}, {"town": "Bansk\u00e1 Bystrica", "votes": ["18776", "29923"], "winner": "Kiska", "lat": "48.736277", "lng": "19.1461917", "winner_class": "kiska", "id": "1288", "population": 48699}, {"town": "Pova\u017esk\u00e1 Bystrica", "votes": ["24520", "20649"], "winner": "Fico", "lat": "49.1169161", "lng": "18.4481529", "winner_class": "fico", "id": "468", "population": 45169}, {"town": "Levice", "votes": ["15601", "29482"], "winner": "Kiska", "lat": "48.2192923", "lng": "18.6011482", "winner_class": "kiska", "id": "700", "population": 45083}, {"town": "Senica", "votes": ["16500", "27490"], "winner": "Kiska", "lat": "48.6765247", "lng": "17.3639576", "winner_class": "kiska", "id": "261", "population": 43990}, {"town": "Michalovce", "votes": ["23459", "19381"], "winner": "Fico", "lat": "48.7556769", "lng": "21.9183859", "winner_class": "fico", "id": "2659", "population": 42840}, {"town": "Spi\u0161sk\u00e1 Nov\u00e1 Ves", "votes": ["18817", "22893"], "winner": "Kiska", "lat": "48.9435269", "lng": "20.567981", "winner_class": "kiska", "id": "2831", "population": 41710}, {"town": "Ko\u0161ice - okolie", "votes": ["14515", "26305"], "winner": "Kiska", "lat": "48.73989", "lng": "20.902634", "winner_class": "kiska", "id": "2466.2", "population": 40820}, {"town": "Nov\u00e9 Mesto nad V\u00e1hom", "votes": ["18494", "20895"], "winner": "Kiska", "lat": "48.7563795", "lng": "17.8326971", "winner_class": "kiska", "id": "416", "population": 39389}, {"town": "Humenn\u00e9", "votes": ["23563", "15765"], "winner": "Fico", "lat": "48.9338752", "lng": "21.9107212", "winner_class": "fico", "id": "1912", "population": 39328}, {"town": "Galanta", "votes": ["10910", "27370"], "winner": "Kiska", "lat": "48.1895413", "lng": "17.7266636", "winner_class": "kiska", "id": "163", "population": 38280}, {"town": "Rimavsk\u00e1 Sobota", "votes": ["14978", "22062"], "winner": "Kiska", "lat": "48.3833442", "lng": "20.018358", "winner_class": "kiska", "id": "1545", "population": 37040}, {"town": "\u017diar nad Hronom", "votes": ["18434", "18018"], "winner": "Fico", "lat": "48.5882665", "lng": "18.8493777", "winner_class": "fico", "id": "1800", "population": 36452}, {"town": "N\u00e1mestovo", "votes": ["15500", "20095"], "winner": "Kiska", "lat": "49.406373", "lng": "19.483884", "winner_class": "kiska", "id": "1158", "population": 35595}, {"town": "Senec", "votes": ["8098", "27438"], "winner": "Kiska", "lat": "48.2166758", "lng": "17.3981035", "winner_class": "kiska", "id": "84", "population": 35536}, {"town": "Kom\u00e1rno", "votes": ["4759", "30572"], "winner": "Kiska", "lat": "47.7625785", "lng": "18.1294132", "winner_class": "kiska", "id": "635", "population": 35331}, {"town": "\u010cadca", "votes": ["22716", "10940"], "winner": "Fico", "lat": "49.4383046", "lng": "18.7913236", "winner_class": "fico", "id": "971", "population": 33656}, {"town": "Lu\u010denec", "votes": ["14647", "17952"], "winner": "Kiska", "lat": "48.3289346", "lng": "19.6653485", "winner_class": "kiska", "id": "1392", "population": 32599}, {"town": "Liptovsk\u00fd Mikul\u00e1\u0161", "votes": ["14251", "18279"], "winner": "Kiska", "lat": "49.0834456", "lng": "19.6124852", "winner_class": "kiska", "id": "1046", "population": 32530}, {"town": "Topo\u013e\u010dany", "votes": ["19406", "12250"], "winner": "Fico", "lat": "48.5614719", "lng": "18.1716087", "winner_class": "fico", "id": "962", "population": 31656}, {"town": "Trebi\u0161ov", "votes": ["13763", "17463"], "winner": "Kiska", "lat": "48.6233816", "lng": "21.7199734", "winner_class": "kiska", "id": "2907", "population": 31226}, {"town": "Malacky", "votes": ["10389", "19532"], "winner": "Kiska", "lat": "48.4363404", "lng": "17.0182641", "winner_class": "kiska", "id": "26", "population": 29921}, {"town": "Pezinok", "votes": ["10052", "19806"], "winner": "Kiska", "lat": "48.2882776", "lng": "17.2669693", "winner_class": "kiska", "id": "52", "population": 29858}, {"town": "Pie\u0161\u0165any", "votes": ["11940", "16754"], "winner": "Kiska", "lat": "48.5892328", "lng": "17.8340466", "winner_class": "kiska", "id": "208", "population": 28694}, {"town": "Bardejov", "votes": ["13944", "14174"], "winner": "Kiska", "lat": "49.2920835", "lng": "21.2762809", "winner_class": "kiska", "id": "1804", "population": 28118}, {"town": "Vranov nad Top\u013eou", "votes": ["16092", "9380"], "winner": "Fico", "lat": "48.8875263", "lng": "21.6853189", "winner_class": "fico", "id": "2460", "population": 25472}, {"town": "Ru\u017eomberok", "votes": ["10890", "14467"], "winner": "Kiska", "lat": "49.0815474", "lng": "19.304323", "winner_class": "kiska", "id": "1201", "population": 25357}, {"town": "Brezno", "votes": ["12078", "11819"], "winner": "Fico", "lat": "48.8060729", "lng": "19.6438178", "winner_class": "fico", "id": "1331", "population": 23897}, {"town": "Ke\u017emarok", "votes": ["8000", "15244"], "winner": "Kiska", "lat": "49.1373227", "lng": "20.4295428", "winner_class": "kiska", "id": "2016", "population": 23244}, {"town": "Ro\u017e\u0148ava", "votes": ["7003", "14179"], "winner": "Kiska", "lat": "48.6620518", "lng": "20.5278701", "winner_class": "kiska", "id": "2776", "population": 21182}, {"town": "\u0160a\u013ea", "votes": ["5377", "14649"], "winner": "Kiska", "lat": "48.1520972", "lng": "17.8738852", "winner_class": "kiska", "id": "912", "population": 20026}, {"town": "Star\u00e1 \u013dubov\u0148a", "votes": ["9588", "8608"], "winner": "Fico", "lat": "49.3022126", "lng": "20.6905301", "winner_class": "fico", "id": "2276", "population": 18196}, {"town": "Doln\u00fd Kub\u00edn", "votes": ["6338", "9991"], "winner": "Kiska", "lat": "49.2090236", "lng": "19.2953678", "winner_class": "kiska", "id": "996", "population": 16329}, {"town": "B\u00e1novce nad Bebravou", "votes": ["9211", "6405"], "winner": "Fico", "lat": "48.7187376", "lng": "18.2591798", "winner_class": "fico", "id": "341", "population": 15616}, {"town": "Ve\u013ek\u00fd Krt\u00ed\u0161", "votes": ["6348", "9122"], "winner": "Kiska", "lat": "48.2111942", "lng": "19.3412783", "winner_class": "kiska", "id": "1648", "population": 15470}, {"town": "Svidn\u00edk", "votes": ["8068", "4162"], "winner": "Fico", "lat": "49.3055641", "lng": "21.568117", "winner_class": "fico", "id": "2383", "population": 12230}, {"town": "Stropkov", "votes": ["4669", "2891"], "winner": "Fico", "lat": "49.2026191", "lng": "21.6518244", "winner_class": "fico", "id": "2317", "population": 7560}], "colors": {"kiska": "#00f", "fico": "#f00"}, "people": ["Fico", "Kiska"]}