1(this["webpackJsonpdataviz-react-d3"]=this["webpackJsonpdataviz-react-d3"]||[]).push([[0],{122:function(t,e,n){},123:function(t,e,n){},124:function(t,e,n){"use strict";n.r(e);var a=n(2),c=n.n(a),r=n(40),s=n.n(r),i=n(4),o=n.n(i),l=n(12),d=n(3),u=n(1),j=n(19),b=n(0),x=Object(u.e)(),O=Object(u.f)(x),f=Object(u.d)(),h=function(t){var e=t.worldAtlas,n=e.land,a=e.interiors,c=t.data,r=t.sizeScale,s=t.sizeValue;return Object(b.jsxs)("g",{className:"marks",children:[Object(b.jsx)("path",{className:"sphere",d:O({type:"Sphere"})}),Object(b.jsx)("path",{className:"graticules",d:O(f())}),n.features.map((function(t,e){return Object(b.jsx)("path",{className:"land",d:O(t)},e)})),Object(b.jsx)("path",{className:"interiors",d:O(a)}),c.map((function(t){var e=x(t.coords),n=Object(d.a)(e,2),a=n[0],c=n[1];return a&&c?Object(b.jsx)("circle",{cx:a,cy:c,r:r(s(t)),children:Object(b.jsx)("title",{children:t["Total Dead and Missing"]})},t["Web ID"]):null}))]})},m=function(t){var e=t.data,n=t.worldAtlas,a=function(t){return t["Total Dead and Missing"]},c=Object(u.j)().domain([0,Object(u.h)(e,a)]).range([0,15]);return Object(b.jsx)(h,{worldAtlas:n,data:e,sizeScale:c,sizeValue:a})},p=function(t){var e=t.data,n=t.xScale,a=t.yScale,c=t.tooltipFormat,r=t.innerHeight;return e.map((function(t,e){return Object(b.jsx)("rect",{className:"mark",x:n(t.x0),y:a(t.y),width:n(t.x1)-n(t.x0),height:r-a(t.y),children:Object(b.jsx)("title",{children:c(t.y)})},e)}))},g=function(t){var e=t.xScale,n=t.innerHeight,a=t.tickFormat,c=t.tickOffset,r=void 0===c?3:c;return e.ticks().map((function(t){return Object(b.jsxs)("g",{className:"tick bottom",transform:"translate(".concat(e(t),", 0)"),children:[Object(b.jsx)("line",{x1:0,y1:0,x2:0,y2:n}),Object(b.jsx)("text",{dy:".71em",y:n+r,style:{textAnchor:"middle"},children:a(t)})]},t)}))},v=function(t){var e=t.yScale,n=t.innerWidth;return e.ticks().map((function(t){return Object(b.jsxs)("g",{className:"tick left",transform:"translate(0, ".concat(e(t),")"),children:[Object(b.jsx)("line",{x2:n}),Object(b.jsx)("text",{dy:".32em",x:-4,style:{textAnchor:"end"},children:t},t)]},t)}))},y=0,k=30,w=20,S=50,D=function(t){var e=t.data,n=t.height-w-y,a=980-k-S,c=function(t){return t["Reported Date"]},r=function(t){return t["Total Dead and Missing"]},s=Object(u.k)().domain(Object(u.c)(e,c)).range([0,a]).nice(),i=s.domain(),o=Object(d.a)(i,2),l=o[0],j=o[1],x=Object(u.a)().value(c).domain(s.domain()).thresholds(Object(u.n)(l,j))(e).map((function(t){return{y:Object(u.l)(t,r),x0:t.x0,x1:t.x1}})),O=Object(u.i)().domain([0,Object(u.h)(x,(function(t){return t.y}))]).range([n,0]).nice(),f=Object(u.m)("%m/%d/%Y");return Object(b.jsxs)("g",{transform:"translate(".concat(S,", ").concat(y,")"),children:[Object(b.jsx)(g,{xScale:s,innerHeight:n,tickFormat:f,tickOffset:5}),Object(b.jsx)("text",{className:"axis-label",textAnchor:"middle",transform:"translate(".concat(-35,",").concat(n/2,") rotate(-90)"),children:"Total Dead and Missing"}),Object(b.jsx)(v,{yScale:O,innerWidth:a,tickOffset:5}),Object(b.jsx)("text",{className:"axis-label",x:a/2,y:n+54,textAnchor:"middle",children:"Time"}),Object(b.jsx)(p,{data:x,xScale:s,yScale:O,tooltipFormat:function(t){return t},innerHeight:n})]})},N=(n(122),500),M=function(){var t=function(){var t=Object(a.useState)(null),e=Object(d.a)(t,2),n=e[0],c=e[1];return Object(a.useEffect)((function(){var t=function(){var t=Object(l.a)(o.a.mark((function t(){var e,n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=function(t){return t.coords=t["Location Coordinates"].split(",").map((function(t){return+t})).reverse(),t["Total Dead and Missing"]=+t["Total Dead and Missing"],t["Reported Date"]=new Date(t["Reported Date"]),t},t.next=3,Object(u.b)("https://gist.githubusercontent.com/curran/a9656d711a8ad31d812b8f9963ac441c/raw/c22144062566de911ba32509613c84af2a99e8e2/MissingMigrants-Global-2019-10-08T09-47-14-subset.csv",e);case 3:n=t.sent,c(n);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}),[]),n}(),e=function(){var t=Object(a.useState)(null),e=Object(d.a)(t,2),n=e[0],c=e[1];return Object(a.useEffect)((function(){var t=function(){var t=Object(l.a)(o.a.mark((function t(){var e,n,a,r;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.g)("https://unpkg.com/[email protected]/countries-50m.json");case 2:e=t.sent,n=e.objects,a=n.countries,r=n.land,c({land:Object(j.a)(e,r),interiors:Object(j.b)(e,a,(function(t,e){return t!==e}))});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}),[]),n}();return t&&e?Object(b.jsx)("div",{className:"container",children:Object(b.jsxs)("svg",{width:980,height:N,children:[Object(b.jsx)(m,{data:t,worldAtlas:e}),Object(b.jsx)("g",{transform:"translate(0, ".concat(400,")"),children:Object(b.jsx)(D,{data:t,height:100})})]})}):Object(b.jsx)("pre",{children:"Loading ... "})};n(123);s.a.render(Object(b.jsx)(c.a.StrictMode,{children:Object(b.jsx)(M,{})}),document.getElementById("root"))}},[[124,1,2]]]); 2//# sourceMappingURL=main.6d46bb04.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.