{"version":3,"sources":["OECD_white_EN.png","index.js","Site.module.css"],"names":["module","exports","ReactGA","initialize","pageview","window","location","search","pathname","mapboxgl","accessToken","colors","top5_list","result","regionTotal","Africa","Americas","Asia","Europe","Oceania","quantile","arr","q","sorted","sort","a","b","asc","pos","length","base","Math","floor","rest","undefined","legend","style","backgroundColor","tooltip","e","payload","className","classes","region","sciScaled","Application","props","onUpdate","ISO2","Name","Region","setState","selectedCountry","sci","sciOriginal","map","state","button","push","start","end","selected","scidata","scidataRank","scidataRankRegion","scidataRankRegionCode","countryData","Object","keys","k","slice","rank_region","v","indexOf","percentile20","sortedSCI","rank_country","top5","round","reduced","reduce","m","d","count","item","numbers","name","matchExpression","forEach","remove","addLayer","id","source","type","filter","paint","on","features","properties","iso_3166_1","getCanvas","cursor","coordinates","lngLat","lng","lat","sciPopup","rankPopup","sciColor","rankPopupRegion","regionNumber","i","popUp","setLngLat","setHTML","name_en","addTo","getElement","color","rendered","obj","removeLayer","moveRegion","activeLabel","flyTo","center","zoom","essential","this","Popup","closeButton","closeOnClick","Map","container","mapContainer","attributionControl","addControl","AttributionControl","customAttribution","addSource","url","prevProps","prevState","topleft","headwrapper","buttonwrapper","buttonActive","onClick","table","regionsel","normal","width","aspect","data","localeCompare","marginTop","dataKey","interval","textAnchor","fontFamily","fill","content","entry","index","key","icon","href","ref","el","logo","src","alt","React","Component","ReactDOM","render","document","getElementById"],"mappings":"w0ZAAAA,EAAOC,QAAU,IAA0B,2C,4QCa3CC,IAAQC,WAAW,kBACnBD,IAAQE,SAASC,OAAOC,SAASC,OAAOF,OAAOC,SAASE,UAKxDC,IAASC,YAAc,wFAGvB,IAAMC,EAAS,CAAC,UAAU,UAAU,UAAU,UAAU,UAAU,UAAU,UAAU,UAAU,WAO5FC,EAAU,CAAC,GAAG,GAAG,GAAG,GAAG,IACvBC,EAAO,GAILC,EAAY,CAACC,OAAO,GAAGC,SAAS,GAAGC,KAAK,GAAGC,OAAO,GAAGC,QAAQ,IAI7DC,EAA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JAC8I,6BAAK,6BACnJ,+CAA4B,6BAF5B,0lBAGulB,6BAAK,6BAH5lB,kTAKF,6BAAK,6BAAK,yHALR,MAOJ,yBAAK5H,UAAU,MACf,uBAAG6H,KAAK,mKACJ,kBAAC,IAAD,CAAcD,KAAK,aACnB,kHAIV,yBAAKE,IAAK,SAAAC,GAAE,OAAI,EAAKlC,aAAekC,GAAI/H,UAAWC,IAAQ4F,eAC3D,yBAAK7F,UAAWC,IAAQP,QAASA,GAC/B,uBAAGmI,KAAK,2BACN,yBAAK7H,UAAWC,IAAQ+H,KAAMC,IAAKD,IAAME,IAAI,sB,GAxa/BC,IAAMC,WA8ahCC,IAASC,OAAO,kBAAClI,EAAD,MAAiBmI,SAASC,eAAe,S,wCCrfzDjL,EAAOC,QAAU,CAAC,aAAe,2BAA2B,QAAU,sBAAsB,OAAS,qBAAqB,MAAQ,oBAAoB,QAAU,sBAAsB,UAAY,wBAAwB,MAAQ,oBAAoB,KAAO,mBAAmB,OAAS,qBAAqB,aAAe,2BAA2B,YAAc,4B","file":"static/js/main.4f3270bf.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/OECD_white_EN.9ef51567.png\";","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport mapboxgl from 'mapbox-gl';\r\nimport sciOriginal from './sci.json';\r\nimport countryData from './country.json';\r\nimport classes from './Site.module.css';\r\nimport { BarChart, Cell, Bar, Tooltip, XAxis,ResponsiveContainer} from 'recharts';\r\nimport ReactGA from 'react-ga';\r\nimport './index.css';\r\nimport logo from './OECD_white_EN.png';\r\nimport MaterialIcon from 'material-icons-react';\r\n\r\n\r\nReactGA.initialize('UA-128268752-1');\r\nReactGA.pageview(window.location.search+window.location.pathname);\r\n\r\n//iso_3166_1_alpha_3\r\n\r\n//// Access token for Africapolis mapbox account\r\nmapboxgl.accessToken = 'pk.eyJ1IjoibWttZCIsImEiOiJjajBqYjJpY2owMDE0Mndsbml0d2V1ZXczIn0.el8wQmA-TSJp2ggX8fJ1rA';\r\n\r\n\r\nconst colors = [\"#F3F2E8\",\"#D4EBE2\",\"#B6E3DB\",\"#97DCD5\",\"#79D5CF\",\"#5ACEC9\",\"#3CC6C2\",\"#1DBFBC\",\"#333333\"]\r\n\r\n\r\n\r\n//////////////////\r\n\r\n// sort array ascending\r\nlet top5_list=[[],[],[],[],[]];\r\nlet result=[];\r\n\r\n\r\n\r\nconst regionTotal={Africa:55,Americas:40,Asia:46,Europe:42,Oceania:12}\r\n\r\nconst asc = arr => arr.sort((a, b) => a - b);\r\n\r\nconst quantile = (arr, q) => {\r\n const sorted = asc(arr);\r\n const pos = (sorted.length - 1) * q;\r\n const base = Math.floor(pos);\r\n const rest = pos - base;\r\n if (sorted[base + 1] !== undefined) {\r\n return sorted[base] + rest * (sorted[base + 1] - sorted[base]);\r\n } else {\r\n return sorted[base];\r\n }\r\n};\r\n\r\nconst legend = (\r\n
\r\n

Social Connectedness

\r\n
{\"< 1x\"} {\"(20th percentile)\"}
\r\n
1-2x
\r\n
2-3x
\r\n
3-5x
\r\n
5-10x
\r\n
10-25x
\r\n
25-100x
\r\n
{\">= 100x\"}
\r\n
{\"Data not available\"}
\r\n
\r\n);\r\n\r\nconst tooltip = e => {\r\n if (e.payload[0]) {\r\n return (
{e.payload[0].payload.region}
SCI {e.payload[0].payload.sciScaled}x
) }\r\n}\r\n\r\n\r\n//// Basic setting of the map\r\nclass Application extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n lng: 40,\r\n lat: 30,\r\n zoom: 2,\r\n selectedCountry: \"NG\",\r\n name: \"\",\r\n region: \"Africa\",\r\n button: \"From\",\r\n rendered: \"\"\r\n };\r\n }\r\n\r\ncomponentDidMount() {\r\n//// Initial map setting\r\n\r\nlet sci=[];\r\nsciOriginal.map(e=>this.state.button===\"From\"? sci.push({start:e.start,end:e.end,sci:e.sci}) : sci.push({end:e.start,start:e.end,sci:e.sci}))\r\n\r\nlet selected = [];\r\nlet scidata= [];\r\nlet scidataRank = [];\r\nlet scidataRankRegion = {Africa:[],Americas:[],Asia:[],Europe:[],Oceania:[]}\r\nlet scidataRankRegionCode = {Africa:[],Americas:[],Asia:[],Europe:[],Oceania:[]}\r\nsci.map(e => e.start===this.state.selectedCountry? selected.push(e) : null)\r\nselected.map(e => {\r\n scidata.push(e.sci)\r\n scidataRank.push(e.sci)\r\n scidataRankRegion[countryData[e.end][1]].push(e.sci)\r\n scidataRankRegionCode[countryData[e.end][1]].push(e.end)\r\n})\r\n\r\n\r\nObject.keys(scidataRankRegion).map(\r\n k => {\r\n let sorted = scidataRankRegion[k].slice().sort((a,b) => b-a);\r\n let rank_region=scidataRankRegion[k].map(v => sorted.indexOf(v)+1);\r\n scidataRankRegion[k]=rank_region\r\n }\r\n )\r\n\r\n this.popUp = new mapboxgl.Popup({\r\n closeButton: false,\r\n closeOnClick: false\r\n });\r\n\r\n this.map = new mapboxgl.Map({\r\n container: this.mapContainer,\r\n style: 'mapbox://styles/mkmd/ckguwdhux0j7719p9rz2hpmpi', /// Select mapstyle from mapbox studio\r\n center: [this.state.lng, this.state.lat],\r\n zoom: this.state.zoom,\r\n attributionControl: false\r\n });\r\n let top5=scidata.sort((a,b) => b-a).slice(0,5);\r\n let sortedSCI=scidata.sort((a,b) => b-a);\r\n let rank_country=scidataRank.map(v => sortedSCI.indexOf(v)+1 );\r\n\r\n let percentile20 = quantile(scidata, .20)\r\n selected.map(e => {\r\n e.region=countryData[e.end][1]\r\n e.sciScaled= Math.round(e.sci/percentile20)\r\n if(e.sci===top5[0]) {top5_list[0]=e}\r\n else if(e.sci===top5[1]) {top5_list[1]=e}\r\n else if(e.sci===top5[2]) {top5_list[2]=e}\r\n else if(e.sci===top5[3]) {top5_list[3]=e}\r\n else if(e.sci===top5[4]) {top5_list[4]=e}\r\n })\r\n // Calculate the sums and group data (while tracking count)\r\n const reduced = selected.reduce(function(m, d){\r\n if(!m[d.region]){\r\n m[d.region] = {...d, count: 1};\r\n return m;\r\n }\r\n m[d.region].sciScaled += d.sciScaled;\r\n m[d.region].count += 1;\r\n return m;\r\n },{});\r\n\r\n // Create new array from grouped data and compute the average\r\n result = Object.keys(reduced).map(function(k){\r\n const item = reduced[k];\r\n return {\r\n region: item.region,\r\n sciScaled: Math.round(item.sciScaled/item.count*100)/100,\r\n }\r\n })\r\n\r\n let matchExpression = ['match', ['get', 'iso_3166_1']];\r\n\r\n // Calculate color values for each country based on 'hdi' value\r\n selected.forEach( e => {\r\n if(e.sci/percentile20 < 1) {matchExpression.push(e['end'], \"#F3F2E8\");}\r\n else if (e.sci/percentile20 < 2) {matchExpression.push(e['end'], \"#D4EBE2\");}\r\n else if (e.sci/percentile20 < 3) {matchExpression.push(e['end'], \"#B6E3DB\");}\r\n else if (e.sci/percentile20 < 5) {matchExpression.push(e['end'], \"#97DCD5\");}\r\n else if (e.sci/percentile20 < 10) {matchExpression.push(e['end'], \"#79D5CF\");}\r\n else if (e.sci/percentile20 < 25) {matchExpression.push(e['end'], \"#5ACEC9\");}\r\n else if (e.sci/percentile20 < 100) {matchExpression.push(e['end'], \"#3CC6C2\");}\r\n else {matchExpression.push(e['end'], \"#1DBFBC\");}\r\n });\r\n\r\n matchExpression.push(this.state.selectedCountry, '#e8ae40');\r\n // Last value is the default, used where there is no data\r\n matchExpression.push('rgba(0, 0, 0, 0)');\r\n // //console.log(this.state.selectedOption, prevState.selectedOption);\r\n\r\n this.map.on('load', () => {\r\n\r\n this.map.addControl(new mapboxgl.AttributionControl({customAttribution: \"Africapolis\"}));\r\n // Add Country shape\r\n this.map.addSource('africapolis_country', { type: 'vector', url: 'mapbox://mapbox.country-boundaries-v1'});\r\n\r\n // Add Country layer\r\n this.map.addLayer({\r\n id: 'country',\r\n source:'africapolis_country',\r\n type: 'fill',\r\n 'source-layer':'country_boundaries',\r\n filter: [ \"match\", [\"get\", \"iso_3166_1\"], [\"TJ\",\"IR\",\"CN\", \"GL\", \"SJ\", \"TM\", \"EH\", \"KP\" ], false, true ],\r\n paint: {\r\n 'fill-color': matchExpression,\r\n 'fill-opacity': 0.9\r\n }\r\n });\r\n\r\n this.map.on('click', 'country', e => {\r\n this.popUp.remove()\r\n this.onUpdate(e.features[0].properties.iso_3166_1,e.features[0].properties.name_en,e.features[0].properties.region)\r\n });\r\n\r\n this.map.on('mousemove', 'country', e => {\r\n if(this.state.selectedCountry!==e.features[0].properties.iso_3166_1) {\r\n this.map.getCanvas().style.cursor = 'pointer';\r\n let coordinates = [e.lngLat.lng, e.lngLat.lat];\r\n let sciPopup=[];\r\n let rankPopup=[];\r\n let sciColor=[];\r\n let rankPopupRegion=[];\r\n let regionNumber=regionTotal[e.features[0].properties.region];\r\n\r\n selected.forEach( (d,i) => {\r\n if(d.end===e.features[0].properties.iso_3166_1) {\r\n sciPopup=Math.round(d.sci/percentile20)\r\n rankPopup=rank_country[i]\r\n\r\n if(d.sci/percentile20 < 1) {sciColor.push(\"#F3F2E8\");}\r\n else if (d.sci/percentile20 < 2) {sciColor.push(\"#D4EBE2\");}\r\n else if (d.sci/percentile20 < 3) {sciColor.push(\"#B6E3DB\");}\r\n else if (d.sci/percentile20 < 5) {sciColor.push(\"#97DCD5\");}\r\n else if (d.sci/percentile20 < 10) {sciColor.push(\"#79D5CF\");}\r\n else if (d.sci/percentile20 < 25) {sciColor.push(\"#5ACEC9\");}\r\n else if (d.sci/percentile20 < 100) {sciColor.push(\"#3CC6C2\");}\r\n else {sciColor.push(\"#1DBFBC\");}\r\n }\r\n });\r\n\r\n if(scidataRankRegionCode[e.features[0].properties.region]) {\r\n scidataRankRegionCode[e.features[0].properties.region].map(\r\n (d,i)=> e.features[0].properties.iso_3166_1===d? rankPopupRegion.push(scidataRankRegion[e.features[0].properties.region][i]) : null\r\n )}\r\n\r\n\r\n \t\tthis.popUp\r\n .setLngLat(coordinates)\r\n \t\t\t.setHTML(\r\n `${e.features[0].properties.name_en} ${sciPopup}x
\r\n Rank:${rankPopup}/194
\r\n In ${e.features[0].properties.region}:${rankPopupRegion}/${regionNumber}`\r\n )\r\n \t\t\t.addTo(this.map);\r\n var popupElem = this.popUp.getElement();\r\n popupElem.style.color = sciColor[0];\r\n } else {this.popUp.remove()}\r\n });\r\n\r\n this.map.on('mouseleave', 'country', e => {\r\n this.map.getCanvas().style.cursor = ''\r\n this.popUp.remove()\r\n });\r\n\r\n });\r\n\r\n this.setState({name: \"Nigeria\"})\r\n\r\n}\r\n\r\ncomponentDidUpdate(prevProps, prevState){\r\n if(prevState.button !== this.state.button)\r\n {this.onUpdate(this.state.selectedCountry, this.state.name, this.state.region)}\r\n}\r\n\r\nonUpdate = (ISO2, Name, Region) => {\r\n\r\n this.setState({selectedCountry:ISO2})\r\n\r\n let sci=[];\r\n sciOriginal.map(e=>this.state.button===\"From\"? sci.push({start:e.start,end:e.end,sci:e.sci}) : sci.push({end:e.start,start:e.end,sci:e.sci}))\r\n\r\n\r\n let selected = [];\r\n let scidata= [];\r\n let scidataRank = [];\r\n let scidataRankRegion = {Africa:[],Americas:[],Asia:[],Europe:[],Oceania:[]}\r\n let scidataRankRegionCode = {Africa:[],Americas:[],Asia:[],Europe:[],Oceania:[]}\r\n sci.map(e => e.start===this.state.selectedCountry? selected.push(e) : null)\r\n selected.map(e => {\r\n scidata.push(e.sci)\r\n scidataRank.push(e.sci)\r\n scidataRankRegion[countryData[e.end][1]].push(e.sci)\r\n scidataRankRegionCode[countryData[e.end][1]].push(e.end)\r\n\r\n })\r\n\r\n\r\n Object.keys(scidataRankRegion).map(\r\n k => {\r\n let sorted = scidataRankRegion[k].slice().sort((a,b) => b-a);\r\n let rank_region=scidataRankRegion[k].map(v => sorted.indexOf(v)+1);\r\n scidataRankRegion[k]=rank_region\r\n }\r\n )\r\n\r\n\r\n let percentile20 = quantile(scidata, .20)\r\n //selected.map(e => e.sci = e.sci/ percentile20)\r\n\r\n let sortedSCI=scidata.sort((a,b) => b-a);\r\n let rank_country=scidataRank.map(v => sortedSCI.indexOf(v)+1 );\r\n let top5=scidata.sort((a,b) => b-a).slice(0,5);\r\n selected.map(e => {\r\n e.region=countryData[e.end][1]\r\n e.sciScaled= Math.round(e.sci/percentile20)\r\n if(e.sci===top5[0]) {top5_list[0]=e}\r\n else if(e.sci===top5[1]) {top5_list[1]=e}\r\n else if(e.sci===top5[2]) {top5_list[2]=e}\r\n else if(e.sci===top5[3]) {top5_list[3]=e}\r\n else if(e.sci===top5[4]) {top5_list[4]=e}\r\n })\r\n\r\n //top5_list.map(e => e.sciScaled= Math.round(e.sci/percentile20))\r\n\r\n // Calculate the sums and group data (while tracking count)\r\n const reduced = selected.reduce(function(m, d){\r\n if(!m[d.region]){\r\n m[d.region] = {...d, count: 1};\r\n return m;\r\n }\r\n m[d.region].sciScaled += d.sciScaled;\r\n m[d.region].count += 1;\r\n return m;\r\n },{});\r\n\r\n // Create new array from grouped data and compute the average\r\n result = Object.keys(reduced).map(function(k){\r\n const item = reduced[k];\r\n return {\r\n region: item.region,\r\n sciScaled: Math.round(item.sciScaled/item.count*100)/100,\r\n numbers:item.count\r\n }\r\n })\r\n\r\n // console.log(JSON.stringify(result,null,4));\r\n\r\n this.setState({name:Name,region:Region})\r\n\r\n let matchExpression = ['match', ['get', 'iso_3166_1']];\r\n\r\n // Calculate color values for each country based on 'hdi' value\r\n selected.forEach( e => {\r\n if(e.sci/percentile20 < 1) {matchExpression.push(e['end'], \"#F3F2E8\");}\r\n else if (e.sci/percentile20 < 2) {matchExpression.push(e['end'], \"#D4EBE2\");}\r\n else if (e.sci/percentile20 < 3) {matchExpression.push(e['end'], \"#B6E3DB\");}\r\n else if (e.sci/percentile20 < 5) {matchExpression.push(e['end'], \"#97DCD5\");}\r\n else if (e.sci/percentile20 < 10) {matchExpression.push(e['end'], \"#79D5CF\");}\r\n else if (e.sci/percentile20 < 25) {matchExpression.push(e['end'], \"#5ACEC9\");}\r\n else if (e.sci/percentile20 < 100) {matchExpression.push(e['end'], \"#3CC6C2\");}\r\n else {matchExpression.push(e['end'], \"#1DBFBC\");}\r\n });\r\n\r\n matchExpression.push(this.state.selectedCountry, '#e8ae40');\r\n // Last value is the default, used where there is no data\r\n matchExpression.push('rgba(0, 0, 0, 0)');\r\n\r\n // //console.log(this.state.selectedOption, prevState.selectedOption);\r\n\r\n this.remove('country');\r\n\r\n this.map.addLayer({\r\n id: 'country',\r\n source:'africapolis_country',\r\n type: 'fill',\r\n filter: [ \"match\", [\"get\", \"iso_3166_1\"], [\"IR\",\"CN\", \"GL\", \"SJ\", \"TM\", \"EH\", \"KP\",\"TJ\" ], false, true ],\r\n 'source-layer':'country_boundaries',\r\n paint: {\r\n 'fill-color': matchExpression,\r\n 'fill-opacity': 0.9\r\n }\r\n });\r\n this.map.on('mousemove', 'country', e => {\r\n if(this.state.selectedCountry!==e.features[0].properties.iso_3166_1) {\r\n this.map.getCanvas().style.cursor = 'pointer';\r\n let coordinates = [e.lngLat.lng, e.lngLat.lat];\r\n let sciPopup=[];\r\n let rankPopup=[];\r\n let sciColor=[];\r\n let rankPopupRegion=[];\r\n let regionNumber=regionTotal[e.features[0].properties.region];\r\n\r\n selected.forEach( (d,i) => {\r\n if(d.end===e.features[0].properties.iso_3166_1) {\r\n sciPopup=Math.round(d.sci/percentile20)\r\n rankPopup=rank_country[i]\r\n\r\n if(d.sci/percentile20 < 1) {sciColor.push(\"#F3F2E8\");}\r\n else if (d.sci/percentile20 < 2) {sciColor.push(\"#D4EBE2\");}\r\n else if (d.sci/percentile20 < 3) {sciColor.push(\"#B6E3DB\");}\r\n else if (d.sci/percentile20 < 5) {sciColor.push(\"#97DCD5\");}\r\n else if (d.sci/percentile20 < 10) {sciColor.push(\"#79D5CF\");}\r\n else if (d.sci/percentile20 < 25) {sciColor.push(\"#5ACEC9\");}\r\n else if (d.sci/percentile20 < 100) {sciColor.push(\"#3CC6C2\");}\r\n else {sciColor.push(\"#1DBFBC\");}\r\n }\r\n });\r\n\r\n if(scidataRankRegionCode[e.features[0].properties.region]) {\r\n scidataRankRegionCode[e.features[0].properties.region].map(\r\n (d,i)=> e.features[0].properties.iso_3166_1===d? rankPopupRegion.push(scidataRankRegion[e.features[0].properties.region][i]) : null\r\n )}\r\n\r\n\r\n this.popUp\r\n .setLngLat(coordinates)\r\n .setHTML(\r\n `${e.features[0].properties.name_en} ${sciPopup}x
\r\n Rank:${rankPopup}/194
\r\n In ${e.features[0].properties.region}:${rankPopupRegion}/${regionNumber}`\r\n )\r\n .addTo(this.map);\r\n var popupElem = this.popUp.getElement();\r\n popupElem.style.color = sciColor[0];\r\n } else {this.popUp.remove()}\r\n });\r\n this.setState({rendered:\"Yes\"})\r\n}\r\n\r\nremove = obj => {\r\n this.map.removeLayer(obj)\r\n}\r\n\r\nmoveRegion = e => {\r\n if(e) {\r\n switch(e.activeLabel){\r\n case 'Africa':\r\n this.map.flyTo({center: [32.259 ,2.036], zoom:3.14, essential: true }); break;\r\n case 'Americas':\r\n this.map.flyTo({center: [-69.390 ,22.259], zoom:1.82, essential: true }); break;\r\n case 'Asia':\r\n this.map.flyTo({center: [104.687 ,32.592], zoom:3.14, essential: true }); break;\r\n case 'Europe':\r\n this.map.flyTo({center: [27.920 ,56.907], zoom:3.19, essential: true }); break;\r\n case 'Oceania':\r\n this.map.flyTo({center: [155.731 ,-16.435], zoom:3.11, essential: true }); break;\r\n default:\r\n return null;\r\n }}\r\n}\r\n\r\n\r\n\r\n//5 Countries with the highest SCI\r\nrender() {\r\n return (\r\n
\r\n
\r\n \r\n
\r\n {this.state.name}

\r\n 5 Most Connected Countries\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {top5_list[0].end? top5_list.map((e,i)=>\r\n \r\n ) : null}\r\n \r\n
CountrySCIRegion
{countryData[top5_list[i].end][0]} {top5_list[i].sciScaled}x{countryData[top5_list[i].end][1]}
\r\n
Regional average\r\n \r\n a.region.localeCompare(b.region))} style={{marginTop: \"10px\"}} onClick={e => this.moveRegion(e)} >\r\n \r\n \r\n \r\n {result.map((entry,index) => (\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t))}\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\r\n \r\n
\r\n \r\n What is the Social Connectedness Index?
\r\n The Social Connectedness Index measures the strength of connectedness between two geographic areas as represented by Facebook friendship ties.

\r\n Methodology
\r\n We use aggregated friendship connections on Facebook to measure social connectedness between geographies. Locations are assigned to users based on information they provide, connection information, and location services they have opted into. We use these friendships to estimate the probability a pair of users in these countries are Facebook friends and map this to an index score called the Social Connectedness Index (SCI). If the SCI is twice as large between two pairs of regions, it means the users in the first region-pair are about twice as likely to be connected than the second region-pair.

\r\n The figure shows a heat map of the social connectedness. For each country in our data, the colors highlight connections of the focal country, given in orange. The lightest color corresponds to the 20th percentile of the connectedness to the focal country; darker colors correspond to closer connections.\r\n

Click the right button to check more detail and download the data on the Facebook page
\r\n
\r\n
\r\n \r\n \r\n Move to the Facebook Data for Good page to check detail and download the data\r\n \r\n
\r\n
\r\n
this.mapContainer = el} className={classes.mapContainer} />\r\n
{legend}
\r\n \r\n \"Africapolis\"/\r\n \r\n
\r\n )\r\n }\r\n}\r\nReactDOM.render(, document.getElementById('app'));\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"mapContainer\":\"Site_mapContainer__3C3IK\",\"topleft\":\"Site_topleft__1XS7N\",\"legend\":\"Site_legend__3PYGy\",\"table\":\"Site_table__1kdr8\",\"tooltip\":\"Site_tooltip__1vyR7\",\"regionsel\":\"Site_regionsel__36SmX\",\"popup\":\"Site_popup__2yp2X\",\"logo\":\"Site_logo__2Srqv\",\"button\":\"Site_button__1lPcx\",\"buttonActive\":\"Site_buttonActive__13aLZ\",\"headwrapper\":\"Site_headwrapper__1rgcf\"};"],"sourceRoot":""}