1(this["webpackJsonpdataviz-react-d3"]=this["webpackJsonpdataviz-react-d3"]||[]).push([[0],{125:function(t,e,n){},126:function(t,e,n){},127:function(t,e,n){"use strict";n.r(e);var c=n(1),a=n.n(c),r=n(39),i=n.n(r),s=n(3),o=n(4),u=n.n(o),j=n(12),l=n(2),d=n(18),b=n(0),f=Object(l.f)(),O=Object(l.g)(f),x=Object(l.e)(),h=function(t){var e=t.worldAtlas,n=e.land,a=e.interiors,r=t.data,i=t.sizeScale,o=t.sizeValue;return Object(b.jsxs)("g",{className:"marks",children:[Object(c.useMemo)((function(){return Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)("path",{className:"sphere",d:O({type:"Sphere"})}),Object(b.jsx)("path",{className:"graticules",d:O(x())}),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)})]})}),[n,a]),r.map((function(t,e){var n=f(t.coords),c=Object(s.a)(n,2),a=c[0],r=c[1];return a&&r?Object(b.jsx)("circle",{cx:a,cy:r,r:i(o(t)),children:Object(b.jsx)("title",{children:t["Total Dead and Missing"]})},e):null}))]})},m=function(t){return t["Total Dead and Missing"]},p=function(t){var e=t.data,n=t.filteredData,a=t.worldAtlas,r=Object(c.useMemo)((function(){return Object(l.k)().domain([0,Object(l.i)(e,m)]).range([0,15])}),[e]);return Object(b.jsx)(h,{worldAtlas:a,data:n,sizeScale:r,sizeValue:m})},g=function(t){var e=t.xScale,n=t.innerHeight,c=t.tickFormat,a=t.tickOffset,r=void 0===a?3:a;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:c(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=function(t){var e=t.data,n=t.xScale,c=t.yScale,a=t.tooltipFormat,r=t.innerHeight;return e.map((function(t,e){return Object(b.jsx)("rect",{className:"mark",x:n(t.x0),y:c(t.y),width:n(t.x1)-n(t.x0),height:r-c(t.y),children:Object(b.jsx)("title",{children:a(t.y)})},e)}))},w=0,k=30,S=20,M=50,D=function(t){return t["Total Dead and Missing"]},N=function(t){var e=t.data,n=t.width,a=t.height,r=t.setBrushExtent,i=t.xValue,o=a-S-w,u=n-k-M,j=Object(c.useMemo)((function(){return Object(l.l)().domain(Object(l.d)(e,i)).range([0,u]).nice()}),[e,i,u]),d=Object(c.useMemo)((function(){var t=j.domain(),n=Object(s.a)(t,2),c=n[0],a=n[1];return Object(l.a)().value(i).domain(j.domain()).thresholds(Object(l.p)(c,a))(e).map((function(t){return{y:Object(l.n)(t,D),x0:t.x0,x1:t.x1}}))}),[i,j,e]),f=Object(c.useMemo)((function(){return Object(l.j)().domain([0,Object(l.i)(d,(function(t){return t.y}))]).range([o,0]).nice()}),[d,o]),O=Object(l.o)("%m/%d/%Y"),x=Object(c.useRef)();return Object(c.useEffect)((function(){var t=Object(l.b)().extent([[0,0],[u,o]]);t(Object(l.m)(x.current)),t.on("brush end",(function(t){var e=t.selection;r(e&&e.map(j.invert))}))}),[u,o,j,r]),Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)("rect",{width:n,height:a,fill:"white",opacity:".75"}),Object(b.jsxs)("g",{transform:"translate(".concat(M,", ").concat(w,")"),children:[Object(b.jsx)(g,{xScale:j,innerHeight:o,tickFormat:O,tickOffset:5}),Object(b.jsx)("text",{className:"axis-label",x:u/2,y:o+54,textAnchor:"middle",children:"Time"}),Object(b.jsx)(v,{yScale:f,innerWidth:u,tickOffset:5}),Object(b.jsx)("text",{className:"axis-label",textAnchor:"middle",transform:"translate(".concat(-35,",").concat(o/2,") rotate(-90)"),children:"Total Dead and Missing"}),Object(b.jsx)(y,{data:d,xScale:j,yScale:f,tooltipFormat:function(t){return t},innerHeight:o}),Object(b.jsx)("g",{ref:x})]})]})},A=(n(125),500),T=function(t){return t["Reported Date"]},z=function(){var t=function(){var t=Object(c.useState)(null),e=Object(s.a)(t,2),n=e[0],a=e[1];return Object(c.useEffect)((function(){var t=function(){var t=Object(j.a)(u.a.mark((function t(){var e,n;return u.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(l.c)("https://gist.githubusercontent.com/curran/a9656d711a8ad31d812b8f9963ac441c/raw/c22144062566de911ba32509613c84af2a99e8e2/MissingMigrants-Global-2019-10-08T09-47-14-subset.csv",e);case 3:n=t.sent,a(n);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}),[]),n}(),e=function(){var t=Object(c.useState)(null),e=Object(s.a)(t,2),n=e[0],a=e[1];return Object(c.useEffect)((function(){var t=function(){var t=Object(j.a)(u.a.mark((function t(){var e,n,c,r;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(l.h)("https://unpkg.com/[email protected]/countries-50m.json");case 2:e=t.sent,n=e.objects,c=n.countries,r=n.land,a({land:Object(d.a)(e,r),interiors:Object(d.b)(e,c,(function(t,e){return t!==e}))});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}),[]),n}
1(),n=Object(c.useState)(),a=Object(s.a)(n,2),r=a[0],i=a[1];if(!t||!e)return Object(b.jsx)("pre",{children:"Loading ... "});var o=r?t.filter((function(t){var e=T(t);return e>r[0]&&e<r[1]})):t;return Object(b.jsx)("div",{className:"container",children:Object(b.jsxs)("svg",{width:980,height:A,children:[Object(b.jsx)(p,{data:t,filteredData:o,worldAtlas:e}),Object(b.jsx)("g",{transform:"translate(0, ".concat(400,")"),children:Object(b.jsx)(N,{data:t,width:980,height:100,setBrushExtent:i,xValue:T})})]})})};n(126);i.a.render(Object(b.jsx)(a.a.StrictMode,{children:Object(b.jsx)(z,{})}),document.getElementById("root"))}},[[127,1,2]]]); 2//# sourceMappingURL=main.b3bb8861.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.