blob: 24b6e107d4a8d2407232fdb6883df30360b18f43 [file] [log] [blame]
<html>
<head>
<meta charset="utf-8">
<script src="../common/echarts.min.js"></script>
<script src="../common/map/js/world.js"></script>
<link rel="stylesheet" href="../common/reset.css">
<script src="../common/perfect-scrollbar/0.6.8/js/perfect-scrollbar.min.js"></script>
<link rel="stylesheet" href="../common/perfect-scrollbar/0.6.8/css/perfect-scrollbar.min.css">
</head>
<body>
<div id="main"></div>
<script>
var myChart = echarts.init(document.getElementById('main'));
var geoCoordMap = {
"Amsterdam": [4.895168,52.370216],
"Athens": [-83.357567,33.951935],
"Auckland": [174.763332,-36.84846],
"Bangkok": [100.501765,13.756331],
"Barcelona": [2.173403,41.385064],
"Beijing": [116.407395,39.904211],
"Berlin": [13.404954,52.520007],
"Bogotá": [-74.072092,4.710989],
"Bratislava": [17.107748,48.148596],
"Brussels": [4.35171,50.85034],
"Budapest": [19.040235,47.497912],
"Buenos Aires": [-58.381559,-34.603684],
"Bucharest": [26.102538,44.426767],
"Caracas": [-66.903606,10.480594],
"Chicago": [-87.629798,41.878114],
"Delhi": [77.209021,28.613939],
"Doha": [51.53104,25.285447],
"Dubai": [55.270783,25.204849],
"Dublin": [-6.26031,53.349805],
"Frankfurt": [8.682127,50.110922],
"Geneva": [6.143158,46.204391],
"Helsinki": [24.938379,60.169856],
"Hong Kong": [114.109497,22.396428],
"Istanbul": [28.978359,41.008238],
"Jakarta": [106.845599,-6.208763],
"Johannesburg": [28.047305,-26.204103],
"Cairo": [31.235712,30.04442],
"Kiev": [30.5234,50.4501],
"Copenhagen": [12.568337,55.676097],
"Kuala Lumpur": [101.686855,3.139003],
"Lima": [-77.042793,-12.046374],
"Lisbon": [-9.139337,38.722252],
"Ljubljana": [14.505751,46.056947],
"London": [-0.127758,51.507351],
"Los Angeles": [-118.243685,34.052234],
"Luxembourg": [6.129583,49.815273],
"Lyon": [4.835659,45.764043],
"Madrid": [-3.70379,40.416775],
"Milan": [9.185924,45.465422],
"Manama": [50.58605,26.228516],
"Manila": [120.984219,14.599512],
"Mexico City": [-99.133208,19.432608],
"Miami": [-80.19179,25.76168],
"Montreal": [-73.567256,45.501689],
"Moscow": [37.6173,55.755826],
"Mumbai": [72.877656,19.075984],
"Munich": [11.581981,48.135125],
"Nairobi": [36.821946,-1.292066],
"New York": [-74.005941,40.712784],
"Nicosia": [33.382276,35.185566],
"Oslo": [10.752245,59.913869],
"Paris": [2.352222,48.856614],
"Prague": [14.4378,50.075538],
"Riga": [24.105186,56.949649],
"Rio de Janeiro": [-43.172896,-22.906847],
"Rome": [12.496366,41.902783],
"Santiago de Chile": [-70.669265,-33.44889],
"São Paulo": [-46.633309,-23.55052],
"Seoul": [126.977969,37.566535],
"Shanghai": [121.473701,31.230416],
"Singapore": [103.819836,1.352083],
"Sofia": [23.321868,42.697708],
"Stockholm": [18.068581,59.329323],
"Sydney": [151.209296,-33.86882],
"Taipei": [121.565418,25.032969],
"Tallinn": [24.753575,59.436961],
"Tel Aviv": [34.781768,32.0853],
"Tokyo": [139.691706,35.689487],
"Toronto": [-79.383184,43.653226],
"Vilnius": [25.279651,54.687156],
"Warsaw": [21.012229,52.229676],
"Vienna": [16.373819,48.208174],
"Zurich": [8.541694,47.376887]
};
var schema = [
"Cities",
"Gross purchasing power",
"Net purchasing power",
"Prices (excl. rent)",
"Prices (incl. rent)",
"Gross wages",
"Net wages",
"Working time [hours per year]",
"Vacation [paid working days per year]",
"Time required for 1 Big Mac [minutes]",
"Time required for 1 kg of bread [minutes]",
"Time required for 1 kg of rice [minutes]",
"Time required for 1 iPhone 4S, 16 GB [hours]",
"City break",
"Inflation 2006",
"Inflation 2007",
"Inflation 2008",
"Inflation 2009",
"Inflation 2010",
"Inflation 2011",
"Prices (incl. rent)",
"Food basket",
"Services",
"Normal local rent medium [USD per month]",
"Household appliances",
"Bus or tram or underground",
"Train",
"Taxi [USD per 5 km trip]",
"Medium-sized cars price",
"Medium-sized cars tax",
"Medium-sized cars gas",
"Restaurant [USD per dinner]",
"Hotel *** [USD per night]",
"Hotel ***** [USD per night]",
"Women's medium clothing",
"Men's medium clothing",
"Furnished medium 4-room apartment [USD per month]",
"Unfurnished medium 3-room apartment [USD per month]",
"Net hourly wages [USD per hour]",
"Gross hourly wages [USD per hour]",
"Taxes and social security contributions",
"Primary school teacher [USD per year]",
"Bus driver [USD per year]",
"Automobile mechanic [USD per year]",
"Building labourer [USD per year]",
"Skilled industrial worker [USD per year]",
"Cook [USD per year]",
"Departement head [USD per year]",
"Product manager [USD per year]",
"Engineer [USD per year]",
"Bank credit clerk [USD per year]",
"Secretary [USD per year]",
"Saleswoman [USD per year]",
"Female industrial worker [USD per year]",
"Female call center worker [USD per year]",
"Financial analyst [USD per year]",
"Financial analyst [USD pro Jahr]"
];
var rawData = [["Amsterdam",101.6,90.1,77.1,69.1,78.3,69.4,1755,24,15,7,9,44,720,1.651,1.59,2.205,0.974,0.93,2.477,67.4,364,690,1113,4960,3.19,30.05,16.34,24000,689,1.8,50,200,390,690,1040,2331,1580,17.5,25.5,30,48400,39200,26300,30200,55400,39800,104400,58700,64600,49200,40300,31100,40300,27700,66700,66700],["Barcelona",79.7,78.6,74.7,65.6,59.6,58.7,1760,29,18,11,6,52,740,3.563,2.844,4.13,-0.238,2.043,3.052,64,393,750,984,5000,2.59,41.96,10.36,26900,177,1.77,51,170,330,580,1110,1269,1087,14.8,19.4,23,41300,34100,29100,29800,31500,32100,40800,67000,43100,38900,28900,25500,25000,28000,58300,58300],["Berlin",109.7,97.1,72.2,64.1,79.2,70.1,1742,28,16,11,9,56,720,1.784,2.276,2.754,0.234,1.15,2.483,62.5,389,530,841,4670,2.98,80.3,10.79,35600,246,2.1,34,120,230,570,710,2395,1178,17.7,25.8,30,56900,38600,35500,28500,47400,57600,84200,74500,72100,51700,38100,28200,32000,28100,81700,81700],["Bratislava",51.3,50.7,53.9,47.1,27.7,27.3,1884,23,31,20,19,126,490,4.264,1.89,3.935,0.925,0.697,4.079,45.9,344,330,414,4740,1.08,22.97,5.61,26700,65,1.93,28,120,230,250,340,1683,841,6.9,9,22,11300,14100,11300,10000,16300,18900,20300,43300,22800,15800,16100,9600,12600,16400,48300,48300],["Budapest",35.5,32,56.7,50.4,20.1,18.1,1912,22,49,13,26,206,740,3.878,7.934,6.067,4.209,4.85,3.9,49.1,340,390,556,5270,1.43,15.96,7.64,22600,76,1.95,28,130,410,580,920,2123,1165,4.6,6.6,28,8900,11500,9300,7000,10900,16800,25600,21100,23300,21400,11100,8200,6500,8900,29300,29300],["Bucharest",37.1,34,39.8,34.8,14.8,13.5,1836,26,57,21,26,230,370,6.552,4.84,7.848,5.581,6.101,5.812,33.9,244,270,388,3830,0.75,9.43,3.17,11700,36,1.9,25,100,190,180,300,984,530,3.4,4.8,29,5600,7500,9500,7900,7400,14900,13900,22000,11400,8800,6000,8200,5800,5300,13200,13200],["Dublin",101.9,103.3,76.3,69.7,77.7,78.8,1707,21,14,7,10,39,580,2.7,2.873,3.108,-1.683,-1.557,1.139,68,454,720,1554,5160,2.74,34.53,14.89,32000,427,2.01,55,130,260,470,600,2331,1592,19.8,25.3,20,57100,45500,38300,28200,42600,42100,88800,86100,54300,45800,31700,25300,28200,28800,85000,85000],["Frankfurt",102.2,90.5,86.3,77.2,88.2,78.1,1731,28,14,8,10,42,950,1.784,2.276,2.754,0.234,1.15,2.483,75.3,439,710,1282,5510,3.24,86.77,16.23,36800,78,1.89,68,130,370,840,890,2370,1644,19.7,28.7,30,60900,33300,40400,34100,48800,40000,83300,77700,77700,61600,50600,37900,34100,29100,104100,104100],["Helsinki",93,86,86.5,82.3,80.2,74.2,1712,28,16,13,6,44,960,1.279,1.584,3.9,1.635,1.686,3.323,80.3,497,840,1437,5400,3.28,34.83,12.71,34600,152,1.97,44,200,450,610,1200,8677,1437,18.7,26.1,27,48000,42200,38200,38700,40500,41200,89900,60500,69200,44700,38600,34600,33500,35600,74500,74500],["Istanbul",39,39.4,71.5,65.6,27.9,28.2,2139,19,42,9,14,166,720,9.597,8.756,10.444,6.251,8.567,6.472,64,430,630,1282,5490,0.95,15.84,8.94,34600,1189,2.37,44,240,420,630,880,3147,1476,7.1,9.1,20,14800,14600,13500,9500,20300,51300,38600,39100,34100,19300,13500,9500,9200,9300,33500,33500],["Kiev",19.5,20.9,53.1,46.9,10.5,11.2,1850,24,45,18,29,266,930,9.009,12.843,25.201,15.9,9.365,7.958,45.7,263,450,556,4140,0.25,12.15,4.56,24900,null,1.22,42,150,530,430,600,1631,854,2.8,3.4,16,3800,5300,6500,4900,7000,10500,11100,14100,6700,10000,4900,4100,4000,3900,13300,13300],["Copenhagen",122,92.6,100.9,88.8,123.1,93.4,1674,29,15,9,6,36,1060,1.9,1.712,3.399,1.319,2.298,2.757,86.7,567,960,1100,5060,4.88,59.92,17.33,63400,641,1.99,72,270,490,950,1150,2616,1735,23.5,40.1,41,86500,56300,68400,58500,68900,61000,86400,94500,89200,72900,61900,46000,64800,42200,109200,109200],["Lisbon",65.3,63.2,67.5,60.2,44,42.6,1695,22,22,13,8,96,720,3.043,2.423,2.646,-0.903,1.391,3.558,58.7,310,570,1100,5180,1.83,27.63,11.5,38100,181,1.95,45,80,390,390,510,1308,1178,10.7,14.3,22,32000,22500,19700,13900,25900,33700,33700,35200,36100,32400,17500,15000,18500,14900,63100,63100],["Ljubljana",57.5,50.5,63.3,55.2,36.4,32,1792,22,25,22,38,101,550,2.458,3.611,5.7,0.855,1.834,1.828,53.8,368,490,479,4970,2.03,18.49,7.25,24600,140,1.71,32,140,240,560,1000,1774,1023,8.1,11.9,30,29000,15000,18100,13000,17900,28000,56600,41700,35000,23400,16300,12800,12400,17900,27800,27800],["London",91.2,86.2,87.2,83,79.5,75.2,1786,22,15,6,13,42,930,2.3,2.346,3.629,2.12,3.339,4.454,81,436,770,1981,4910,3.7,81.95,23.03,28000,217,2.4,50,200,440,480,800,4830,3263,19,25.9,26,55700,44400,40900,39100,51700,36400,80300,75000,65900,46600,40700,26300,37600,27100,64200,64200],["Lyon",81.8,82.5,78.4,68.8,64.2,64.7,1641,26,16,10,12,52,740,1.912,1.607,3.159,0.103,1.735,2.294,67.2,477,700,945,4540,2.07,40.02,13.08,30400,null,1.84,29,180,310,740,1180,1554,1217,16.3,20.9,21,33900,30300,26200,24000,29400,43500,81500,70600,45100,55200,26000,22500,23800,24700,100900,100900],["Madrid",83.6,85,69.7,61.7,57,57.9,1733,30,18,9,6,53,590,3.563,2.844,4.13,-0.238,2.043,3.052,60.2,432,630,1049,4940,1.94,44.51,13.27,21600,177,1.76,53,170,240,580,910,1295,1061,14.6,18.5,19,29100,25400,20500,23200,27300,35900,39200,63500,52700,53500,26900,17500,19900,25600,65100,65100],["Milan",88.2,77.2,79.7,72.2,70.3,61.5,1753,23,17,14,15,55,770,2.217,2.038,3.5,0.764,1.639,2.903,70.4,487,710,1256,4790,1.94,34.75,16.84,18800,186,2.24,73,170,320,870,1170,2862,1813,15.5,22.9,31,32800,36500,29400,28900,36900,51000,68000,60400,57900,43500,32000,29700,28800,23200,58700,58700],["Munich",108.3,89.9,84.6,75.1,91.5,76,1755,25,14,11,11,42,800,1.784,2.276,2.754,0.234,1.15,2.483,73.3,500,720,971,4770,3.24,71.23,18.04,38400,150,1.86,53,170,340,830,1130,2499,1813,19.2,29.8,34,51200,40000,37300,28000,51700,55200,105900,115500,79500,78200,50100,40300,31500,30200,105900,105900],["Oslo",102.7,83.9,116,104.5,119.1,97.4,1749,25,17,11,12,36,1000,2.332,0.729,3.766,2.166,2.4,1.301,102,599,1270,1968,5190,5.12,48.58,23.22,42700,574,2.37,98,220,410,840,1450,3250,2214,24.5,38.8,36,61500,60000,78200,62800,72900,59800,123400,97400,79400,69300,64900,49500,63700,46500,144000,144000],["Paris",94.8,89.4,83.9,77.5,78.1,73.6,1557,29,15,14,12,44,1100,1.912,1.607,3.159,0.103,1.735,2.294,75.6,522,770,1670,5030,2.16,42.87,9.39,33700,486,1.89,64,210,600,1020,1410,3250,2279,18.5,25.4,26,38700,32800,28000,25900,32100,36800,71000,71100,67100,80700,34700,25300,25400,25600,86900,86900],["Prague",45.1,46.2,54.3,48,24.5,25.1,1829,20,34,13,16,132,740,2.543,2.862,6.339,1.034,1.464,1.929,46.8,295,460,725,4900,1.37,12.78,8.05,27800,116,1.88,58,120,350,250,530,1230,867,6.3,8,20,13200,16200,13600,9100,15400,17100,24500,25300,21000,20100,13200,12200,9200,10500,21900,21900],["Riga",44.3,39.2,54.5,47.2,24.2,21.4,1806,23,33,22,22,168,580,6.571,10.083,15.252,3.259,-1.224,4.223,46,316,410,466,4460,1.3,9.23,6.34,29700,98,1.76,36,110,300,440,570,932,841,5.4,7.9,31,8400,13700,15500,14600,15300,14400,23300,30400,16800,18900,13700,8700,9300,13000,33000,33000],["Rome",69.6,60.9,79.2,73.8,55.1,48.2,1898,22,23,17,19,70,650,2.217,2.038,3.5,0.764,1.639,2.903,72,497,690,1813,5190,1.94,36.69,9.38,32400,389,2.27,36,210,320,910,830,3237,2033,12.1,17.9,31,30600,33500,22900,19600,31300,74200,53100,65100,28000,34300,34800,22100,16200,13200,94500,94500],["Sofia",32.6,32.1,42.4,36.5,13.8,13.6,1894,22,36,20,28,248,420,7.417,7.571,11.95,2.473,3.036,3.389,35.6,265,290,336,3890,0.66,6.62,2,27700,119,1.71,19,80,220,270,430,764,453,3.4,4.5,23,4700,7300,7500,5700,9300,11100,18100,15200,10400,10700,7400,7400,5100,10900,21900,21900],["Stockholm",90.2,84.9,92,81.7,82.9,78.1,1795,26,17,18,11,45,810,1.498,1.677,3.298,1.989,1.907,1.366,79.7,553,900,1178,4950,4.52,41.6,24.64,36400,334,2.14,68,180,340,760,1240,2525,1826,19.7,27,26,46600,41300,41300,43300,44300,45800,88800,81900,72500,48600,41100,37400,37900,41700,83400,83400],["Tallinn",47.9,48.6,58.3,50.2,28,28.3,1760,28,27,20,15,139,490,4.43,6.598,10.366,-0.085,2.894,5.121,49,333,380,453,5200,1.81,9.79,5.86,21200,null,1.72,34,160,250,610,830,984,712,7.1,9.1,20,11400,17700,21200,10600,17900,21400,51000,16600,27300,11800,14200,8800,10600,13600,27800,27800],["Vilnius",42.6,41.6,50.9,43.6,21.7,21.2,1789,24,32,19,33,168,410,3.788,5.772,11.138,4.164,1.19,4.124,42.5,284,360,323,4770,0.94,13.73,4.63,23700,null,1.72,22,90,220,480,510,984,492,5.3,7.1,23,10500,12200,13900,9800,17700,21900,23600,18500,16600,20200,10400,6500,8500,8000,38500,38500],["Warsaw",44.3,40.8,53.7,48,23.8,21.9,1792,23,35,13,24,141,650,1.033,2.493,4.215,3.45,2.514,4.268,46.8,291,420,712,4410,0.79,14.62,3.15,25000,55,1.76,31,110,280,580,950,1618,1204,5.5,7.7,28,11900,10000,12600,9700,13200,20500,20900,27600,17900,11900,11700,11000,8400,7600,24900,24900],["Vienna",100.6,88.8,81.3,72.1,80.2,70.8,1786,25,13,8,8,46,830,1.686,2.203,3.223,0.401,1.69,3.6,70.3,503,680,945,5560,2.59,42.03,17.27,29800,453,1.8,47,140,360,980,1040,2486,1424,17.8,26.1,29,44700,42900,34100,29500,56200,49000,96100,82900,69800,49100,49900,30000,25400,32600,72500,72500]];
function makeMapData(rawData) {
var mapData = [];
for (var i = 0; i < rawData.length; i++) {
var geoCoord = geoCoordMap[rawData[i][0]];
if (geoCoord) {
mapData.push({
name: rawData[i][0],
value: geoCoord.concat(rawData[i].slice(1))
});
}
}
return mapData;
};
option = {
animation: false,
backgroundColor: new echarts.graphic.RadialGradient(0.5, 0.5, 0.4, [{
offset: 0,
color: '#4b5769'
}, {
offset: 1,
color: '#404a59'
}]),
title: {
text: 'Inflation from 2006 to 2011',
subtext: 'data from macrofocus',
sublink: 'https://www.macrofocus.com/public/products/infoscope/datasets/pricesandearnings/',
left: 10,
top: 5,
itemGap: 0,
textStyle: {
color: '#eee'
}
},
tooltip: {
trigger: 'axis',
confine: true
},
geo: {
map: 'world',
silent: true,
roam: false,
zoom: 8.9090909090909091,
center: [11.48534081107986, 48.55595569334055],
label: {
emphasis: {
show: false,
areaColor: '#eee'
}
},
itemStyle: {
normal: {
borderWidth: 0.2,
borderColor: '#404a59'
}
},
itemStyle: {
normal: {
areaColor: '#323c48',
borderColor: '#111'
},
emphasis: {
areaColor: '#2a333d'
}
}
},
series: []
};
myChart.setOption(option);
function renderEachCity() {
var option = {xAxis: [], yAxis: [], grid: [], series: []};
var inflationStartIdx = 14;
var inflationYearCount = 6;
var inflationYearStart = '2006';
var xAxisCategory = [];
for (var i = 0; i < inflationYearCount; i++) {
xAxisCategory.push((+inflationYearStart + i) + '');
}
echarts.util.each(rawData, function (dataItem, idx) {
var geoCoord = geoCoordMap[dataItem[0]];
var coord = myChart.convertToPixel('geo', geoCoord);
var boundL = -12.782788213627585;
var boundR = 35.92763028872384;
var boundT = 32.22854555899493;
var boundB = 95.18817097360194;
if (!coord
|| geoCoord[0] < boundL
|| geoCoord[0] > boundR
|| geoCoord[1] > boundB
|| geoCoord[1] < boundT
) {
return;
}
idx += '';
inflationData = [];
for (var k = 0; k < inflationYearCount; k++) {
inflationData.push(dataItem[inflationStartIdx + k]);
}
option.xAxis.push({
id: idx,
gridId: idx,
type: 'category',
name: dataItem[0],
nameStyle: {
color: '#ddd',
fontSize: 12
},
nameLocation: 'middle',
nameGap: 3,
splitLine: {show: false},
axisTick: {show: false},
axisLabel: {show: false},
axisLine: {
onZero: false,
lineStyle: {
color: '#bbb'
}
},
data: xAxisCategory,
z: 100
});
option.yAxis.push({
id: idx,
gridId: idx,
splitLine: {show: false},
axisTick: {show: false},
axisLabel: {show: false},
axisLine: {
lineStyle: {
color: '#bbb'
}
},
z: 100
});
option.grid.push({
id: idx,
width: 50,
height: 30,
left: coord[0] - 25,
top: coord[1] - 15,
z: 100
});
option.series.push({
id: idx,
name: dataItem[0],
type: 'line',
xAxisId: idx,
yAxisId: idx,
data: inflationData,
z: 100
});
});
myChart.setOption(option);
}
setTimeout(renderEachCity, 10);
var throttledRenderEachCity = echarts.throttle(renderEachCity, 130);
myChart.on('geoRoam', throttledRenderEachCity);
</script>
</body>
</html>