-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-scatter-tsx-c38d602ff236224a0e43.js
2 lines (2 loc) · 26.6 KB
/
component---src-pages-scatter-tsx-c38d602ff236224a0e43.js
1
2
(self.webpackChunkmy_gatsby_site=self.webpackChunkmy_gatsby_site||[]).push([[19],{3938:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return V}});var a=n(7294),r=n(9692),o=n(1839),i=r.ZP.div.withConfig({displayName:"scatterPlot__Container",componentId:"fj3n4b-0"})(["display:flex;flex-direction:column;align-items:center;margin:10px;"]),l=r.ZP.h3.withConfig({displayName:"scatterPlot__Title",componentId:"fj3n4b-1"})(["margin:0;"]),s=r.ZP.svg.withConfig({displayName:"scatterPlot__MapContainer",componentId:"fj3n4b-2"})(["height:330px;"]),c=function(e){return Number(String(e).slice(0,-3))};function p(e){var t=e.data,n=e.title,r=e.selectedState,p=e.labels,d=e.arrows,u=e.lines,h=[50,50],m=280,y=(0,a.useRef)(null);return(0,a.useEffect)((function(){var e=o.Ys(y.current),n=e.attr("width",340).attr("height",340).append("g").attr("scale",10).attr("transform","translate("+h[0]+", "+(h[1]-40)+")"),a=o.BYU().domain([0,52]).range([0,280]);n.append("g").attr("transform","translate(0,280)").call(o.LLu(a));var r=o.BYU().domain([0,52]).range([m,0]);n.append("g").call(o.y4O(r)),e.append("text").attr("text-anchor","end").attr("x",240).attr("y",325).text("Week Number"),e.append("text").attr("text-anchor","middle").attr("x",-150).attr("y",10).attr("dy","0.75em").attr("transform","rotate(-90)").text("Count");var i=function(e){return Object.values(e.map((function(e){var t=e.count(),n=t[0],a=t[1];return{x:n>a?e.recent()[0]:e.recent()[1],y:n>a?n:a,hot:n>a,fips:e.fips}})).reduce((function(e,t){var n=t.x,a=t.y,r=t.fips,o=t.hot,i=n+","+a;return i in e?(e[i].fips.push(r),e[i].hot.push(o)):e[i]={x:n,y:a,fips:[r],hot:[o]},e}),{}))}(t),l=o.jvg().x((function(e){var t=e.x;return a(t)})).y((function(e){var t=e.y;return r(t)}));n.selectAll("myLines").data(t.map((function(e){var t=e.count(),n=t[0],a=t[1];return{data:n>a?e.sequential(1):e.sequential(2),hot:n>a,fips:e.fips}}))).enter().append("path").attr("class","seq").attr("stroke","none").attr("fill","none").attr("stroke-width",1.5).attr("stroke-opacity",.15).attr("d",(function(e){return l(e.data)})),n.selectAll("dot").data(i).enter().append("circle").attr("class","point").attr("cx",(function(e){var t=e.x;return a(t)})).attr("cy",(function(e){var t=e.y;return r(t)})).attr("r",2),void 0!==p&&p.forEach((function(t){return t(e)})),void 0!==d&&d.forEach((function(t){return t(e)})),void 0!==u&&n.selectAll("divLines").data(u).enter().append("path").attr("stroke-width",2).attr("stroke-opacity",1).attr("stroke","black").attr("stroke-dasharray","1,1").attr("d",(function(e){return l(e)}))}),[]),(0,a.useEffect)((function(){var e=o.sY$,t=o.bc$;o.Ys(y.current).selectAll(".point").style("fill-opacity",(function(e){var t=e.fips;return r[0]<0||void 0!==t.find((function(e){return c(e)===r[0]}))?1:.1})).style("fill",(function(n){var a,o,i=n.hot,l=n.fips.map((function(e){return-1===r[0]||c(e)===r[0]})),s=(a=l,i.filter((function(e,t){return a[t]}))),p=(o=s.length?s:i).reduce((function(e,t){return e+t}))/o.length;return p>.5?t(p):e(1-p)})),o.Ys(y.current).selectAll(".seq").style("stroke",(function(e){var t=e.fips,n=e.hot;return-2===r[0]||c(t)===r[0]?n?"#FF0000":"#0000FF":"none"}))}),[r]),a.createElement(i,null,a.createElement(l,null,n),a.createElement(s,{ref:y}))}var d=n(9088),u=r.ZP.div.withConfig({displayName:"scatterView__Container",componentId:"sc-11zvvca-0"})(["display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-around;@media (max-width:800px){justify-content:center;}"]);function h(e){var t=e.selectedState,n=(0,a.useContext)(d.z),r=n.mapData,o=n.mapTitles;return a.createElement(u,null,o.map((function(e,n){return a.createElement(p,{key:n,title:e,selectedState:t,data:r?r[n]:null})})))}var m=n(2114);function y(){var e=(0,a.useContext)(d.z),t=e.mapData,n=t[0],r=(t[1],t[2],t[3],e.mapTitles),o=r[0],i=(r[1],r[2],r[3],n.find((function(e){return 56029===e.fips}))),l=i.sequential(2).map((function(e){var t=e.x;return[{x:t,y:0},{x:t,y:e.y}]})).filter((function(e){var t=e[0].x;e[1];return[0,12,23,40,52].includes(t)}));return a.createElement(p,{title:o,data:[i],selectedState:[56,"Wyoming"],labels:[function(e){return e.append("text").attr("text-anchor","middle").attr("x",90).attr("y",270).attr("dy","0.75em").text("(1)")},function(e){return e.append("text").attr("text-anchor","middle").attr("x",145).attr("y",270).attr("dy","0.75em").text("(2)")},function(e){return e.append("text").attr("text-anchor","middle").attr("x",220).attr("y",270).attr("dy","0.75em").text("(3)")},function(e){return e.append("text").attr("text-anchor","middle").attr("x",300).attr("y",270).attr("dy","0.75em").text("(1)")}],lines:l})}function f(){var e=(0,a.useContext)(d.z),t=e.mapData,n=(t[0],t[1],t[2],t[3]),r=e.mapTitles,i=(r[0],r[1],r[2],r[3]),l=n.filter((function(e){var t=e.fips;return 6===Math.floor(t/1e3)}));return a.createElement(p,{title:i,data:l,selectedState:[6,"California"],labels:[function(e){return e.append("text").attr("text-anchor","middle").attr("x",105).attr("y",100).attr("dy","0.75em").text("March 4, State")},function(e){return e.append("text").attr("text-anchor","middle").attr("x",105).attr("y",120).attr("dy","0.75em").text("of Emergency")},function(e){return e.append("text").attr("text-anchor","middle").attr("x",105).attr("y",140).attr("dy","0.75em").text("Declared")},function(e){return e.append("text").attr("text-anchor","middle").attr("x",190).attr("y",40).attr("dy","0.75em").text("March 19, Stay")},function(e){return e.append("text").attr("text-anchor","middle").attr("x",190).attr("y",60).attr("dy","0.75em").text("At Home Order")}],arrows:[function(e){return e.append("path").attr("d",o.jvg()([[105,160],[105,275]])).attr("stroke","black").attr("fill","red")},function(e){return e.append("path").attr("d",o.jvg()([[190,80],[118,275]])).attr("stroke","black").attr("fill","red")}]})}function g(){var e=(0,a.useContext)(d.z),t=e.mapData,n=(t[0],t[1]),r=(t[2],t[3],e.mapTitles),i=(r[0],r[1]),l=(r[2],r[3],n.filter((function(e){var t=e.fips;return 42===Math.floor(t/1e3)})));return a.createElement(p,{title:i,data:l,selectedState:[42,"Pennsylvania"],labels:[function(e){return e.append("text").attr("text-anchor","middle").attr("x",115).attr("y",180).attr("dy","0.75em").text("Social Distancing,")},function(e){return e.append("text").attr("text-anchor","middle").attr("x",115).attr("y",200).attr("dy","0.75em").text("Schools Close")},function(e){return e.append("text").attr("text-anchor","middle").attr("x",160).attr("y",80).attr("dy","0.75em").text("Counties enter")},function(e){return e.append("text").attr("text-anchor","middle").attr("x",160).attr("y",100).attr("dy","0.75em").text("Yellow Phase")},function(e){return e.append("text").attr("text-anchor","middle").attr("x",280).attr("y",30).attr("dy","0.75em").text("Stay-at-home")},function(e){return e.append("text").attr("text-anchor","middle").attr("x",280).attr("y",50).attr("dy","0.75em").text("advisory")}],arrows:[function(e){return e.append("path").attr("d",o.jvg()([[115,220],[115,275]])).attr("stroke","black").attr("fill","red")},function(e){return e.append("path").attr("d",o.jvg()([[160,120],[160,260]])).attr("stroke","black").attr("fill","red")},function(e){return e.append("path").attr("d",o.jvg()([[280,70],[300,240]])).attr("stroke","black").attr("fill","red")}]})}function x(){var e=(0,a.useContext)(d.z),t=e.mapData,n=(t[0],t[1],t[2]),r=(t[3],e.mapTitles),o=(r[0],r[1],r[2]),i=(r[3],n.filter((function(e){var t=e.fips;return[6031,13303,25023,34029,36083,48227,48431].includes(t)})));return a.createElement(p,{title:o,data:i,selectedState:[-2,""]})}var w=n(7576),v=n(5743),P=r.ZP.div.withConfig({displayName:"stateSelection__Container",componentId:"sc-11880xa-0"})(["display:flex;flex-direction:column;align-items:center;margin:10px;"]),E=r.ZP.svg.withConfig({displayName:"stateSelection__MapContainer",componentId:"sc-11880xa-1"})(["g{background-color:light-gray;fill:red;}&:hover{cursor:pointer;}"]);function b(e){var t=e.highlightedState,n=e.stateSelector,r=(e.addState,[185,125]),i=(0,a.useRef)(null),l=o.FWi().scale(500).translate(r),s=o.l49().projection(l);return(0,a.useEffect)((function(){o.Ys(i.current).attr("width",370).attr("height",250).append("g").append("g").style("stroke","black").style("stroke-width","0.5px").style("fill","#ffffffff").selectAll("path").data(w.zL(v,v.objects.states).features).enter().append("path").attr("d",s).attr("stateFips",(function(e){var t=e.id;return Number(t)})).attr("stateName",(function(e){return e.properties.name}))}),[]),(0,a.useEffect)((function(){o.Ys(i.current).selectAll("path").on("click",(function(){n([Number(this.getAttribute("stateFips")),this.getAttribute("stateName")])})).style("fill",(function(){return Number(this.getAttribute("stateFips"))===t[0]?"rgb(0,54,96)":"#ffffffff"}))}),[t]),a.createElement(P,null,a.createElement(E,{ref:i}))}var C=n(7329),k=JSON.parse('{"P1":{"$":{"x":[{"type":"MultiPolygon","arcs":[[[0]],[[1,2,3,4,5]]],"id":"01","properties":{"name":"Alabama"}},{"type":"MultiPolygon","arcs":[[[6]],[[7]],[[8]],[[9]],[[10]],[[11]],[[12]],[[13]],[[14]],[[15]],[[16]],[[17]],[[18]],[[19]],[[20]],[[21]],[[22]],[[23]],[[24]],[[25]],[[26]],[[27]],[[28]],[[29]],[[30]],[[31]],[[32]],[[33]],[[34]],[[35]],[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]],[[44]],[[45]],[[46]],[[47]],[[48]],[[49]],[[50]],[[51]],[[52]],[[53]],[[54]],[[55]],[[56]],[[57]],[[58]],[[59]],[[60]],[[61]],[[62]],[[63]],[[64]],[[65]],[[66]],[[67]],[[68]],[[69]],[[70]],[[71]],[[72]],[[73]],[[74]],[[75]],[[76]],[[77]],[[78]],[[79]],[[80]],[[81]],[[82]],[[83]],[[84]],[[85]],[[86]],[[87]],[[88]],[[89]],[[90]],[[91]],[[92]],[[93]],[[94]],[[95]],[[96]],[[97]],[[98]],[[99]],[[100]],[[101]],[[102]],[[103]],[[104]],[[105]],[[106]],[[107]],[[108]],[[109]],[[110]],[[111]],[[112]],[[113]],[[114]],[[115]],[[116]],[[117]],[[118]],[[119]],[[120]],[[121]],[[122]],[[123]],[[124]],[[125]],[[126]],[[127]],[[128]],[[129]],[[130]],[[131]],[[132]],[[133]],[[134]],[[135]],[[136]],[[137]],[[138]],[[139]],[[140]],[[141]],[[142]]],"id":"02","properties":{"name":"Alaska"}},{"type":"Polygon","arcs":[[143,144,145,146,147]],"id":"04","properties":{"name":"Arizona"}},{"type":"Polygon","arcs":[[148,149,150,151,152,153]],"id":"08","properties":{"name":"Colorado"}},{"type":"MultiPolygon","arcs":[[[154]],[[155]],[[156]],[[157]],[[158]],[[159]],[[160]],[[161]],[[162]],[[163,164,-4]]],"id":"12","properties":{"name":"Florida"}},{"type":"Polygon","arcs":[[165,166,167,168,-164,-3]],"id":"13","properties":{"name":"Georgia"}},{"type":"Polygon","arcs":[[169,170,171,172,173]],"id":"18","properties":{"name":"Indiana"}},{"type":"Polygon","arcs":[[174,175,176,-151]],"id":"20","properties":{"name":"Kansas"}},{"type":"MultiPolygon","arcs":[[[177]],[[178]],[[179]],[[180]],[[181]],[[182]],[[183]],[[184,185]]],"id":"23","properties":{"name":"Maine"}},{"type":"MultiPolygon","arcs":[[[186]],[[187]],[[188,189,190,191,192,193,194,195]]],"id":"25","properties":{"name":"Massachusetts"}},{"type":"Polygon","arcs":[[196,197,198,199,200]],"id":"27","properties":{"name":"Minnesota"}},{"type":"Polygon","arcs":[[201,202,203,204,205,206,207,208]],"id":"34","properties":{"name":"New Jersey"}},{"type":"MultiPolygon","arcs":[[[209]],[[210]],[[211,212,213,-167,214]]],"id":"37","properties":{"name":"North Carolina"}},{"type":"Polygon","arcs":[[215,-201,216,217]],"id":"38","properties":{"name":"North Dakota"}},{"type":"Polygon","arcs":[[-152,-177,218,219,220,221]],"id":"40","properties":{"name":"Oklahoma"}},{"type":"Polygon","arcs":[[222,223,-204,224,225,226,227]],"id":"42","properties":{"name":"Pennsylvania"}},{"type":"Polygon","arcs":[[228,-217,-200,229,230,231]],"id":"46","properties":{"name":"South Dakota"}},{"type":"Polygon","arcs":[[-221,232,233,234,235,236,237]],"id":"48","properties":{"name":"Texas"}},{"type":"Polygon","arcs":[[-232,238,-149,239,240,241]],"id":"56","properties":{"name":"Wyoming"}},{"type":"Polygon","arcs":[[-195,242,243,244]],"id":"09","properties":{"name":"Connecticut"}},{"type":"Polygon","arcs":[[245,246,247,248,249,250,251,-219,-176,252]],"id":"29","properties":{"name":"Missouri"}},{"type":"Polygon","arcs":[[253,-227,254,255,256]],"id":"54","properties":{"name":"West Virginia"}},{"type":"Polygon","arcs":[[257,258,259,-174,260,-247]],"id":"17","properties":{"name":"Illinois"}},{"type":"Polygon","arcs":[[-153,-222,-238,261,-147]],"id":"35","properties":{"name":"New Mexico"}},{"type":"Polygon","arcs":[[-252,262,263,264,-235,233,-233,-220]],"id":"05","properties":{"name":"Arkansas"}},{"type":"MultiPolygon","arcs":[[[265]],[[266]],[[267]],[[268]],[[269]],[[270]],[[271]],[[272]],[[273,274,275,-144,276]]],"id":"06","properties":{"name":"California"}},{"type":"MultiPolygon","arcs":[[[-209,277]],[[-225,-203,278,279]]],"id":"10","properties":{"name":"Delaware"}},{"type":"Polygon","arcs":[[280,281]],"id":"11","properties":{"name":"District of Columbia"}},{"type":"MultiPolygon","arcs":[[[282]],[[283]],[[284]],[[285]],[[286]],[[287]],[[288]],[[289]]],"id":"15","properties":{"name":"Hawaii"}},{"type":"Polygon","arcs":[[-199,290,-258,-246,291,-230]],"id":"19","properties":{"name":"Iowa"}},{"type":"MultiPolygon","arcs":[[[-261,-173,292,-257,293,294,-248]],[[295,-250]]],"id":"21","properties":{"name":"Kentucky"}},{"type":"MultiPolygon","arcs":[[[296,297]],[[298]],[[299]],[[-226,-280,300,301,302,303,-281,304,-255]]],"id":"24","properties":{"name":"Maryland"}},{"type":"MultiPolygon","arcs":[[[305]],[[306]],[[307]],[[308]],[[309]],[[310]],[[311]],[[312]],[[313]],[[314,315,-171]],[[316]],[[317,318,319,320,321,322]]],"id":"26","properties":{"name":"Michigan"}},{"type":"MultiPolygon","arcs":[[[323]],[[324]],[[325]],[[326]],[[-264,327,-6,328,329]]],"id":"28","properties":{"name":"Mississippi"}},{"type":"Polygon","arcs":[[330,-218,-229,-242,331]],"id":"30","properties":{"name":"Montana"}},{"type":"Polygon","arcs":[[332,-185,333,-190,334]],"id":"33","properties":{"name":"New Hampshire"}},{"type":"MultiPolygon","arcs":[[[335]],[[336]],[[337]],[[338,-207]],[[339]],[[340]],[[341,342,-196,-245,343,-205,-224]]],"id":"36","properties":{"name":"New York"}},{"type":"MultiPolygon","arcs":[[[344]],[[345]],[[-316,346,-228,-254,-293,-172]]],"id":"39","properties":{"name":"Ohio"}},{"type":"Polygon","arcs":[[347,348,349,274,-275,-274,350]],"id":"41","properties":{"name":"Oregon"}},{"type":"Polygon","arcs":[[-251,-296,-249,-295,351,-215,-166,-2,-328,-263]],"id":"47","properties":{"name":"Tennessee"}},{"type":"Polygon","arcs":[[352,-240,-154,-146,353]],"id":"49","properties":{"name":"Utah"}},{"type":"MultiPolygon","arcs":[[[354]],[[-302,355]],[[356,-297]],[[-256,-305,-282,-304,357,-212,-352,-294]]],"id":"51","properties":{"name":"Virginia"}},{"type":"MultiPolygon","arcs":[[[358]],[[359]],[[360]],[[361]],[[362]],[[363]],[[364]],[[365]],[[366]],[[367]],[[368,-348,369]]],"id":"53","properties":{"name":"Washington"}},{"type":"MultiPolygon","arcs":[[[370]],[[371]],[[372]],[[373]],[[374]],[[375]],[[376]],[[377]],[[378]],[[379]],[[380,-323,321,-321,319,-319,381,-259,-291,-198]]],"id":"55","properties":{"name":"Wisconsin"}},{"type":"MultiPolygon","arcs":[[[382]],[[383]],[[384]]],"id":"60","properties":{"name":"American Samoa"}},{"type":"MultiPolygon","arcs":[[[385]]],"id":"66","properties":{"name":"Guam"}},{"type":"MultiPolygon","arcs":[[[386]],[[387]],[[388]],[[389]],[[390]],[[391]],[[392]],[[393]]],"id":"69","properties":{"name":"Commonwealth of the Northern Mariana Islands"}},{"type":"Polygon","arcs":[[-231,-292,-253,-175,-150,-239]],"id":"31","properties":{"name":"Nebraska"}},{"type":"Polygon","arcs":[[-214,394,-168]],"id":"45","properties":{"name":"South Carolina"}},{"type":"MultiPolygon","arcs":[[[395]],[[396]],[[397]],[[398]],[[399]]],"id":"72","properties":{"name":"Puerto Rico"}},{"type":"MultiPolygon","arcs":[[[400]],[[401]],[[402]]],"id":"78","properties":{"name":"United States Virgin Islands"}},{"type":"Polygon","arcs":[[-369,403,-332,-241,-353,404,-349]],"id":"16","properties":{"name":"Idaho"}},{"type":"Polygon","arcs":[[-275,-350,-405,-354,-145,-276]],"id":"32","properties":{"name":"Nevada"}},{"type":"Polygon","arcs":[[405,-335,-189,-343]],"id":"50","properties":{"name":"Vermont"}},{"type":"MultiPolygon","arcs":[[[406]],[[407]],[[408]],[[409]],[[410]],[[411]],[[412]],[[-265,-330,413,-236]]],"id":"22","properties":{"name":"Louisiana"}},{"type":"MultiPolygon","arcs":[[[-192,414]],[[415]],[[416]],[[417]],[[-243,-194,418]]],"id":"44","properties":{"name":"Rhode Island"}}]}}}'),S=r.ZP.div.withConfig({displayName:"dropdown__Container",componentId:"ggqled-0"})(["width:400px;@media (max-width:400px){width:100%;}"]),_=r.ZP.div.withConfig({displayName:"dropdown__ButtonContainer",componentId:"ggqled-1"})(["width:100%;display:flex;justify-content:space-around;align-items:center;margin:10px 0;"]),M=r.ZP.button.withConfig({displayName:"dropdown__Button",componentId:"ggqled-2"})(["border-radius:10px;height:30px;width:60px;&:hover{cursor:pointer;}"]),N=r.ZP.p.withConfig({displayName:"dropdown__Text",componentId:"ggqled-3"})(["margin:5px 10px;"]);function I(e){var t=e.stateSelector,n=e.selectedState,r=[].concat((0,C.Z)(k.P1.$.x.filter((function(e){var t=e.properties.name;return!["Alaska","Hawaii","Guam","Puerto Rico","American Samoa","United States Virgin Islands","Commonwealth of the Northern Mariana Islands","District of Columbia"].includes(t)}))),[{id:-1,properties:{name:"United States"}}]).sort((function(e,t){return-1===e.id?-1:-1===t.id?1:e.properties.name.localeCompare(t.properties.name)}));return a.createElement(S,null,a.createElement(N,null,"Select a state from the drop down or by clicking on the map."),a.createElement(_,null,a.createElement("div",null," ",a.createElement("label",{htmlFor:"states"},"Choose a State:"),"",a.createElement("select",{id:"states",onChange:function(e){var n=e.currentTarget.value,a=e.target.selectedOptions;t([Number(n),a[0].text])},value:n[0]},r.map((function(e){var t=e.id,n=e.properties.name;return a.createElement("option",{value:Number(t),key:t},n)})))),a.createElement(M,{onClick:function(){return t([-1,""])}},"Reset")),a.createElement(N,null,"Selecting a state will highlight that states' counties in the scatter plot above and show the cumulative path for each county over the year."))}var T=n(5444),Z=r.ZP.div.withConfig({displayName:"scatter__Container",componentId:"sc-1854qe5-0"})(["width:100%;display:flex;align-items:center;flex-direction:column;"]),j=r.ZP.div.withConfig({displayName:"scatter__Descriptions",componentId:"sc-1854qe5-1"})(["margin:0 10px;"]),q=r.ZP.div.withConfig({displayName:"scatter__DescriptionContainer",componentId:"sc-1854qe5-2"})(["margin:10px 0 30px 0;"]),A=r.ZP.div.withConfig({displayName:"scatter__SelectionContainer",componentId:"sc-1854qe5-3"})(["display:flex;flex-wrap:wrap;width:100%;justify-content:space-around;@media (max-width:800px){justify-content:center;}"]),D=r.ZP.div.withConfig({displayName:"scatter__ExampleContainer",componentId:"sc-1854qe5-4"})(["display:flex;width:100%;justify-content:space-between;@media (max-width:630px){flex-wrap:wrap-reverse;}* >{width:50%;}"]),F=r.ZP.div.withConfig({displayName:"scatter__ExampleContainerReverse",componentId:"sc-1854qe5-5"})(["display:flex;width:100%;justify-content:space-between;@media (max-width:630px){flex-wrap:wrap;}* >{width:50%;}"]),R=r.ZP.div.withConfig({displayName:"scatter__TextContainer",componentId:"sc-1854qe5-6"})(["display:flex;flex-direction:column;justify-content:start;width:100%;& > h1{margin:10px 5px 0 5px;}& > h2{margin:5px 5px 0 5px;}"]),W=r.ZP.p.withConfig({displayName:"scatter__Text",componentId:"sc-1854qe5-7"})(["margin:5px;"]),Y=r.ZP.hr.withConfig({displayName:"scatter__Divider",componentId:"sc-1854qe5-8"})(["width:98%;height:1px;background-color:black;border-radius:1px;margin:5px 10px;"]),O=r.ZP.ol.withConfig({displayName:"scatter__PathList",componentId:"sc-1854qe5-9"})(["counter-reset:list;list-style-position:outside;margin:10px;"]),U=r.ZP.li.withConfig({displayName:"scatter__PathSegment",componentId:"sc-1854qe5-10"})(['list-style:none;position:relative;margin:0 0 5px 0;&:before{left:-30px;position:absolute;content:"(" counter(list) ")";counter-increment:list;}']),z=r.ZP.i.withConfig({displayName:"scatter__Red",componentId:"sc-1854qe5-11"})(["color:#ff0000;"]),L=r.ZP.i.withConfig({displayName:"scatter__Blue",componentId:"sc-1854qe5-12"})(["color:#0000ff;"]);function V(){var e=(0,a.useState)([-1,""]),t=e[0],n=e[1],r=(0,a.useState)(Array(1)),o=r[0],i=r[1],l=(0,a.useState)(-1),s=l[0],c=l[1],p=function(e,t){var a=e[0],r=e[1];return void 0===t&&(t=!1),t||a===s||-1===a?(n([-1,""]),c(-1),!1):(n([a,r]),c(a),!0)};return a.createElement(m.Z,{selectedPage:"Scatter"},a.createElement(Z,null,a.createElement(j,null,a.createElement(R,null,a.createElement("h1",null,"County Paths"),a.createElement(W,null,"This page provides an alternative view to the",a.createElement(T.rU,{to:"/interactive"},"Interactive Maps")," page. Each week a county can be a hotspot, coldspot, or not a significant value. Over the year of 2020, the total number of weeks a county was a hotspot or coldspot and the last week the county was a significant value were calculated and are shown in the scatter plots below. In these scatter plots, each point represents a county with"," ",a.createElement(L,null,"blue")," points representing coldspots and ",a.createElement(z,null,"red")," ","points representing hotspots."))),a.createElement(Y,null),a.createElement(h,{selectedState:t}),a.createElement(Y,null),a.createElement(A,null,a.createElement(I,{stateSelector:p,selectedState:t}),a.createElement(b,{highlightedState:t,stateSelector:p,addState:function(e){o[0]=e,i(o)}})),a.createElement(Y,null),a.createElement(j,null,a.createElement(q,null,a.createElement(R,null,a.createElement("h2",null,"Paths")),a.createElement(D,null,a.createElement(R,null,a.createElement(W,null,"When selecting a state, the scatter plots above will highlight that state's counties and show each counties' cumulative path."," ",a.createElement("b",null,"These paths show, at each week, the total number of times a county was a hotspot or coldspot up to that week"),". ",a.createElement(z,null,"Red")," lines indicate the county was a hot pot while"," ",a.createElement(L,null,"blue")," lines indicate that the county was a coldspot. These paths end in a point that shows the total number of times a county was a hotspot or coldspot, on the last week it was a hotspot or coldspot. This final value is shown in the national view of the scatter plots above and in the ",a.createElement(T.rU,{to:"/interactive"},"interactive maps"),"."),a.createElement(W,null,"The accompanying figure shows the path for Park County, Wyoming (the county that contains the majority of Yellowstone National Park). This path is colored blue, indicating that whenever the county was a significant value, it was a cold spot. This path can be broken into three types of regions:"),a.createElement(O,null,a.createElement(U,null,"In these segments the line has a slope of 1. This means that for each week in the segment, the county was a coldspot."),a.createElement(U,null,"Between week 13 and 22, Park County was neither a hot spot nor cold spot. Flat line segments such as the one in this region indicate a period of not being significant."),a.createElement(U,null,"This segment shows a general upwards trend. Although there are a few flat regions, Park County was mostly a cold spot in this region."))),a.createElement(y,null))),a.createElement(q,null,a.createElement(R,null,a.createElement("h2",null,"Point Color")),a.createElement(F,null,a.createElement(x,null),a.createElement(R,null,a.createElement(W,null,"Each point on the scatter plot represents a county. However, multiple counties can be located at the same end value. In these cases, the point color is based off of the proportion of counties that were hotspots or cold pots. ",a.createElement(z,null,"Red")," ","points signify a majority of hotspots while ",a.createElement(L,null,"blue")," ","points signify a majority of coldspots. Darker values indicate a higher proportion of counties being hotspots or coldspots."),a.createElement(W,null,"In the accompanying figure, we can see all of the counties in the entire United States that have their 20th significant value on the last week of the year. There are 7 of these counties with 3 being hotspots and 4 being coldspots as indicated by the color of the paths (note that two of the hot spots overlap the entire time). Since the majority of the counties are coldspots, the point color is a light blue. This is the same point that is shown on the national level view on the interactive scatter plots above.")))),a.createElement(q,null,a.createElement(R,null,a.createElement("h2",null,"Patterns Starting in March")),a.createElement(D,null,a.createElement(R,null,a.createElement(W,null,"The accompanying plot shows the counties in ",a.createElement("b",null,"California")," ","for Safegraph's % sheltered. We can see at once that all of the lines are ",a.createElement(z,null,"red")," which indicates that these counties were hot spots. This means that compared to counties in the nation, these counties had a higher percentage of people sheltered at home."),a.createElement(W,null,"An interesting pattern occurs on week 10 and the immediately following weeks that corresponds to the Governor declaring a State of Emergency on March 4th and a stay at home order on March 19. In this time period, multiple counties become hot spots and remain being hot spots each week until the end of 2020, as shown by these lines having a slope of 1. We can see that multiple counties follow this pattern by the lines being colored a brighter red.")),a.createElement(f,null))),a.createElement(q,null,a.createElement(R,null,a.createElement("h2",null,"Paths With Flat Regions")),a.createElement(F,null,a.createElement(g,null),a.createElement(R,null,a.createElement(W,null,"The accompanying plot shows counties in ",a.createElement("b",null,"Pennsylvania")," ","for Cuebiq's % sheltered. All of the lines shown are"," ",a.createElement(z,null,"red")," which indicates that all of these counties were hot spots. This means that compared to counties in the nation, these counties had higher percentages of people sheltering in their home."),a.createElement(W,null,"Similar to California, starting on week 12, the Governor implemented social distancing measures and ordered schools to close. This corresponds to counties becoming hot spots and staying as hot spots for multiple weeks, meaning that compared to counties in the nation, these counties had a higher percentage of people sheltered in their homes."),a.createElement(W,null,"Then starting on week 19, many counties in the state's Red tier moved up to the Yellow tier, allowing certain business to reopen. This corresponds to flat regions of the counties' path where, compared to counties in the nation, the counties no longer have a high percentage of people sheltered in their homes."),a.createElement(W,null,"Towards the end of 2020, cases in Pennsylvania began to rise again. On November 23, the Health Secretary announced a stay at home advisory and in December the Governor tested positive for COVID-19. This corresponds to certain counties becoming hot spots again.")))))))}}}]);
//# sourceMappingURL=component---src-pages-scatter-tsx-c38d602ff236224a0e43.js.map