Skip to content

Instantly share code, notes, and snippets.

@eesur
Last active February 22, 2018 14:02
Show Gist options
  • Save eesur/ab15ed547c801d45c6a0918cbccff944 to your computer and use it in GitHub Desktop.
Save eesur/ab15ed547c801d45c6a0918cbccff944 to your computer and use it in GitHub Desktop.
d3 | dorling / bubble map (force & voronoi)
license: mit
height: 500
border: no

dorling map / bubble map which is an improved and simplified version of a previous block/version

Chart maps countries utilising longitude and latitude co-ordinates applied with a force network. Voronoi grid applied to improve the chart's interactive experience in selecting countries and prevent jumping/flashing. Note: Grid is invisible in production.

notes:

// longitude and latitude for each country
const coordinates = {
'ALB': [20, 41],
'DZA': [3, 28],
'ASM': [-170, -14.3333],
'AND': [1.6, 42.5],
'AGO': [18.5, -12.5],
'AIA': [-63.1667, 18.25],
'ATA': [0, -90],
'ATG': [-61.8, 17.05],
'ARG': [-64, -34],
'ARM': [45, 40],
'ABW': [-69.9667, 12.5],
'AUS': [133, -27],
'AUT': [13.3333, 47.3333],
'AZE': [47.5, 40.5],
'BHS': [-76, 24.25],
'BHR': [50.55, 26],
'BGD': [90, 24],
'BRB': [-59.5333, 13.1667],
'BLR': [28, 53],
'BEL': [4, 50.8333],
'BLZ': [-88.75, 17.25],
'BEN': [2.25, 9.5],
'BMU': [-64.75, 32.3333],
'BTN': [90.5, 27.5],
'BOL': [-65, -17],
'BIH': [18, 44],
'BWA': [24, -22],
'BVT': [3.4, -54.4333],
'BRA': [-55, -10],
'IOT': [71.5, -6],
'BRN': [114.6667, 4.5],
'BGR': [25, 43],
'BFA': [-2, 13],
'BDI': [30, -3.5],
'KHM': [105, 13],
'CMR': [12, 6],
'CAN': [-95, 60],
'CPV': [-24, 16],
'CYM': [-80.5, 19.5],
'CAF': [21, 7],
'TCD': [19, 15],
'CHL': [-71, -30],
'CHN': [105, 35],
'CXR': [105.6667, -10.5],
'CCK': [96.8333, -12.5],
'COL': [-72, 4],
'COM': [44.25, -12.1667],
'COG': [15, -1],
'COD': [25, 0],
'COK': [-159.7667, -21.2333],
'CRI': [-84, 10],
'CIV': [-5, 8],
'HRV': [15.5, 45.1667],
'CUB': [-80, 21.5],
'CYP': [33, 35],
'CZE': [15.5, 49.75],
'DNK': [10, 56],
'DJI': [43, 11.5],
'DMA': [-61.3333, 15.4167],
'DOM': [-70.6667, 19],
'ECU': [-77.5, -2],
'EGY': [30, 27],
'SLV': [-88.9167, 13.8333],
'GNQ': [10, 2],
'ERI': [39, 15],
'EST': [26, 59],
'ETH': [38, 8],
'FLK': [-59, -51.75],
'FRO': [-7, 62],
'FJI': [175, -18],
'FIN': [26, 64],
'FRA': [2, 46],
'GUF': [-53, 4],
'PYF': [-140, -15],
'ATF': [67, -43],
'GAB': [11.75, -1],
'GMB': [-16.5667, 13.4667],
'GEO': [43.5, 42],
'DEU': [9, 51],
'GHA': [-2, 8],
'GIB': [-5.3667, 36.1833],
'GRC': [22, 39],
'GRL': [-40, 72],
'GRD': [-61.6667, 12.1167],
'GLP': [-61.5833, 16.25],
'GUM': [144.7833, 13.4667],
'GTM': [-90.25, 15.5],
'GGY': [-2.56, 49.5],
'GIN': [-10, 11],
'GNB': [-15, 12],
'GUY': [-59, 5],
'HTI': [-72.4167, 19],
'HMD': [72.5167, -53.1],
'VAT': [12.45, 41.9],
'HND': [-86.5, 15],
'HKG': [114.1667, 22.25],
'HUN': [20, 47],
'ISL': [-18, 65],
'IND': [77, 20],
'IDN': [120, -5],
'IRN': [53, 32],
'IRQ': [44, 33],
'IRL': [-8, 53],
'IMN': [-4.55, 54.23],
'ISR': [34.75, 31.5],
'ITA': [12.8333, 42.8333],
'JAM': [-77.5, 18.25],
'JPN': [138, 36],
'JEY': [-2.13, 49.21],
'JOR': [36, 31],
'KAZ': [68, 48],
'KEN': [38, 1],
'KIR': [173, 1.4167],
'PRK': [127, 40],
'KOR': [127.5, 37],
'KWT': [47.6581, 29.3375],
'KGZ': [75, 41],
'LAO': [105, 18],
'LVA': [25, 57],
'LBN': [35.8333, 33.8333],
'LSO': [28.5, -29.5],
'LBR': [-9.5, 6.5],
'LBY': [17, 25],
'LIE': [9.5333, 47.1667],
'LTU': [24, 56],
'LUX': [6.1667, 49.75],
'MAC': [113.55, 22.1667],
'MKD': [22, 41.8333],
'MDG': [47, -20],
'MWI': [34, -13.5],
'MYS': [112.5, 2.5],
'MDV': [73, 3.25],
'MLI': [-4, 17],
'MLT': [14.5833, 35.8333],
'MHL': [168, 9],
'MTQ': [-61, 14.6667],
'MRT': [-12, 20],
'MUS': [57.55, -20.2833],
'MYT': [45.1667, -12.8333],
'MEX': [-102, 23],
'FSM': [158.25, 6.9167],
'MDA': [29, 47],
'MCO': [7.4, 43.7333],
'MNG': [105, 46],
'MNE': [19, 42],
'MSR': [-62.2, 16.75],
'MAR': [-5, 32],
'MOZ': [35, -18.25],
'MMR': [98, 22],
'NAM': [17, -22],
'NRU': [166.9167, -0.5333],
'NPL': [84, 28],
'NLD': [5.75, 52.5],
'ANT': [-68.75, 12.25],
'NCL': [165.5, -21.5],
'NZL': [174, -41],
'NIC': [-85, 13],
'NER': [8, 16],
'NGA': [8, 10],
'NIU': [-169.8667, -19.0333],
'NFK': [167.95, -29.0333],
'MNP': [145.75, 15.2],
'NOR': [10, 62],
'OMN': [57, 21],
'PAK': [70, 30],
'PLW': [134.5, 7.5],
'PSE': [35.25, 32],
'PAN': [-80, 9],
'PNG': [147, -6],
'PRY': [-58, -23],
'PER': [-76, -10],
'PHL': [122, 13],
'PCN': [-127.4, -24.7],
'POL': [20, 52],
'PRT': [-8, 39.5],
'PRI': [-66.5, 18.25],
'QAT': [51.25, 25.5],
'REU': [55.6, -21.1],
'ROU': [25, 46],
'RUS': [100, 60],
'RWA': [30, -2],
'SHN': [-5.7, -15.9333],
'KNA': [-62.75, 17.3333],
'LCA': [-61.1333, 13.8833],
'SPM': [-56.3333, 46.8333],
'VCT': [-61.2, 13.25],
'WSM': [-172.3333, -13.5833],
'SMR': [12.4167, 43.7667],
'STP': [7, 1],
'SAU': [45, 25],
'SEN': [-14, 14],
'SRB': [21, 44],
'SYC': [55.6667, -4.5833],
'SLE': [-11.5, 8.5],
'SGP': [103.8, 1.3667],
'SVK': [19.5, 48.6667],
'SVN': [15, 46],
'SLB': [159, -8],
'SOM': [49, 10],
'ZAF': [24, -29],
'SGS': [-37, -54.5],
'ESP': [-4, 40],
'LKA': [81, 7],
'SDN': [30, 15],
'SUR': [-56, 4],
'SJM': [20, 78],
'SWZ': [31.5, -26.5],
'SWE': [15, 62],
'CHE': [8, 47],
'SYR': [38, 35],
'TWN': [121, 23.5],
'TJK': [71, 39],
'TZA': [35, -6],
'THA': [100, 15],
'TLS': [125.5167, -8.55],
'TGO': [1.1667, 8],
'TKL': [-172, -9],
'TON': [-175, -20],
'TTO': [-61, 11],
'TUN': [9, 34],
'TUR': [35, 39],
'TKM': [60, 40],
'TCA': [-71.5833, 21.75],
'TUV': [178, -8],
'UGA': [32, 1],
'UKR': [32, 49],
'ARE': [54, 24],
'GBR': [-2, 54],
'USA': [-97, 38],
'UMI': [166.6, 19.2833],
'URY': [-56, -33],
'UZB': [64, 41],
'VUT': [167, -16],
'VEN': [-66, 8],
'VNM': [106, 16],
'VGB': [-64.5, 18.5],
'VIR': [-64.8333, 18.3333],
'WLF': [-176.2, -13.3],
'ESH': [-13, 24.5],
'YEM': [48, 15],
'ZMB': [30, -15],
'ZWE': [30, -20],
'AFG': [65, 33]
}
export default coordinates
*{box-sizing:border-box}body{font-family:-apple-system,monospace;color:#454545;width:960px;background:#f4f4f4;margin:0 auto}svg{fill:none;margin-top:-8px}h1.info{font-weight:400;font-size:18px;position:relative;top:10px;left:10px}circle:hover{opacity:.7}.nodes text{font-size:12px;font-weight:700;font-family:Consolas,monaco,monospace;fill:#f4f4f4;letter-spacing:2px}
!function(n){function g(C){if(I[C])return I[C].exports;var B=I[C]={i:C,l:!1,exports:{}};return n[C].call(B.exports,B,B.exports,g),B.l=!0,B.exports}var I={};g.m=n,g.c=I,g.i=function(n){return n},g.d=function(n,I,C){g.o(n,I)||Object.defineProperty(n,I,{configurable:!1,enumerable:!0,get:C})},g.n=function(n){var I=n&&n.__esModule?function(){return n.default}:function(){return n};return g.d(I,"a",I),I},g.o=function(n,g){return Object.prototype.hasOwnProperty.call(n,g)},g.p="",g(g.s=4)}([function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // renders component\n\n\nvar _nodesData = __webpack_require__(3);\n\nvar _nodesData2 = _interopRequireDefault(_nodesData);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar d3 = window.d3;\n\nfunction dorlingMap(bind, data, config) {\n config = _extends({\n width: 960,\n height: 500,\n padding: 5,\n gravity: 20,\n colorPoints: '#f77e5e',\n colorVoronoi: '#3dbd5d',\n margin: {\n top: 10,\n right: 10,\n bottom: 40,\n left: 10\n }\n }, config);\n var _config = config,\n margin = _config.margin,\n width = _config.width,\n height = _config.height,\n padding = _config.padding;\n // helpers (so can add legends etc)\n\n var w = width - margin.left - margin.right;\n var h = height - margin.top - margin.bottom;\n // scales\n var sizeScale = d3.scaleSqrt().domain([0, d3.max(data, function (d) {\n return d.value;\n })]).range([0, 80]);\n\n // create svg in passed in div\n var svg = d3.select(bind).append('svg').attr('class', 'dorling-chart').attr('width', width).attr('height', height).append('g').attr('transform', 'translate(' + margin.left + ', ' + margin.top + ')');\n\n // format the data to include geo positions\n var nodesData = (0, _nodesData2.default)(data, {\n sizeScale: sizeScale,\n width: w,\n height: h\n });\n console.log('nodesData', nodesData);\n\n // set up simulations\n var simulation = d3.forceSimulation().force('charge', d3.forceManyBody().strength(30)).force('center', d3.forceCenter(w / 2, h / 2)).force('collision', d3.forceCollide().radius(function (d) {\n return d.radius + padding;\n })).force('x', d3.forceX().x(function (d) {\n return d.cx;\n })).force('y', d3.forceY().y(function (d) {\n return d.cy;\n }));\n\n // use a group for circles and text placement\n var nodes = svg.selectAll('.node-group').data(nodesData).enter().append('g').attr('class', function (d, i) {\n return 'nodes g-circles-' + i;\n });\n\n // append bubbles\n nodes.append('circle').attr('r', function (d) {\n return d.radius;\n }).attr('class', function (d, i) {\n return ' c-' + i;\n }).style('fill', config.colorPoints).style('pointer-events', 'none');\n\n // labels for each circle\n nodes.append('text').style('text-anchor', 'middle').attr('dy', 5).attr('class', 'country-labels')\n // show the text only if the circle is large enough\n .text(function (d) {\n return d.radius > 15 ? d.alias : '';\n }).style('pointer-events', 'none');\n\n // setup voronoi\n var voronoi = d3.voronoi().x(function (d) {\n return d.x;\n }).y(function (d) {\n return d.y;\n }).extent([[-100, -20], [width, height]]);\n // voronoi container\n var voronoiGroup = svg.append('g').attr('class', 'voronoi');\n\n // run simulation\n simulation.nodes(nodesData).on('tick', ticked);\n\n // position the groups to geo data positions\n function ticked() {\n nodes.attr('transform', function (d) {\n return 'translate(' + d.x + ', ' + d.y + ')';\n });\n // keep the voronoi in sync with force\n voronoi.x(function (d) {\n return d.x;\n }).y(function (d) {\n return d.y;\n });\n voronoiGroup.selectAll('path').data(voronoi(nodesData).polygons()).enter().append('path');\n voronoiGroup.selectAll('path').attr('d', renderCell).attr('stroke', config.colorVoronoi).style('pointer-events', 'all').attr('class', function (d, i) {\n return ' v-' + i;\n }).on('mouseover', mouseOverEvent).on('click', clickEvent);\n }\n\n // voronoi path\n function renderCell(d) {\n return d == null ? null : 'M' + d.join('L') + 'Z';\n }\n // events just for some feedback/interaction\n function mouseOverEvent(d, i) {\n // show the info\n d3.select('.info').text(nodesData[i].label + ' : ' + nodesData[i].value);\n // make a visual change\n svg.selectAll('circle').style('fill', config.colorPoints).interrupt().filter('circle.c-' + i).transition().duration(150).ease(d3.easeLinear).style('fill', config.colorVoronoi);\n }\n function clickEvent(d, i) {\n console.log('nodesData[i]', nodesData[i]);\n }\n}\n\nexports.default = dorlingMap;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9kb3JsaW5nTWFwLmpzPzkyMDgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gcmVuZGVycyBjb21wb25lbnRcbmltcG9ydCBmb3JtYXREYXRhIGZyb20gJy4vbm9kZXNEYXRhJ1xuY29uc3QgZDMgPSB3aW5kb3cuZDNcblxuZnVuY3Rpb24gZG9ybGluZ01hcCAoYmluZCwgZGF0YSwgY29uZmlnKSB7XG4gIGNvbmZpZyA9IHtcbiAgICB3aWR0aDogOTYwLFxuICAgIGhlaWdodDogNTAwLFxuICAgIHBhZGRpbmc6IDUsXG4gICAgZ3Jhdml0eTogMjAsXG4gICAgY29sb3JQb2ludHM6ICcjZjc3ZTVlJyxcbiAgICBjb2xvclZvcm9ub2k6ICcjM2RiZDVkJyxcbiAgICBtYXJnaW46IHtcbiAgICAgIHRvcDogMTAsXG4gICAgICByaWdodDogMTAsXG4gICAgICBib3R0b206IDQwLFxuICAgICAgbGVmdDogMTBcbiAgICB9LFxuICAgIC4uLmNvbmZpZ1xuICB9XG4gIGNvbnN0IHsgbWFyZ2luLCB3aWR0aCwgaGVpZ2h0LCBwYWRkaW5nIH0gPSBjb25maWdcbiAgLy8gaGVscGVycyAoc28gY2FuIGFkZCBsZWdlbmRzIGV0YylcbiAgY29uc3QgdyA9IHdpZHRoIC0gbWFyZ2luLmxlZnQgLSBtYXJnaW4ucmlnaHRcbiAgY29uc3QgaCA9IGhlaWdodCAtIG1hcmdpbi50b3AgLSBtYXJnaW4uYm90dG9tXG4gIC8vIHNjYWxlc1xuICBjb25zdCBzaXplU2NhbGUgPSBkMy5zY2FsZVNxcnQoKVxuICAgIC5kb21haW4oWzAsIGQzLm1heChkYXRhLCBkID0+IGQudmFsdWUpXSlcbiAgICAucmFuZ2UoWzAsIDgwXSlcblxuICAvLyBjcmVhdGUgc3Z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TtBQUNBO0FBSkE7QUFQQTtBQURBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFpQkE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBT0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUhBO0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFHQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFHQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBQUE7QUFDQTtBQUdBO0FBQ0E7QUFJQTtBQUpBO0FBS0E7QUFBQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUFBO0FBS0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBR0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBR0E7QUFJQTtBQUFBO0FBR0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBUUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar sampleData = {\n data: [{\n label: 'China',\n alias: 'CHN',\n continent: 'Asia',\n value: 200\n }, {\n label: 'United States of America',\n alias: 'USA',\n continent: 'North America',\n value: 170\n }, {\n label: 'Japan',\n alias: 'JPN',\n continent: 'Asia',\n value: 89\n }, {\n label: 'Russian Federation',\n alias: 'RUS',\n continent: 'Europe',\n value: 59\n }, {\n label: 'Germany',\n alias: 'DEU',\n continent: 'Europe',\n value: 48\n }, {\n label: 'Republic of Korea',\n alias: 'KOR',\n continent: 'Asia',\n value: 43\n }, {\n label: 'France',\n alias: 'FRA',\n continent: 'Europe',\n value: 35\n }, {\n label: 'United Kingdom of Great Britain and Northern Ireland',\n alias: 'GBR',\n continent: 'Europe',\n value: 35\n }, {\n label: 'India',\n alias: 'IND',\n continent: 'Asia',\n value: 26\n }, {\n label: 'Canada',\n alias: 'CAN',\n continent: 'North America',\n value: 21\n }, {\n label: 'Brazil',\n alias: 'BRA',\n continent: 'South America',\n value: 18\n }, {\n label: 'Spain',\n alias: 'ESP',\n continent: 'Europe',\n value: 16\n }, {\n label: 'Italy',\n alias: 'ITA',\n continent: 'Europe',\n value: 15\n }, {\n label: 'Australia',\n alias: 'AUS',\n continent: 'Oceania',\n value: 12\n }, {\n label: 'Turkey',\n alias: 'TUR',\n continent: 'Asia',\n value: 12\n }, {\n label: 'Netherlands',\n alias: 'NLD',\n continent: 'Europe',\n value: 9\n }, {\n label: 'Poland',\n alias: 'POL',\n continent: 'Europe',\n value: 9\n }, {\n label: 'Israel',\n alias: 'ISR',\n continent: 'Asia',\n value: 8\n }, {\n label: 'Sweden',\n alias: 'SWE',\n continent: 'Europe',\n value: 8\n }, {\n label: 'Iran (Islamic Republic of)',\n alias: 'IRN',\n continent: 'Asia',\n value: 7\n }, {\n label: 'Ukraine',\n alias: 'UKR',\n continent: 'Europe',\n value: 7\n }, {\n label: 'Malaysia',\n alias: 'MYS',\n continent: 'Asia',\n value: 7\n }, {\n label: 'Argentina',\n alias: 'ARG',\n continent: 'South America',\n value: 6\n }, {\n label: 'Egypt',\n alias: 'EGY',\n continent: 'Africa',\n value: 6\n }, {\n label: 'Mexico',\n alias: 'MEX',\n continent: 'North America',\n value: 6\n }, {\n label: 'Belgium',\n alias: 'BEL',\n continent: 'Europe',\n value: 6\n }, {\n label: 'Portugal',\n alias: 'PRT',\n continent: 'Europe',\n value: 5\n }, {\n label: 'Denmark',\n alias: 'DNK',\n continent: 'Europe',\n value: 5\n }, {\n label: 'Austria',\n alias: 'AUT',\n continent: 'Europe',\n value: 5\n }, {\n label: 'Finland',\n alias: 'FIN',\n continent: 'Europe',\n value: 5\n }, {\n label: 'Thailand',\n alias: 'THA',\n continent: 'Asia',\n value: 4\n }, {\n label: 'Switzerland',\n alias: 'CHE',\n continent: 'Europe',\n value: 4\n }, {\n label: 'Czech Republic',\n alias: 'CZE',\n continent: 'Europe',\n value: 4\n }, {\n label: 'Singapore',\n alias: 'SGP',\n continent: 'Asia',\n value: 4\n }, {\n label: 'Pakistan',\n alias: 'PAK',\n continent: 'Asia',\n value: 4\n }, {\n label: 'Greece',\n alias: 'GRC',\n continent: 'Europe',\n value: 3\n }, {\n label: 'Norway',\n alias: 'NOR',\n continent: 'Europe',\n value: 3\n }, {\n label: 'Morocco',\n alias: 'MAR',\n continent: 'Africa',\n value: 3\n }, {\n label: 'Hungary',\n alias: 'HUN',\n continent: 'Europe',\n value: 3\n }, {\n label: 'South Africa',\n alias: 'ZAF',\n continent: 'Africa',\n value: 2\n }, {\n label: 'Indonesia',\n alias: 'IND',\n continent: 'Asia',\n value: 2\n }, {\n label: 'China, Hong Kong Special Administrative Region',\n alias: 'HKG',\n continent: 'Asia',\n value: 2\n }, {\n label: 'Romania',\n alias: 'ROU',\n continent: 'Europe',\n value: 2\n }, {\n label: 'New Zealand',\n alias: 'NZL',\n continent: 'Oceania',\n value: 2\n }, {\n label: 'Ireland',\n alias: 'IRL',\n continent: 'Europe',\n value: 2\n }, {\n label: 'Tunisia',\n alias: 'TUN',\n continent: 'Africa',\n value: 2\n }, {\n label: 'Uzbekistan',\n alias: 'UZB',\n continent: 'Asia',\n value: 2\n }, {\n label: 'Slovakia',\n alias: 'SVK',\n continent: 'Europe',\n value: 1\n }, {\n label: 'Iraq',\n alias: 'IRQ',\n continent: 'Asia',\n value: 1\n }, {\n label: 'Kazakhstan',\n alias: 'KAZ',\n continent: 'Asia',\n value: 1\n }, {\n label: 'Serbia',\n alias: 'SRB',\n continent: 'Europe',\n value: 1\n }, {\n label: 'Bulgaria',\n alias: 'BGR',\n continent: 'Europe',\n value: 1\n }, {\n label: 'Viet Nam',\n alias: 'VNM',\n continent: 'Asia',\n value: 1\n }, {\n label: 'Kenya',\n alias: 'KEN',\n continent: 'Africa',\n value: 1\n }, {\n label: 'Jordan',\n alias: 'JOR',\n continent: 'Asia',\n value: 1\n }, {\n label: 'Slovenia',\n alias: 'SVN',\n continent: 'Europe',\n value: 1\n }, {\n label: 'Venezuela (Bolivarian Republic of)',\n alias: 'VEN',\n continent: 'South America',\n value: 1\n }, {\n label: 'Lithuania',\n alias: 'LTU',\n continent: 'Europe',\n value: 1\n }, {\n label: 'Colombia',\n alias: 'COL',\n continent: 'South America',\n value: 1\n }]\n};\n\nexports.default = sampleData;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zYW1wbGVEYXRhLmpzPzM5N2YiXSwic291cmNlc0NvbnRlbnQiOlsiY29uc3Qgc2FtcGxlRGF0YSA9IHtcbiAgZGF0YTogW1xuICAgIHtcbiAgICAgIGxhYmVsOiAnQ2hpbmEnLFxuICAgICAgYWxpYXM6ICdDSE4nLFxuICAgICAgY29udGluZW50OiAnQXNpYScsXG4gICAgICB2YWx1ZTogMjAwXG4gICAgfSxcbiAgICB7XG4gICAgICBsYWJlbDogJ1VuaXRlZCBTdGF0ZXMgb2YgQW1lcmljYScsXG4gICAgICBhbGlhczogJ1VTQScsXG4gICAgICBjb250aW5lbnQ6ICdOb3J0aCBBbWVyaWNhJyxcbiAgICAgIHZhbHVlOiAxNzBcbiAgICB9LFxuICAgIHtcbiAgICAgIGxhYmVsOiAnSmFwYW4nLFxuICAgICAgYWxpYXM6ICdKUE4nLFxuICAgICAgY29udGluZW50OiAnQXNpYScsXG4gICAgICB2YWx1ZTogODlcbiAgICB9LFxuICAgIHtcbiAgICAgIGx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hczogJ1NXRScsXG4gICAgICBjb250aW5lbnQ6ICdFdXJvcGUnLFxuICAgICAgdmFsdWU6IDhcbiAgICB9LFxuICAgIHtcbiAgICAgIGxhYmVsOiAnSXJhbiAoSXNsYW1pYyBSZXB1YmxpYyBvZiknLFxuICAgICAgYWxpYXM6ICdJUk4nLFxuICAgICAgY29udGluZW50OiAnQXNpYScsXG4gICAgICB2YWx1ZTogN1xuICAgIH0sXG4gICAge1xuICAgICAgbGFiZWw6ICdVa3JhaW5lJyxcbiAgICAgIGFsaWFzOiAnVUtSJyxcbiAgICAgIGNvbnRpbmVudDogJ0V1cm9wZScsXG4gICAgICB2YWx1ZTogN1xuICAgIH0sXG4gICAge1xuICAgICAgbGFiZWw6ICdNYWxheXNpYScsXG4gICAgICBhbGlhczogJ01ZUycsXG4gICAgICBjb250aW5lbnQ6ICdBc2lhJyxcbiAgICAgIHZhbHVlOiA3XG4gICAgfSxcbiAgICB7XG4gICAgICBsYWJlbDogJ0FyZ2VudGluYScsXG4gICAgICBhbGlhczogJ0FSRycsXG4gICAgICBjb250aW5lbnQ6ICdTb3V0aCBBbWVyaWNhJyxcbiAgICAgIHZhbHVlOiA2XG4gICAgfSxcbiAgICB7XG4gICAgICBsYWJlbDogJ0VneXB0JyxcbiAgICAgIGFsaWFzOiAnRUdZJyxcbiAgICAgIGNvbnRpbmVudDogJ0FmcmljYScsXG4gICAgICB2YWx1ZTogNlxuICAgIH0sXG4gICAge1xuICAgICAgbGFiZWw6ICdNZXhpY28nLFxuICAgICAgYWxpYXM6ICdNRVgnLFxuICAgICAgY29udGluZW50OiAnTm9ydGggQW1lcmljYScsXG4gICAgICB2YWx1ZTogNlxuICAgIH0sXG4gICAge1xuICAgICAgbGFiZWw6ICdCZWxnaXVtJyxcbiAgICAgIGFsaWFzOiAnQkVMJyxcbiAgICAgIGNvbnRpbmVudDogJ0V1cm9wZScsXG4gICAgICB2YWx1ZTogNlxuICAgIH0sXG4gICAge1xuICAgICAgbGFiZWw6ICdQb3J0dWdhbCcsXG4gICAgICBhbGlhczogJ1BSVCcsXG4gICAgICBjb250aW5lbnQ6ICdFdXJvcGUnLFxuICAgICAgdmFsdWU6IDVcbiAgICB9LFxuICAgIHtcbiAgICAgIGxhYmVsOiAnRGVubWFyaycsXG4gICAgICBhbGlhczogJ0ROSycsXG4gICAgICBjb250aW5lbnQ6ICdFdXJvcGUnLFxuICAgICAgdmFsdWU6IDVcbiAgICB9LFxuICAgIHtcbiAgICAgIGxhYmVsOiAnQXVzdHJpYScsXG4gICAgICBhbGlhczogJ0FVVCcsXG4gICAgICBjb250aW5lbnQ6ICdFdXJvcGUnLFxuICAgICAgdmFsdWU6IDVcbiAgICB9LFxuICAgIHtcbiAgICAgIGxhYmVsOiAnRmlubGFuZCcsXG4gICAgICBhbGlhczogJ0ZJTicsXG4gICAgICBjb250aW5lbnQ6ICdFdXJvcGUnLFxuICAgICAgdmFsdWU6IDVcbiAgICB9LFxuICAgIHtcbiAgICAgIGxhYmVsOiAnVGhhaWxhbmQnLFxuICAgICAgYWxpYXM6ICdUSEEnLFxuICAgICAgY29udGluZW50OiAnQXNpYScsXG4gICAgICB2YWx1ZTogNFxuICAgIH0sXG4gICAge1xuICAgICAgbGFiZWw6ICdTd2l0emVybGFuZCcsXG4gICAgICBhbGlhczogJ0NIRScsXG4gICAgICBjb250aW5lbnQ6ICdFdXJvcGUnLFxuICAgICAgdmFsdWU6IDRcbiAgICB9LFxuICAgIHtcbiAgICAgIGxhYmVsOiAnQ3plY2ggUmVwdWJsaWMnLFxuICAgICAgYWxpYXM6ICdDWkUnLFxuICAgICAgY29udGluZW50OiAnRXVyb3BlJyxcbiAgICAgIHZhbHVlOiA0XG4gICAgfSxcbiAgICB7XG4gICAgICBsYWJlbDogJ1NpbmdhcG9yZScsXG4gICAgICBhbGlhczogJ1NHUCcsXG4gICAgICBjb250aW5lbnQ6ICdBc2lhJyxcbiAgICAgIHZhbHVlOiA0XG4gICAgfSxcbiAgICB7XG4gICAgICBsYWJl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pBO0FBT0E7QUFDQTtBQUNBO0FBQ0E7QUFKQTtBQU9BO0FBQ0E7QUFDQTtBQUNBO0FBSkE7QUFPQTtBQUNBO0FBQ0E7QUFDQTtBQUpBO0FBT0E7QUFDQTtBQUNBO0FBQ0E7QUFKQTtBQU9BO0FBQ0E7QUFDQTtBQUNBO0FBSkE7QUFPQTtBQUNBO0FBQ0E7QUFDQTtBQUpBO0FBT0E7QUFDQTtBQUNBO0FBQ0E7QUFKQTtBQU9BO0FBQ0E7QUFDQTtBQUNBO0FBSkE7QUFPQTtBQUNBO0FBQ0E7QUFDQTtBQUpBO0FBT0E7QUFDQTtBQUNBO0FBQ0E7QUFKQTtBQTlWQTtBQUNBO0FBc1dBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n// longitude and latitude for each country\nvar coordinates = {\n 'ALB': [20, 41],\n 'DZA': [3, 28],\n 'ASM': [-170, -14.3333],\n 'AND': [1.6, 42.5],\n 'AGO': [18.5, -12.5],\n 'AIA': [-63.1667, 18.25],\n 'ATA': [0, -90],\n 'ATG': [-61.8, 17.05],\n 'ARG': [-64, -34],\n 'ARM': [45, 40],\n 'ABW': [-69.9667, 12.5],\n 'AUS': [133, -27],\n 'AUT': [13.3333, 47.3333],\n 'AZE': [47.5, 40.5],\n 'BHS': [-76, 24.25],\n 'BHR': [50.55, 26],\n 'BGD': [90, 24],\n 'BRB': [-59.5333, 13.1667],\n 'BLR': [28, 53],\n 'BEL': [4, 50.8333],\n 'BLZ': [-88.75, 17.25],\n 'BEN': [2.25, 9.5],\n 'BMU': [-64.75, 32.3333],\n 'BTN': [90.5, 27.5],\n 'BOL': [-65, -17],\n 'BIH': [18, 44],\n 'BWA': [24, -22],\n 'BVT': [3.4, -54.4333],\n 'BRA': [-55, -10],\n 'IOT': [71.5, -6],\n 'BRN': [114.6667, 4.5],\n 'BGR': [25, 43],\n 'BFA': [-2, 13],\n 'BDI': [30, -3.5],\n 'KHM': [105, 13],\n 'CMR': [12, 6],\n 'CAN': [-95, 60],\n 'CPV': [-24, 16],\n 'CYM': [-80.5, 19.5],\n 'CAF': [21, 7],\n 'TCD': [19, 15],\n 'CHL': [-71, -30],\n 'CHN': [105, 35],\n 'CXR': [105.6667, -10.5],\n 'CCK': [96.8333, -12.5],\n 'COL': [-72, 4],\n 'COM': [44.25, -12.1667],\n 'COG': [15, -1],\n 'COD': [25, 0],\n 'COK': [-159.7667, -21.2333],\n 'CRI': [-84, 10],\n 'CIV': [-5, 8],\n 'HRV': [15.5, 45.1667],\n 'CUB': [-80, 21.5],\n 'CYP': [33, 35],\n 'CZE': [15.5, 49.75],\n 'DNK': [10, 56],\n 'DJI': [43, 11.5],\n 'DMA': [-61.3333, 15.4167],\n 'DOM': [-70.6667, 19],\n 'ECU': [-77.5, -2],\n 'EGY': [30, 27],\n 'SLV': [-88.9167, 13.8333],\n 'GNQ': [10, 2],\n 'ERI': [39, 15],\n 'EST': [26, 59],\n 'ETH': [38, 8],\n 'FLK': [-59, -51.75],\n 'FRO': [-7, 62],\n 'FJI': [175, -18],\n 'FIN': [26, 64],\n 'FRA': [2, 46],\n 'GUF': [-53, 4],\n 'PYF': [-140, -15],\n 'ATF': [67, -43],\n 'GAB': [11.75, -1],\n 'GMB': [-16.5667, 13.4667],\n 'GEO': [43.5, 42],\n 'DEU': [9, 51],\n 'GHA': [-2, 8],\n 'GIB': [-5.3667, 36.1833],\n 'GRC': [22, 39],\n 'GRL': [-40, 72],\n 'GRD': [-61.6667, 12.1167],\n 'GLP': [-61.5833, 16.25],\n 'GUM': [144.7833, 13.4667],\n 'GTM': [-90.25, 15.5],\n 'GGY': [-2.56, 49.5],\n 'GIN': [-10, 11],\n 'GNB': [-15, 12],\n 'GUY': [-59, 5],\n 'HTI': [-72.4167, 19],\n 'HMD': [72.5167, -53.1],\n 'VAT': [12.45, 41.9],\n 'HND': [-86.5, 15],\n 'HKG': [114.1667, 22.25],\n 'HUN': [20, 47],\n 'ISL': [-18, 65],\n 'IND': [77, 20],\n 'IDN': [120, -5],\n 'IRN': [53, 32],\n 'IRQ': [44, 33],\n 'IRL': [-8, 53],\n 'IMN': [-4.55, 54.23],\n 'ISR': [34.75, 31.5],\n 'ITA': [12.8333, 42.8333],\n 'JAM': [-77.5, 18.25],\n 'JPN': [138, 36],\n 'JEY': [-2.13, 49.21],\n 'JOR': [36, 31],\n 'KAZ': [68, 48],\n 'KEN': [38, 1],\n 'KIR': [173, 1.4167],\n 'PRK': [127, 40],\n 'KOR': [127.5, 37],\n 'KWT': [47.6581, 29.3375],\n 'KGZ': [75, 41],\n 'LAO': [105, 18],\n 'LVA': [25, 57],\n 'LBN': [35.8333, 33.8333],\n 'LSO': [28.5, -29.5],\n 'LBR': [-9.5, 6.5],\n 'LBY': [17, 25],\n 'LIE': [9.5333, 47.1667],\n 'LTU': [24, 56],\n 'LUX': [6.1667, 49.75],\n 'MAC': [113.55, 22.1667],\n 'MKD': [22, 41.8333],\n 'MDG': [47, -20],\n 'MWI': [34, -13.5],\n 'MYS': [112.5, 2.5],\n 'MDV': [73, 3.25],\n 'MLI': [-4, 17],\n 'MLT': [14.5833, 35.8333],\n 'MHL': [168, 9],\n 'MTQ': [-61, 14.6667],\n 'MRT': [-12, 20],\n 'MUS': [57.55, -20.2833],\n 'MYT': [45.1667, -12.8333],\n 'MEX': [-102, 23],\n 'FSM': [158.25, 6.9167],\n 'MDA': [29, 47],\n 'MCO': [7.4, 43.7333],\n 'MNG': [105, 46],\n 'MNE': [19, 42],\n 'MSR': [-62.2, 16.75],\n 'MAR': [-5, 32],\n 'MOZ': [35, -18.25],\n 'MMR': [98, 22],\n 'NAM': [17, -22],\n 'NRU': [166.9167, -0.5333],\n 'NPL': [84, 28],\n 'NLD': [5.75, 52.5],\n 'ANT': [-68.75, 12.25],\n 'NCL': [165.5, -21.5],\n 'NZL': [174, -41],\n 'NIC': [-85, 13],\n 'NER': [8, 16],\n 'NGA': [8, 10],\n 'NIU': [-169.8667, -19.0333],\n 'NFK': [167.95, -29.0333],\n 'MNP': [145.75, 15.2],\n 'NOR': [10, 62],\n 'OMN': [57, 21],\n 'PAK': [70, 30],\n 'PLW': [134.5, 7.5],\n 'PSE': [35.25, 32],\n 'PAN': [-80, 9],\n 'PNG': [147, -6],\n 'PRY': [-58, -23],\n 'PER': [-76, -10],\n 'PHL': [122, 13],\n 'PCN': [-127.4, -24.7],\n 'POL': [20, 52],\n 'PRT': [-8, 39.5],\n 'PRI': [-66.5, 18.25],\n 'QAT': [51.25, 25.5],\n 'REU': [55.6, -21.1],\n 'ROU': [25, 46],\n 'RUS': [100, 60],\n 'RWA': [30, -2],\n 'SHN': [-5.7, -15.9333],\n 'KNA': [-62.75, 17.3333],\n 'LCA': [-61.1333, 13.8833],\n 'SPM': [-56.3333, 46.8333],\n 'VCT': [-61.2, 13.25],\n 'WSM': [-172.3333, -13.5833],\n 'SMR': [12.4167, 43.7667],\n 'STP': [7, 1],\n 'SAU': [45, 25],\n 'SEN': [-14, 14],\n 'SRB': [21, 44],\n 'SYC': [55.6667, -4.5833],\n 'SLE': [-11.5, 8.5],\n 'SGP': [103.8, 1.3667],\n 'SVK': [19.5, 48.6667],\n 'SVN': [15, 46],\n 'SLB': [159, -8],\n 'SOM': [49, 10],\n 'ZAF': [24, -29],\n 'SGS': [-37, -54.5],\n 'ESP': [-4, 40],\n 'LKA': [81, 7],\n 'SDN': [30, 15],\n 'SUR': [-56, 4],\n 'SJM': [20, 78],\n 'SWZ': [31.5, -26.5],\n 'SWE': [15, 62],\n 'CHE': [8, 47],\n 'SYR': [38, 35],\n 'TWN': [121, 23.5],\n 'TJK': [71, 39],\n 'TZA': [35, -6],\n 'THA': [100, 15],\n 'TLS': [125.5167, -8.55],\n 'TGO': [1.1667, 8],\n 'TKL': [-172, -9],\n 'TON': [-175, -20],\n 'TTO': [-61, 11],\n 'TUN': [9, 34],\n 'TUR': [35, 39],\n 'TKM': [60, 40],\n 'TCA': [-71.5833, 21.75],\n 'TUV': [178, -8],\n 'UGA': [32, 1],\n 'UKR': [32, 49],\n 'ARE': [54, 24],\n 'GBR': [-2, 54],\n 'USA': [-97, 38],\n 'UMI': [166.6, 19.2833],\n 'URY': [-56, -33],\n 'UZB': [64, 41],\n 'VUT': [167, -16],\n 'VEN': [-66, 8],\n 'VNM': [106, 16],\n 'VGB': [-64.5, 18.5],\n 'VIR': [-64.8333, 18.3333],\n 'WLF': [-176.2, -13.3],\n 'ESH': [-13, 24.5],\n 'YEM': [48, 15],\n 'ZMB': [30, -15],\n 'ZWE': [30, -20],\n 'AFG': [65, 33]\n};\nexports.default = coordinates;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9jb29yZGluYXRlcy5qcz9hMTc2Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGxvbmdpdHVkZSBhbmQgbGF0aXR1ZGUgZm9yIGVhY2ggY291bnRyeVxuY29uc3QgY29vcmRpbmF0ZXMgPSB7XG4gICdBTEInOiBbMjAsIDQxXSxcbiAgJ0RaQSc6IFszLCAyOF0sXG4gICdBU00nOiBbLTE3MCwgLTE0LjMzMzNdLFxuICAnQU5EJzogWzEuNiwgNDIuNV0sXG4gICdBR08nOiBbMTguNSwgLTEyLjVdLFxuICAnQUlBJzogWy02My4xNjY3LCAxOC4yNV0sXG4gICdBVEEnOiBbMCwgLTkwXSxcbiAgJ0FURyc6IFstNjEuOCwgMTcuMDVdLFxuICAnQVJHJzogWy02NCwgLTM0XSxcbiAgJ0FSTSc6IFs0NSwgNDBdLFxuICAnQUJXJzogWy02OS45NjY3LCAxMi41XSxcbiAgJ0FVUyc6IFsxMzMsIC0yN10sXG4gICdBVVQnOiBbMTMuMzMzMywgNDcuMzMzM10sXG4gICdBWkUnOiBbNDcuNSwgNDAuNV0sXG4gICdCSF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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFuUEE7QUFxUEEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///2\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.default = function (data, config) {\n config = _extends({\n sizeScale: d3.scaleSqrt().domain([0, d3.max(data, function (d) {\n return d.value;\n })]).range([0, 80]),\n width: 800,\n height: 600\n }, config);\n var _config = config,\n sizeScale = _config.sizeScale,\n width = _config.width,\n height = _config.height;\n\n\n var pixelLoc = d3.geoMercator().scale([width * 0.2]).translate([width / 2, height / 2]);\n\n console.log('data', data);\n // map coordinates to values\n data.forEach(function (node, i) {\n node.coordinates = _coordinates2.default[node.alias];\n if (node.coordinates[0]) {\n node.cx = pixelLoc(node.coordinates)[0];\n } else {\n console.warn('can\\'t find coordinates for:', node);\n }\n node.cy = pixelLoc(node.coordinates)[1];\n node.radius = sizeScale(node.value);\n // console.log('------------------------')\n // console.log('node.coordinates[0]', node.coordinates[0])\n // console.log('pixelLoc(node.coordinates)[0]', pixelLoc(node.coordinates)[0])\n // console.log('xScale(pixelLoc(node.coordinates)[0])', xScale(pixelLoc(node.coordinates)[0]))\n // console.log('------------------------')\n });\n return data;\n};\n\nvar _coordinates = __webpack_require__(2);\n\nvar _coordinates2 = _interopRequireDefault(_coordinates);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar d3 = window.d3;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9ub2Rlc0RhdGEuanM/ZWJjYSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY29vcmRpbmF0ZXMgZnJvbSAnLi9jb29yZGluYXRlcydcbmNvbnN0IGQzID0gd2luZG93LmQzXG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIChkYXRhLCBjb25maWcpIHtcbiAgY29uZmlnID0ge1xuICAgIHNpemVTY2FsZTogZDMuc2NhbGVTcXJ0KClcbiAgICAgIC5kb21haW4oWzAsIGQzLm1heChkYXRhLCBkID0+IGQudmFsdWUpXSlcbiAgICAgIC5yYW5nZShbMCwgODBdKSxcbiAgICB3aWR0aDogODAwLFxuICAgIGhlaWdodDogNjAwLFxuICAgIC4uLmNvbmZpZ1xuICB9XG4gIGNvbnN0IHsgc2l6ZVNjYWxlLCB3aWR0aCwgaGVpZ2h0IH0gPSBjb25maWdcblxuICBjb25zdCBwaXhlbExvYyA9IGQzLmdlb01lcmNhdG9yKClcbiAgICAuc2NhbGUoW3dpZHRoICogMC4yXSlcbiAgICAudHJhbnNsYXRlKFt3aWR0aCAvIDIsIGhlaWdodCAvIDJdKVxuXG4gIGNvbnNvbGUubG9nKCdkYXRhJywgZGF0YSlcbiAgLy8gbWFwIGNvb3JkaW5hdGVzIHRvIHZhbHVlc1xuICBkYXRhLmZvckVhY2goKG5vZGUsIGkpID0+IHtcbiAgICBub2RlLmNvb3JkaW5hdGVzID0gY29vcmRpbmF0ZXNbbm9kZS5hbGlhc11cbiAgICBpZi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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQXJDQTtBQUNBOzs7OztBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///3\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nvar _dorlingMap = __webpack_require__(0);\n\nvar _dorlingMap2 = _interopRequireDefault(_dorlingMap);\n\nvar _sampleData = __webpack_require__(1);\n\nvar _sampleData2 = _interopRequireDefault(_sampleData);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// render chart\n(0, _dorlingMap2.default)('.chart', _sampleData2.default.data);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zY3JpcHQuanM/OWE5NSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgZG9ybGluZ01hcCBmcm9tICcuL2RvcmxpbmdNYXAnXG5pbXBvcnQgc2FtcGxlRGF0YSBmcm9tICcuL3NhbXBsZURhdGEnXG5cbi8vIHJlbmRlciBjaGFydFxuZG9ybGluZ01hcCgnLmNoYXJ0Jywgc2FtcGxlRGF0YS5kYXRhKVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNjcmlwdC5qcyJdLCJtYXBwaW5ncyI6Ijs7QUFBQTtBQUNBOzs7QUFBQTtBQUNBOzs7OztBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///4\n")}]);
// renders component
import formatData from './nodesData'
const d3 = window.d3
function dorlingMap (bind, data, config) {
config = {
width: 960,
height: 500,
padding: 5,
gravity: 20,
colorPoints: '#f77e5e',
colorVoronoi: '#3dbd5d',
margin: {
top: 10,
right: 10,
bottom: 40,
left: 10
},
...config
}
const { margin, width, height, padding } = config
// helpers (so can add legends etc)
const w = width - margin.left - margin.right
const h = height - margin.top - margin.bottom
// scales
const sizeScale = d3.scaleSqrt()
.domain([0, d3.max(data, d => d.value)])
.range([0, 80])
// create svg in passed in div
const svg = d3.select(bind)
.append('svg')
.attr('class', 'dorling-chart')
.attr('width', width)
.attr('height', height)
.append('g')
.attr('transform', `translate(${margin.left}, ${margin.top})`)
// format the data to include geo positions
const nodesData = formatData(data, {
sizeScale,
width: w,
height: h
})
console.log('nodesData', nodesData)
// set up simulations
const simulation = d3.forceSimulation()
.force('charge', d3.forceManyBody().strength(30))
.force('center', d3.forceCenter(w / 2, h / 2))
.force('collision', d3.forceCollide().radius(d => d.radius + padding))
.force('x', d3.forceX().x(d => d.cx))
.force('y', d3.forceY().y(d => d.cy))
// use a group for circles and text placement
const nodes = svg.selectAll('.node-group')
.data(nodesData)
.enter().append('g')
.attr('class', (d, i) => 'nodes g-circles-' + i)
// append bubbles
nodes.append('circle')
.attr('r', d => d.radius)
.attr('class', (d, i) => ' c-' + i)
.style('fill', config.colorPoints)
.style('pointer-events', 'none')
// labels for each circle
nodes.append('text')
.style('text-anchor', 'middle')
.attr('dy', 5)
.attr('class', 'country-labels')
// show the text only if the circle is large enough
.text(d => (d.radius > 15) ? d.alias : '')
.style('pointer-events', 'none')
// setup voronoi
const voronoi = d3.voronoi()
.x(d => d.x)
.y(d => d.y)
.extent([
[-100, -20],
[width, height]
])
// voronoi container
const voronoiGroup = svg.append('g')
.attr('class', 'voronoi')
// run simulation
simulation
.nodes(nodesData)
.on('tick', ticked)
// position the groups to geo data positions
function ticked () {
nodes
.attr('transform', d => `translate(${d.x}, ${d.y})`)
// keep the voronoi in sync with force
voronoi.x(d => d.x).y(d => d.y)
voronoiGroup.selectAll('path')
.data(voronoi(nodesData).polygons())
.enter().append('path')
voronoiGroup.selectAll('path')
.attr('d', renderCell)
.attr('stroke', config.colorVoronoi)
.style('pointer-events', 'all')
.attr('class', (d, i) => ' v-' + i)
.on('mouseover', mouseOverEvent)
.on('click', clickEvent)
}
// voronoi path
function renderCell (d) {
return d == null ? null : 'M' + d.join('L') + 'Z'
}
// events just for some feedback/interaction
function mouseOverEvent (d, i) {
// show the info
d3.select('.info').text(`${nodesData[i].label} : ${nodesData[i].value}`)
// make a visual change
svg.selectAll('circle')
.style('fill', config.colorPoints)
.interrupt()
.filter(`circle.c-${i}`)
.transition()
.duration(150)
.ease(d3.easeLinear)
.style('fill', config.colorVoronoi)
}
function clickEvent (d, i) {
console.log('nodesData[i]', nodesData[i])
}
}
export default dorlingMap
<!DOCTYPE html>
<title>dorling map</title>
<link href='dist.css' rel='stylesheet' />
<body>
<section>
<h1 class='info'>Roll over for value</h1>
<div class='chart'></div>
</section>
<script src='https://d3js.org/d3.v4.min.js'></script>
<script src='dist.js'></script>
</body>
import coordinates from './coordinates'
const d3 = window.d3
export default function (data, config) {
config = {
sizeScale: d3.scaleSqrt()
.domain([0, d3.max(data, d => d.value)])
.range([0, 80]),
width: 800,
height: 600,
...config
}
const { sizeScale, width, height } = config
const pixelLoc = d3.geoMercator()
.scale([width * 0.2])
.translate([width / 2, height / 2])
console.log('data', data)
// map coordinates to values
data.forEach((node, i) => {
node.coordinates = coordinates[node.alias]
if (node.coordinates[0]) {
node.cx = pixelLoc(node.coordinates)[0]
} else {
console.warn('can\'t find coordinates for:', node)
}
node.cy = pixelLoc(node.coordinates)[1]
node.radius = sizeScale(node.value)
// console.log('------------------------')
// console.log('node.coordinates[0]', node.coordinates[0])
// console.log('pixelLoc(node.coordinates)[0]', pixelLoc(node.coordinates)[0])
// console.log('xScale(pixelLoc(node.coordinates)[0])', xScale(pixelLoc(node.coordinates)[0]))
// console.log('------------------------')
})
return data
}
const sampleData = {
data: [
{
label: 'China',
alias: 'CHN',
continent: 'Asia',
value: 200
},
{
label: 'United States of America',
alias: 'USA',
continent: 'North America',
value: 170
},
{
label: 'Japan',
alias: 'JPN',
continent: 'Asia',
value: 89
},
{
label: 'Russian Federation',
alias: 'RUS',
continent: 'Europe',
value: 59
},
{
label: 'Germany',
alias: 'DEU',
continent: 'Europe',
value: 48
},
{
label: 'Republic of Korea',
alias: 'KOR',
continent: 'Asia',
value: 43
},
{
label: 'France',
alias: 'FRA',
continent: 'Europe',
value: 35
},
{
label: 'United Kingdom of Great Britain and Northern Ireland',
alias: 'GBR',
continent: 'Europe',
value: 35
},
{
label: 'India',
alias: 'IND',
continent: 'Asia',
value: 26
},
{
label: 'Canada',
alias: 'CAN',
continent: 'North America',
value: 21
},
{
label: 'Brazil',
alias: 'BRA',
continent: 'South America',
value: 18
},
{
label: 'Spain',
alias: 'ESP',
continent: 'Europe',
value: 16
},
{
label: 'Italy',
alias: 'ITA',
continent: 'Europe',
value: 15
},
{
label: 'Australia',
alias: 'AUS',
continent: 'Oceania',
value: 12
},
{
label: 'Turkey',
alias: 'TUR',
continent: 'Asia',
value: 12
},
{
label: 'Netherlands',
alias: 'NLD',
continent: 'Europe',
value: 9
},
{
label: 'Poland',
alias: 'POL',
continent: 'Europe',
value: 9
},
{
label: 'Israel',
alias: 'ISR',
continent: 'Asia',
value: 8
},
{
label: 'Sweden',
alias: 'SWE',
continent: 'Europe',
value: 8
},
{
label: 'Iran (Islamic Republic of)',
alias: 'IRN',
continent: 'Asia',
value: 7
},
{
label: 'Ukraine',
alias: 'UKR',
continent: 'Europe',
value: 7
},
{
label: 'Malaysia',
alias: 'MYS',
continent: 'Asia',
value: 7
},
{
label: 'Argentina',
alias: 'ARG',
continent: 'South America',
value: 6
},
{
label: 'Egypt',
alias: 'EGY',
continent: 'Africa',
value: 6
},
{
label: 'Mexico',
alias: 'MEX',
continent: 'North America',
value: 6
},
{
label: 'Belgium',
alias: 'BEL',
continent: 'Europe',
value: 6
},
{
label: 'Portugal',
alias: 'PRT',
continent: 'Europe',
value: 5
},
{
label: 'Denmark',
alias: 'DNK',
continent: 'Europe',
value: 5
},
{
label: 'Austria',
alias: 'AUT',
continent: 'Europe',
value: 5
},
{
label: 'Finland',
alias: 'FIN',
continent: 'Europe',
value: 5
},
{
label: 'Thailand',
alias: 'THA',
continent: 'Asia',
value: 4
},
{
label: 'Switzerland',
alias: 'CHE',
continent: 'Europe',
value: 4
},
{
label: 'Czech Republic',
alias: 'CZE',
continent: 'Europe',
value: 4
},
{
label: 'Singapore',
alias: 'SGP',
continent: 'Asia',
value: 4
},
{
label: 'Pakistan',
alias: 'PAK',
continent: 'Asia',
value: 4
},
{
label: 'Greece',
alias: 'GRC',
continent: 'Europe',
value: 3
},
{
label: 'Norway',
alias: 'NOR',
continent: 'Europe',
value: 3
},
{
label: 'Morocco',
alias: 'MAR',
continent: 'Africa',
value: 3
},
{
label: 'Hungary',
alias: 'HUN',
continent: 'Europe',
value: 3
},
{
label: 'South Africa',
alias: 'ZAF',
continent: 'Africa',
value: 2
},
{
label: 'Indonesia',
alias: 'IND',
continent: 'Asia',
value: 2
},
{
label: 'China, Hong Kong Special Administrative Region',
alias: 'HKG',
continent: 'Asia',
value: 2
},
{
label: 'Romania',
alias: 'ROU',
continent: 'Europe',
value: 2
},
{
label: 'New Zealand',
alias: 'NZL',
continent: 'Oceania',
value: 2
},
{
label: 'Ireland',
alias: 'IRL',
continent: 'Europe',
value: 2
},
{
label: 'Tunisia',
alias: 'TUN',
continent: 'Africa',
value: 2
},
{
label: 'Uzbekistan',
alias: 'UZB',
continent: 'Asia',
value: 2
},
{
label: 'Slovakia',
alias: 'SVK',
continent: 'Europe',
value: 1
},
{
label: 'Iraq',
alias: 'IRQ',
continent: 'Asia',
value: 1
},
{
label: 'Kazakhstan',
alias: 'KAZ',
continent: 'Asia',
value: 1
},
{
label: 'Serbia',
alias: 'SRB',
continent: 'Europe',
value: 1
},
{
label: 'Bulgaria',
alias: 'BGR',
continent: 'Europe',
value: 1
},
{
label: 'Viet Nam',
alias: 'VNM',
continent: 'Asia',
value: 1
},
{
label: 'Kenya',
alias: 'KEN',
continent: 'Africa',
value: 1
},
{
label: 'Jordan',
alias: 'JOR',
continent: 'Asia',
value: 1
},
{
label: 'Slovenia',
alias: 'SVN',
continent: 'Europe',
value: 1
},
{
label: 'Venezuela (Bolivarian Republic of)',
alias: 'VEN',
continent: 'South America',
value: 1
},
{
label: 'Lithuania',
alias: 'LTU',
continent: 'Europe',
value: 1
},
{
label: 'Colombia',
alias: 'COL',
continent: 'South America',
value: 1
}
]
}
export default sampleData
import dorlingMap from './dorlingMap'
import sampleData from './sampleData'
// render chart
dorlingMap('.chart', sampleData.data)
*
box-sizing border-box
body
font-family:-apple-system, monospace
color: #454545
width: 960px
background: #f4f4f4
margin: 0 auto
svg
fill: none
margin-top: -8px
h1.info
font-weight: normal
font-size: 18px
position: relative
top: 10px
left: 10px;
circle:hover
opacity: 0.7
.nodes text
font-size: 12px
font-weight: 700
font-family: Consolas,monaco,monospace
fill: #f4f4f4
letter-spacing: 2px
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment