carl b frederick
https://www.carlbfrederick.com/
Recent content on carl b frederick
Hugo  gohugo.io
enus
Sat, 14 Jul 2018 00:00:00 +0000

Concentration of Senate Representation
https://www.carlbfrederick.com/post/concentrationofsenaterepresentation/
Sat, 14 Jul 2018 00:00:00 +0000
https://www.carlbfrederick.com/post/concentrationofsenaterepresentation/
<script src="https://www.carlbfrederick.com/rmarkdownlibs/htmlwidgets/htmlwidgets.js"></script>
<script src="https://www.carlbfrederick.com/rmarkdownlibs/plotlybinding/plotly.js"></script>
<script src="https://www.carlbfrederick.com/rmarkdownlibs/typedarray/typedarray.min.js"></script>
<script src="https://www.carlbfrederick.com/rmarkdownlibs/jquery/jquery.min.js"></script>
<link href="https://www.carlbfrederick.com/rmarkdownlibs/crosstalk/css/crosstalk.css" rel="stylesheet" />
<script src="https://www.carlbfrederick.com/rmarkdownlibs/crosstalk/js/crosstalk.min.js"></script>
<link href="https://www.carlbfrederick.com/rmarkdownlibs/plotlyjs/plotlyhtmlwidgets.css" rel="stylesheet" />
<script src="https://www.carlbfrederick.com/rmarkdownlibs/plotlyjs/plotlylatest.min.js"></script>
<p>Recently saw this tweet <blockquote class="twittertweet"><p lang="en" dir="ltr">I want to repeat a statistic I use in every talk: by 2040 or so, 70 percent of Americans will live in 15 states. Meaning 30 percent will choose 70 senators. And the 30% will be older, whiter, more rural, more male than the 70 percent. Unsettling to say the least <a href="https://t.co/EGPD5nE4qG">https://t.co/EGPD5nE4qG</a></p>— Norman Ornstein (@NormOrnstein) <a href="https://twitter.com/NormOrnstein/status/1016789064379334656?ref_src=twsrc%5Etfw">July 10, 2018</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf8"></script>
and it reminded me of similar discussions I have had in which I was taking a similar position. I know that the point of the Senate was to ensure that states with large and small populations were on equal footing in one of the houses of the legislature. However, it seems to me that at some point the imbalance in population size between states may outweigh the desire for numerical equality. Has the degree of inequality in Senate representation grown over time? <em>I will leave the more intersting question about differential demographics for another post.</em></p>
<p>Since the data are readily available, I decided to look into things to decide how strongly I should argue this point in the future.</p>
<div id="gettingthedata" class="section level1">
<h1>Getting the data</h1>
<p>The <a href="https://www.nhgis.org/">National Historic Geographic Information System</a> contains a wealth of data from the Census over time in a standardized, customizable download extracts. To make things simple, I chose to download total population figures by state from Decennial Censuses back to 1790.</p>
<pre class="r"><code>library(tidyverse)
stpop < read_csv("ExternalData/nhgis0001_ts_nominal_state.csv") %>%
select(year = YEAR, state = STATE, pop = A00AA) %>%
filter(!grepl("Territory", state),
!grepl("District", state),
!grepl("Persons", state),
!grepl("Puerto Rico", state)) %>%
group_by(year) %>%
arrange(pop) %>%
mutate(
cumSen = row_number(pop)/n(),
cumPop = cumsum(pop)/sum(pop)
) %>%
nest %>%
arrange(year)</code></pre>
</div>
<div id="changesovertime" class="section level1">
<h1>Changes over time</h1>
<p>Since the number of Senators per state is constant across states and over time, the question boils down to one of changing population over time. The best way I can think of to answer this question is to look at summary measures of inequality that describe distributions. A suite of these measures are available in the <a href="https://CRAN.Rproject.org/package=ineq"><code>ineq</code> package</a>–instead of income or wealth distributions, we will be looking at population distributions. See the help files (<code>?ineq::ineq</code>) for descriptions of what each of the measures is and for the relevant citations.</p>
<pre class="r"><code>library(ineq)
stpop < stpop %>%
mutate(
nStates = map_dbl(data, nrow),
Gini = map_dbl(data, ~Gini(.$pop)),
RS = map_dbl(data, ~RS(.$pop)),
Atkinson = map_dbl(data, ~Atkinson(.$pop)),
Theil = map_dbl(data, ~Theil(.$pop)),
var.coeff = map_dbl(data, ~var.coeff(.$pop)),
entropy = map_dbl(data, ~entropy(.$pop))
) %>%
unnest
stpop %>%
gather(metric, value, Gini, RS, Atkinson, Theil, var.coeff, entropy) %>%
group_by(year, metric, value) %>%
summarize %>%
ggplot(aes(x = year, y = value, color = metric)) +
geom_point() +
geom_smooth(se=FALSE) +
theme_minimal() +
labs(x = "", y = "") +
facet_wrap(~metric, scales = "free") +
theme(legend.position = "none")</code></pre>
<p><img src="https://www.carlbfrederick.com/post/20180714concentrationofsenaterepresentation_files/figurehtml/calculate%20ineq%20measures%20and%20plot%20trends1.png" width="672" /></p>
<p>The scale of each of the metrics is irrelevant; the point is that each shows a consistent and fairly linear increase over the history of the United States. The obvious conclusion is that as the US has expanded its territory and grown in population, its population has also become relatively more concentrated across states.</p>
<p>Another way to look at this issue is to examine the cumulative distribution of state populations over time, or the Lorenz curves of share of population on the yaxis and share of senators on the xaxis. In lieu of 23 separate plots, an interactive, plotly version is below. For reference, I have also included the value of the popular Gini coefficient for that year. The red line is represents what the distribution would look like if each state had an equal share of the total population. The farther the black curve is from the red line, the more unequally population is distributed across states.</p>
<pre class="r"><code>library(plotly)
out < stpop %>%
ggplot(aes(x = cumSen, y = cumPop)) +
geom_point(aes(frame = year)) +
geom_line(aes(frame = year)) +
geom_text(x = .20, y = .9, vjust = 0, hjust = 0,
aes(label = paste("Year = ", year, "\nGini = ", formatC(Gini, digits = 3, format = "f")),
frame = year)) +
geom_line(data = data.frame(cumSen = c(0,1), cumPop = c(0,1)), color = "red") +
scale_x_continuous(labels = scales::percent) +
scale_y_continuous(labels = scales::percent) +
theme_minimal() +
labs(y = "Cumulative Population", x = "Cumulative Senators")
ggplotly(out, tooltip = NULL)</code></pre>
<div id="672768f2a8bf" style="width:672px;height:480px;" class="plotly htmlwidget"></div>
<script type="application/json" datafor="672768f2a8bf">{"x":{"data":[{"x":[0.0714285714285714,0.142857142857143,0.214285714285714,0.285714285714286,0.357142857142857,0.428571428571429,0.5,0.571428571428571,0.642857142857143,0.714285714285714,0.785714285714286,0.857142857142857,0.928571428571429,1],"y":[0.0151764256918582,0.0329250572814023,0.0541241839229941,0.0760405800406478,0.112481618846134,0.159770299137068,0.220802407025902,0.284766768003772,0.366876017929426,0.454253205113389,0.555694318393686,0.667049826730499,0.789085536632105,1],"text":"","frame":"1790","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387"],"hovertext":["","","","","","","","","","","","","",""],"frame":"1790","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true},{"x":[0,1],"y":[0,1],"text":"","type":"scatter","mode":"lines","line":{"width":1.88976377952756,"color":"rgba(255,0,0,1)","dash":"solid"},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","frame":null}],"layout":{"margin":{"t":26.2283105022831,"r":7.30593607305936,"b":40.1826484018265,"l":48.9497716894977},"font":{"color":"rgba(0,0,0,1)","family":"","size":14.6118721461187},"xaxis":{"domain":[0,1],"type":"linear","autorange":false,"range":[0.05,1.05],"tickmode":"array","ticktext":["0%","25%","50%","75%","100%"],"tickvals":[0,0.25,0.5,0.75,1],"categoryorder":"array","categoryarray":["0%","25%","50%","75%","100%"],"nticks":null,"ticks":"","tickcolor":null,"ticklen":3.65296803652968,"tickwidth":0,"showticklabels":true,"tickfont":{"color":"rgba(77,77,77,1)","family":"","size":11.689497716895},"tickangle":0,"showline":false,"linecolor":null,"linewidth":0,"showgrid":true,"gridcolor":null,"gridwidth":0,"zeroline":false,"anchor":"y","title":"Cumulative Senators","titlefont":{"color":"rgba(0,0,0,1)","family":"","size":14.6118721461187},"hoverformat":".2f"},"yaxis":{"domain":[0,1],"type":"linear","autorange":false,"range":[0.05,1.05],"tickmode":"array","ticktext":["0%","25%","50%","75%","100%"],"tickvals":[0,0.25,0.5,0.75,1],"categoryorder":"array","categoryarray":["0%","25%","50%","75%","100%"],"nticks":null,"ticks":"","tickcolor":null,"ticklen":3.65296803652968,"tickwidth":0,"showticklabels":true,"tickfont":{"color":"rgba(77,77,77,1)","family":"","size":11.689497716895},"tickangle":0,"showline":false,"linecolor":null,"linewidth":0,"showgrid":true,"gridcolor":null,"gridwidth":0,"zeroline":false,"anchor":"x","title":"Cumulative Population","titlefont":{"color":"rgba(0,0,0,1)","family":"","size":14.6118721461187},"hoverformat":".2f"},"shapes":[{"type":"rect","fillcolor":null,"line":{"color":null,"width":0,"linetype":[]},"yref":"paper","xref":"paper","x0":0,"x1":1,"y0":0,"y1":1}],"showlegend":false,"legend":{"bgcolor":null,"bordercolor":null,"borderwidth":0,"font":{"color":"rgba(0,0,0,1)","family":"","size":11.689497716895}},"hovermode":"closest","barmode":"relative","sliders":[{"currentvalue":{"prefix":"~year: ","xanchor":"right","font":{"size":16,"color":"rgba(204,204,204,1)"}},"steps":[{"method":"animate","args":[["1790"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1790","value":"1790"},{"method":"animate","args":[["1800"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1800","value":"1800"},{"method":"animate","args":[["1810"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1810","value":"1810"},{"method":"animate","args":[["1820"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1820","value":"1820"},{"method":"animate","args":[["1830"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1830","value":"1830"},{"method":"animate","args":[["1840"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1840","value":"1840"},{"method":"animate","args":[["1850"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1850","value":"1850"},{"method":"animate","args":[["1860"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1860","value":"1860"},{"method":"animate","args":[["1870"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1870","value":"1870"},{"method":"animate","args":[["1880"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1880","value":"1880"},{"method":"animate","args":[["1890"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1890","value":"1890"},{"method":"animate","args":[["1900"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1900","value":"1900"},{"method":"animate","args":[["1910"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1910","value":"1910"},{"method":"animate","args":[["1920"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1920","value":"1920"},{"method":"animate","args":[["1930"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1930","value":"1930"},{"method":"animate","args":[["1940"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1940","value":"1940"},{"method":"animate","args":[["1950"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1950","value":"1950"},{"method":"animate","args":[["1960"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1960","value":"1960"},{"method":"animate","args":[["1970"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1970","value":"1970"},{"method":"animate","args":[["1980"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1980","value":"1980"},{"method":"animate","args":[["1990"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"1990","value":"1990"},{"method":"animate","args":[["2000"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"2000","value":"2000"},{"method":"animate","args":[["2010"],{"transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false},"mode":"immediate"}],"label":"2010","value":"2010"}],"visible":true,"pad":{"t":40}}],"updatemenus":[{"type":"buttons","direction":"right","showactive":false,"y":0,"x":0,"yanchor":"top","xanchor":"right","pad":{"t":60,"r":5},"buttons":[{"label":"Play","method":"animate","args":[null,{"fromcurrent":true,"mode":"immediate","transition":{"duration":500,"easing":"linear"},"frame":{"duration":500,"redraw":false}}]}]}]},"config":{"doubleClick":"reset","modeBarButtonsToAdd":[{"name":"Collaborate","icon":{"width":1000,"ascent":500,"descent":50,"path":"M487 375c710 923 536l79259c3121123223111822123512l263 0c15 029 543 1513 1023 2328 375 135 251 37 0 0 0 3 1 7 1 5 1 8 1 11 0 2 0 41 6 0 31 51 6 1 2 2 4 3 6 1 2 2 4 4 6 2 3 4 5 5 7 5 7 9 16 13 26 4 10 7 19 9 26 0 2 0 5 0 91 41 6 0 8 0 2 2 5 4 8 3 3 5 5 5 7 4 6 8 15 12 26 4 11 7 19 7 26 1 1 0 4 0 91 41 7 0 8 1 2 3 5 6 8 4 4 6 6 6 7 4 5 8 13 13 24 4 11 7 20 7 28 1 1 0 4 0 71 31 61 7 0 2 1 4 3 6 1 1 3 4 5 6 2 3 3 5 5 6 1 2 3 5 4 9 2 3 3 7 5 10 1 3 2 6 4 10 2 4 4 7 6 9 2 3 4 5 7 7 3 2 7 3 11 3 3 0 8 0 131l01c7 2 12 2 14 2l218 0c14 0 255 3216 810 1023 637l79259c722133720437719103710l248 0c5 0921152327 012 413 1820 4120l264 0c5 0 10 2 16 5 5 3 8 6 10 11l85 282c2 5 2 10 2 17 73 137 1713z m304 0c1315 07 11 32 62l174 0c2 0 4 1 7 2 2 2 4 4 5 7l6 18c0 3 0 51 71 13 26 2l173 0c3 05182224447z m2473c1315 07 22 32 62l174 0c2 0 5 0 7 2 3 2 4 4 5 7l6 18c1 2 0 51 61 23 35 3l174 0c3 05173314456z"},"click":"function(gd) { \n // is this being viewed in RStudio?\n if (location.search == '?viewer_pane=1') {\n alert('To learn about plotly for collaboration, visit:\\n https://cpsievert.github.io/plotly_book/plotlyforcollaboration.html');\n } else {\n window.open('https://cpsievert.github.io/plotly_book/plotlyforcollaboration.html', '_blank');\n }\n }"}],"cloud":false},"source":"A","attrs":{"672778f9f541":{"frame":{},"x":{},"y":{},"type":"scatter"},"67276254bc73":{"frame":{},"x":{},"y":{}},"672729205474":{"label":{},"frame":{},"x":{},"y":{}},"6727988a0c4":{"x":{},"y":{}}},"cur_data":"672778f9f541","visdat":{"672778f9f541":["function (y) ","x"],"67276254bc73":["function (y) ","x"],"672729205474":["function (y) ","x"],"6727988a0c4":["function (y) ","x"]},"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.2,"selected":{"opacity":1}},"frames":[{"name":"1790","data":[{"x":[0.0714285714285714,0.142857142857143,0.214285714285714,0.285714285714286,0.357142857142857,0.428571428571429,0.5,0.571428571428571,0.642857142857143,0.714285714285714,0.785714285714286,0.857142857142857,0.928571428571429,1],"y":[0.0151764256918582,0.0329250572814023,0.0541241839229941,0.0760405800406478,0.112481618846134,0.159770299137068,0.220802407025902,0.284766768003772,0.366876017929426,0.454253205113389,0.555694318393686,0.667049826730499,0.789085536632105,1],"text":"","frame":"1790","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387","Year = 1790 <br />Gini = 0.387"],"hovertext":["","","","","","","","","","","","","",""],"frame":"1790","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1800","data":[{"x":[0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],"y":[0.0122786479178471,0.0254836438162404,0.0456577414532029,0.0751665764325917,0.106245942809809,0.14136998632543,0.181707674455835,0.223918690756426,0.271869855081656,0.337118834264903,0.40314018401638,0.494476490170854,0.604240606709212,0.716772304850823,0.831847495880245,1],"text":"","frame":"1800","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379","Year = 1800 <br />Gini = 0.379"],"hovertext":["","","","","","","","","","","","","","","",""],"frame":"1800","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1810","data":[{"x":[0.0588235294117647,0.117647058823529,0.176470588235294,0.235294117647059,0.294117647058824,0.352941176470588,0.411764705882353,0.470588235294118,0.529411764705882,0.588235294117647,0.647058823529412,0.705882352941177,0.764705882352941,0.823529411764706,0.882352941176471,0.941176470588235,1],"y":[0.0103280859160772,0.0212611565824743,0.0517391997005347,0.0827054088081061,0.115499931003031,0.150398043584199,0.186272630259669,0.223468036354794,0.260693997235289,0.314775398878511,0.372546823787426,0.431541008572252,0.510486047050674,0.61007261948733,0.725198929417167,0.861494447342807,1],"text":"","frame":"1810","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361","Year = 1810 <br />Gini = 0.361"],"hovertext":["","","","","","","","","","","","","","","","",""],"frame":"1810","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1820","data":[{"x":[0.0434782608695652,0.0869565217391304,0.130434782608696,0.173913043478261,0.217391304347826,0.260869565217391,0.304347826086957,0.347826086956522,0.391304347826087,0.434782608695652,0.478260869565217,0.521739130434783,0.565217391304348,0.608695652173913,0.652173913043478,0.695652173913043,0.739130434782609,0.782608695652174,0.826086956521739,0.869565217391304,0.91304347826087,0.956521739130435,1],"y":[0.00580225097197241,0.0134476107002878,0.0213766145461405,0.0301054758868345,0.0435468861414259,0.0590141606619554,0.0751360551188095,0.0999130361217999,0.125572477167384,0.154498922541195,0.183669917696965,0.215022628999485,0.250857947263633,0.293667295644082,0.338101686258499,0.390935894222498,0.44592932858106,0.505234700006148,0.566338936329305,0.633474945207502,0.743764900117651,0.85572802953514,1],"text":"","frame":"1820","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430","Year = 1820 <br />Gini = 0.430"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1820","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1830","data":[{"x":[0.0416666666666667,0.0833333333333333,0.125,0.166666666666667,0.208333333333333,0.25,0.291666666666667,0.333333333333333,0.375,0.416666666666667,0.458333333333333,0.5,0.541666666666667,0.583333333333333,0.625,0.666666666666667,0.708333333333333,0.75,0.791666666666667,0.833333333333333,0.875,0.916666666666667,0.958333333333333,1],"y":[0.00603169840313402,0.0136706603706931,0.0244078348577751,0.0354463270557762,0.0478200795324719,0.0647752129795158,0.085941956966581,0.107998664896903,0.131393226607344,0.155719248283829,0.180933033356908,0.207892166297512,0.23928571512776,0.274419014420732,0.315036626134431,0.360712508716719,0.408685054696552,0.462276539398312,0.51634059149594,0.574339692572628,0.64805038245894,0.743255854966999,0.849214770289256,1],"text":"","frame":"1830","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421","Year = 1830 <br />Gini = 0.421"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1830","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1840","data":[{"x":[0.0384615384615385,0.0769230769230769,0.115384615384615,0.153846153846154,0.192307692307692,0.230769230769231,0.269230769230769,0.307692307692308,0.346153846153846,0.384615384615385,0.423076923076923,0.461538461538462,0.5,0.538461538461538,0.576923076923077,0.615384615384615,0.653846153846154,0.692307692307692,0.730769230769231,0.769230769230769,0.807692307692308,0.846153846153846,0.884615384615385,0.923076923076923,0.961538461538462,1],"y":[0.00462284680335043,0.0103994960188222,0.0168425313983269,0.0294093217217794,0.0462568853539321,0.0635410100711576,0.0818925603869539,0.102756261031323,0.124857003155566,0.147096575730649,0.169812789653159,0.197639207424357,0.225830550952048,0.255538076930067,0.290512457235633,0.325702453959945,0.366307607902786,0.407239916247052,0.450913726376844,0.495518203750648,0.541686166572741,0.590777679639351,0.664177072586184,0.754133698874798,0.856201195102251,1],"text":"","frame":"1840","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406","Year = 1840 <br />Gini = 0.406"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1840","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1850","data":[{"x":[0.032258064516129,0.0645161290322581,0.0967741935483871,0.129032258064516,0.161290322580645,0.193548387096774,0.225806451612903,0.258064516129032,0.290322580645161,0.32258064516129,0.354838709677419,0.387096774193548,0.419354838709677,0.451612903225806,0.483870967741935,0.516129032258065,0.548387096774194,0.580645161290323,0.612903225806452,0.645161290322581,0.67741935483871,0.709677419354839,0.741935483870968,0.774193548387097,0.806451612903226,0.838709677419355,0.870967741935484,0.903225806451613,0.935483870967742,0.967741935483871,1],"y":[0.00379405647137085,0.00776543936275992,0.0117830303865981,0.0181847007173021,0.0265244659478822,0.0356314597287882,0.0448553839481452,0.0581056635507344,0.071734676287735,0.0855309928357436,0.101618885649884,0.118872264711769,0.140113036806708,0.162577651898822,0.187874283161093,0.213176771792265,0.239492672019318,0.268497798779073,0.298090267781985,0.331569383072837,0.368512893435673,0.406218686126206,0.445536166411061,0.488160673790066,0.531045985942922,0.574195877618477,0.617701680383685,0.67938459098058,0.765306942834813,0.865610523756816,1],"text":"","frame":"1850","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441","Year = 1850 <br />Gini = 0.441"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1850","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1860","data":[{"x":[0.0303030303030303,0.0606060606060606,0.0909090909090909,0.121212121212121,0.151515151515152,0.181818181818182,0.212121212121212,0.242424242424242,0.272727272727273,0.303030303030303,0.333333333333333,0.363636363636364,0.393939393939394,0.424242424242424,0.454545454545455,0.484848484848485,0.515151515151515,0.545454545454545,0.575757575757576,0.606060606060606,0.636363636363636,0.666666666666667,0.696969696969697,0.727272727272727,0.757575757575758,0.787878787878788,0.818181818181818,0.848484848484849,0.878787878787879,0.909090909090909,0.939393939393939,0.96969696969697,1],"y":[0.00169019266231197,0.00530530101633847,0.00982914766481835,0.0153709757854491,0.0209964678790909,0.0311475462648562,0.0416521911133848,0.0538939345713582,0.0679222276201288,0.0827461499108916,0.102211312580459,0.122451712002639,0.144101738226156,0.165844481012756,0.187978192600458,0.21064858425223,0.233457309789297,0.257590451804784,0.282585941617559,0.308078325199962,0.339140661141902,0.371118597306001,0.405179724517764,0.440932655172991,0.478163735259742,0.516242988269647,0.555902546451707,0.599407425829971,0.650833804755284,0.705985372818519,0.781354177270976,0.874979704157491,1],"text":"","frame":"1860","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420","Year = 1860 <br />Gini = 0.420"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1860","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1870","data":[{"x":[0.027027027027027,0.0540540540540541,0.0810810810810811,0.108108108108108,0.135135135135135,0.162162162162162,0.189189189189189,0.216216216216216,0.243243243243243,0.27027027027027,0.297297297297297,0.324324324324324,0.351351351351351,0.378378378378378,0.405405405405405,0.432432432432432,0.459459459459459,0.486486486486487,0.513513513513513,0.540540540540541,0.567567567567568,0.594594594594595,0.621621621621622,0.648648648648649,0.675675675675676,0.702702702702703,0.72972972972973,0.756756756756757,0.783783783783784,0.810810810810811,0.837837837837838,0.864864864864865,0.891891891891892,0.918918918918919,0.945945945945946,0.972972972972973,1],"y":[0.00111479169404497,0.00350024285305867,0.00672708088524603,0.0100069680056017,0.0149327148925555,0.0206351770392632,0.0289860794942423,0.0376583985561203,0.0472187520078699,0.0587548560445304,0.0703515126506727,0.083062068928606,0.0971626844738096,0.11186129599657,0.128309005743862,0.146821248526294,0.165892553138487,0.186380048022805,0.207856244631961,0.229577563709344,0.253349851836415,0.279506882751887,0.307177150713535,0.335285322894084,0.366350234015479,0.397416456934307,0.428742704340195,0.460886017894858,0.493904483988607,0.528562460749381,0.566797446748961,0.610890552778582,0.656050360008376,0.722686809858452,0.792612434354705,0.885014159935025,1],"text":"","frame":"1870","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446","Year = 1870 <br />Gini = 0.446"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1870","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1880","data":[{"x":[0.0263157894736842,0.0526315789473684,0.0789473684210526,0.105263157894737,0.131578947368421,0.157894736842105,0.184210526315789,0.210526315789474,0.236842105263158,0.263157894736842,0.289473684210526,0.315789473684211,0.342105263157895,0.368421052631579,0.394736842105263,0.421052631578947,0.447368421052632,0.473684210526316,0.5,0.526315789473684,0.552631578947368,0.578947368421053,0.605263157894737,0.631578947368421,0.657894736842105,0.684210526315789,0.710526315789474,0.736842105263158,0.763157894736842,0.789473684210526,0.815789473684211,0.842105263157895,0.868421052631579,0.894736842105263,0.921052631578947,0.947368421052632,0.973684210526316,1],"y":[0.00126117703104676,0.00423067309900845,0.00777054056057624,0.0117065690337755,0.0171650597289845,0.0227661027632631,0.029496444698483,0.0365246314967347,0.0456878828891418,0.0582145228385537,0.0708271033356599,0.0839710852490534,0.0997853815594229,0.116040257363888,0.1335543454968,0.152491303659167,0.171529595915363,0.19169467549392,0.211870267244114,0.234780643993053,0.257700763236323,0.283272380291886,0.309917332606326,0.33826880129241,0.368905300119462,0.400141640879101,0.431381607223948,0.463621951520862,0.496527985669419,0.52968359781201,0.563077263043701,0.59919305410791,0.639262880043361,0.683182692630988,0.745523941622812,0.810299619171771,0.897048145746095,1],"text":"","frame":"1880","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420","Year = 1880 <br />Gini = 0.420"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1880","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1890","data":[{"x":[0.0227272727272727,0.0454545454545455,0.0681818181818182,0.0909090909090909,0.113636363636364,0.136363636363636,0.159090909090909,0.181818181818182,0.204545454545455,0.227272727272727,0.25,0.272727272727273,0.295454545454545,0.318181818181818,0.340909090909091,0.363636363636364,0.386363636363636,0.409090909090909,0.431818181818182,0.454545454545455,0.477272727272727,0.5,0.522727272727273,0.545454545454545,0.568181818181818,0.590909090909091,0.613636363636364,0.636363636363636,0.659090909090909,0.681818181818182,0.704545454545455,0.727272727272727,0.75,0.772727272727273,0.795454545454545,0.818181818181818,0.840909090909091,0.863636363636364,0.886363636363636,0.909090909090909,0.931818181818182,0.954545454545455,0.977272727272727,1],"y":[0.000739166671754788,0.00171972026124965,0.00308277132210994,0.00521750457034405,0.00793913237620448,0.0108905494146513,0.0159587539795971,0.0212699122804722,0.0266394466734722,0.0322203238416134,0.0378639383483856,0.043945938892863,0.0502684864113089,0.0569266237720305,0.0676049904677689,0.0796591204502951,0.0919803525521837,0.108817833091736,0.125922157306414,0.143990430068333,0.162213640150579,0.180807879241155,0.200322519024969,0.22115312456014,0.242181213798222,0.265232759887568,0.288572422843331,0.313011830640328,0.339146148051784,0.365894803568327,0.393142579518365,0.421692882119416,0.451371213052933,0.481393307127734,0.512275713610575,0.54609781022459,0.581511196466628,0.617621073775718,0.653786193540555,0.697062422650466,0.756380479409538,0.81818662730044,0.903118090957705,1],"text":"","frame":"1890","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462","Year = 1890 <br />Gini = 0.462"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1890","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1900","data":[{"x":[0.0222222222222222,0.0444444444444444,0.0666666666666667,0.0888888888888889,0.111111111111111,0.133333333333333,0.155555555555556,0.177777777777778,0.2,0.222222222222222,0.244444444444444,0.266666666666667,0.288888888888889,0.311111111111111,0.333333333333333,0.355555555555556,0.377777777777778,0.4,0.422222222222222,0.444444444444444,0.466666666666667,0.488888888888889,0.511111111111111,0.533333333333333,0.555555555555556,0.577777777777778,0.6,0.622222222222222,0.644444444444444,0.666666666666667,0.688888888888889,0.711111111111111,0.733333333333333,0.755555555555556,0.777777777777778,0.8,0.822222222222222,0.844444444444444,0.866666666666667,0.888888888888889,0.911111111111111,0.933333333333333,0.955555555555556,0.977777777777778,1],"y":[0.000567438341259844,0.00180768015430141,0.00397599562240788,0.00645209629496339,0.00971356326414767,0.0134229761259717,0.0177006583477673,0.0223066599783064,0.0276891145596154,0.0332058456804954,0.0387486868731547,0.0444928490504774,0.051437256914461,0.0585215842031385,0.0657554680528595,0.0750637622562694,0.0872397948053959,0.100091097075384,0.114383278563169,0.13030725911599,0.14788684339888,0.165851805907538,0.18437045473813,0.204080275067194,0.223985223951166,0.244777714222718,0.268252572053176,0.29276356277827,0.317616169211494,0.342863978656223,0.368247713274418,0.395331095614399,0.423063557182297,0.451843263169217,0.481549916914883,0.511464620216072,0.543914319290122,0.577643787180129,0.615245319739476,0.656108788391473,0.697749058485958,0.753474827672521,0.818100606208045,0.902571178595639,1],"text":"","frame":"1900","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467","Year = 1900 <br />Gini = 0.467"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1900","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1910","data":[{"x":[0.0217391304347826,0.0434782608695652,0.0652173913043478,0.0869565217391304,0.108695652173913,0.130434782608696,0.152173913043478,0.173913043478261,0.195652173913043,0.217391304347826,0.239130434782609,0.260869565217391,0.282608695652174,0.304347826086957,0.326086956521739,0.347826086956522,0.369565217391304,0.391304347826087,0.41304347826087,0.434782608695652,0.456521739130435,0.478260869565217,0.5,0.521739130434783,0.543478260869565,0.565217391304348,0.58695652173913,0.608695652173913,0.630434782608696,0.652173913043478,0.673913043478261,0.695652173913043,0.717391304347826,0.739130434782609,0.760869565217391,0.782608695652174,0.804347826086957,0.826086956521739,0.847826086956522,0.869565217391304,0.891304347826087,0.91304347826087,0.934782608695652,0.956521739130435,0.978260869565217,1],"y":[0.000898643525175442,0.00250072599421035,0.00472137155513305,0.00829502578335867,0.012201927214166,0.0162997526647648,0.0204272347236692,0.0251531063563024,0.0311086845327353,0.0374423350739706,0.0438509722724761,0.05123510553922,0.0593832202558981,0.0676438149584815,0.0764137416034865,0.0886490791491411,0.101183331598791,0.114268832566407,0.12767158899778,0.141889046045254,0.158521771517631,0.175802606932214,0.193982788323094,0.212171388151638,0.230730904124181,0.250455665774283,0.273083504250301,0.295866057585933,0.319333336128503,0.34331314057094,0.367528902735566,0.391947541564856,0.417081078071932,0.442697055814417,0.468792555229835,0.496639989695042,0.52527717678572,0.554921448293528,0.585765341680677,0.62191232395834,0.658861428586701,0.701629089519515,0.753952050379092,0.815840090602146,0.899970806570403,1],"text":"","frame":"1910","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448","Year = 1910 <br />Gini = 0.448"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1910","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1920","data":[{"x":[0.0208333333333333,0.0416666666666667,0.0625,0.0833333333333333,0.104166666666667,0.125,0.145833333333333,0.166666666666667,0.1875,0.208333333333333,0.229166666666667,0.25,0.270833333333333,0.291666666666667,0.3125,0.333333333333333,0.354166666666667,0.375,0.395833333333333,0.416666666666667,0.4375,0.458333333333333,0.479166666666667,0.5,0.520833333333333,0.541666666666667,0.5625,0.583333333333333,0.604166666666667,0.625,0.645833333333333,0.666666666666667,0.6875,0.708333333333333,0.729166666666667,0.75,0.770833333333333,0.791666666666667,0.8125,0.833333333333333,0.854166666666667,0.875,0.895833333333333,0.916666666666667,0.9375,0.958333333333333,0.979166666666667,1],"y":[0.000735297393442126,0.0025819428373934,0.00470027224726298,0.00787451291784067,0.0112222642811027,0.0146452675718499,0.0187476090153405,0.022956501944643,0.0272253627378958,0.032439318206898,0.0381805501200872,0.0442271783307582,0.0503718848235908,0.0576673321646202,0.0651088282793286,0.0740344649078329,0.0832340652879909,0.0955484419274597,0.108435130278498,0.121549892194157,0.135320377481983,0.149224230235333,0.165218105059005,0.181862478745866,0.19866884070834,0.215678113100379,0.232762342947579,0.252029220659711,0.273964435589503,0.296172255898616,0.318477812522029,0.341153368871203,0.363989422136155,0.386945249644185,0.411254633438904,0.436256920111492,0.463764738802906,0.491600827642014,0.521579060152821,0.553914543618575,0.586466663723843,0.621313302679904,0.657907245416493,0.702203748231824,0.756912849424303,0.818517219568378,0.901349605607992,1],"text":"","frame":"1920","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466","Year = 1920 <br />Gini = 0.466"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1920","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1930","data":[{"x":[0.0208333333333333,0.0416666666666667,0.0625,0.0833333333333333,0.104166666666667,0.125,0.145833333333333,0.166666666666667,0.1875,0.208333333333333,0.229166666666667,0.25,0.270833333333333,0.291666666666667,0.3125,0.333333333333333,0.354166666666667,0.375,0.395833333333333,0.416666666666667,0.4375,0.458333333333333,0.479166666666667,0.5,0.520833333333333,0.541666666666667,0.5625,0.583333333333333,0.604166666666667,0.625,0.645833333333333,0.666666666666667,0.6875,0.708333333333333,0.729166666666667,0.75,0.770833333333333,0.791666666666667,0.8125,0.833333333333333,0.854166666666667,0.875,0.895833333333333,0.916666666666667,0.9375,0.958333333333333,0.979166666666667,1],"y":[0.000744618181690614,0.00258915463266739,0.00453848453395458,0.00747916947032418,0.0109408041956501,0.014502661201663,0.0181418682854353,0.02194675778019,0.0260996285846996,0.0304958507967618,0.0360633963821376,0.0416853380682909,0.0473510452281908,0.053871896381283,0.0616713911762705,0.070141474101785,0.0814096361907497,0.093415792763024,0.10620031566911,0.119340612952305,0.132682262488875,0.146822672808345,0.161041259123521,0.176206110260357,0.19158780165641,0.208022922772003,0.225208500736747,0.24480189119182,0.264606348657892,0.284812218600658,0.305778701730094,0.327159255959797,0.348555895145939,0.37019533785347,0.393979370548634,0.418012814108759,0.443937446217716,0.470419998165481,0.500098803500849,0.533146430010155,0.567897246517952,0.607494901162849,0.653920084195874,0.701551140140064,0.755903876136775,0.818302827427054,0.897062281008572,1],"text":"","frame":"1930","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479","Year = 1930 <br />Gini = 0.479"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1930","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1940","data":[{"x":[0.0208333333333333,0.0416666666666667,0.0625,0.0833333333333333,0.104166666666667,0.125,0.145833333333333,0.166666666666667,0.1875,0.208333333333333,0.229166666666667,0.25,0.270833333333333,0.291666666666667,0.3125,0.333333333333333,0.354166666666667,0.375,0.395833333333333,0.416666666666667,0.4375,0.458333333333333,0.479166666666667,0.5,0.520833333333333,0.541666666666667,0.5625,0.583333333333333,0.604166666666667,0.625,0.645833333333333,0.666666666666667,0.6875,0.708333333333333,0.729166666666667,0.75,0.770833333333333,0.791666666666667,0.8125,0.833333333333333,0.854166666666667,0.875,0.895833333333333,0.916666666666667,0.9375,0.958333333333333,0.979166666666667,1],"y":[0.000841540426824431,0.00275551114442048,0.00478980442633151,0.00753189635689259,0.0112838108466697,0.0150947836172375,0.0191012586092882,0.0231607463659883,0.027361387764718,0.0316318426617174,0.0365318785256733,0.0414397460809942,0.0468848783504754,0.0533519471111379,0.0616697529331898,0.070244126796335,0.0802881870065004,0.0933352199618302,0.106587960763745,0.120335617133921,0.134237586830252,0.14872097946155,0.163222615506456,0.177740815654931,0.192620930016556,0.209290341591814,0.227124873738785,0.245168907446384,0.264544084422763,0.284984134794736,0.306298395807025,0.327923031480712,0.349644349613298,0.371901627178149,0.395745715332034,0.419695630551303,0.445860777075989,0.473123787805315,0.502012988944094,0.533768474624068,0.566718987860909,0.606840040467097,0.655805851119211,0.708531507184424,0.761258880725814,0.821540317516614,0.897110643265512,1],"text":"","frame":"1940","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477","Year = 1940 <br />Gini = 0.477"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1940","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1950","data":[{"x":[0.0208333333333333,0.0416666666666667,0.0625,0.0833333333333333,0.104166666666667,0.125,0.145833333333333,0.166666666666667,0.1875,0.208333333333333,0.229166666666667,0.25,0.270833333333333,0.291666666666667,0.3125,0.333333333333333,0.354166666666667,0.375,0.395833333333333,0.416666666666667,0.4375,0.458333333333333,0.479166666666667,0.5,0.520833333333333,0.541666666666667,0.5625,0.583333333333333,0.604166666666667,0.625,0.645833333333333,0.666666666666667,0.6875,0.708333333333333,0.729166666666667,0.75,0.770833333333333,0.791666666666667,0.8125,0.833333333333333,0.854166666666667,0.875,0.895833333333333,0.916666666666667,0.9375,0.958333333333333,0.979166666666667,1],"y":[0.00106796626634782,0.00300618063886562,0.00512823013713369,0.00764830443118172,0.0112057369368185,0.0151327276798966,0.0190756428838968,0.0232094381364514,0.0275640810447919,0.0321085032324988,0.0367041278657759,0.041704868916936,0.0469878672019242,0.0530839536512394,0.0619240575467722,0.0707669700715668,0.0809163355108194,0.0936272108648934,0.106366185854243,0.119745881895712,0.133137105992678,0.147260488368993,0.161796739246806,0.176696157229441,0.192327086372568,0.208197929828086,0.225683968605689,0.243586585143389,0.262074870931143,0.281720638869892,0.301617762449259,0.322043655518646,0.344003787339825,0.366143791517678,0.389056969301962,0.412036880384362,0.438283380738904,0.464666169661595,0.491764632011126,0.52305659133118,0.555314659075371,0.597822802632538,0.649266710263353,0.70228126875644,0.760403056044816,0.830438741781057,0.90106291873927,1],"text":"","frame":"1950","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482","Year = 1950 <br />Gini = 0.482"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1950","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1960","data":[{"x":[0.02,0.04,0.06,0.08,0.1,0.12,0.14,0.16,0.18,0.2,0.22,0.24,0.26,0.28,0.3,0.32,0.34,0.36,0.38,0.4,0.42,0.44,0.46,0.48,0.5,0.52,0.54,0.56,0.58,0.6,0.62,0.64,0.66,0.68,0.7,0.72,0.74,0.76,0.78,0.8,0.82,0.84,0.86,0.88,0.9,0.92,0.94,0.96,0.98,1],"y":[0.00126662178930541,0.00286428780958895,0.00471278377720969,0.00689626664533891,0.00939567271073612,0.0127946626738476,0.0163366024093486,0.0198803678696605,0.0236168929074797,0.0273958464458131,0.0312069853844176,0.0360204472442227,0.0410082994257687,0.0463343923302622,0.0517626474188079,0.0590552475584557,0.0669592358940679,0.0767820106025216,0.0866873349542671,0.0966911420385285,0.107110211911151,0.119308635424658,0.131509691118108,0.144548972914706,0.157892411504192,0.172090692532759,0.187533955471278,0.203513046240272,0.22052788301535,0.237892928531537,0.256133498700692,0.274428493390437,0.293547438807431,0.313524502887476,0.335607462131569,0.357738926291575,0.379955359460266,0.404147966124919,0.429664178474435,0.455775952337964,0.483506584070503,0.512340592032489,0.54631689393403,0.590129775487764,0.643779639921256,0.698139184870212,0.754597529298137,0.817990312580945,0.906012672400716,1],"text":"","frame":"1960","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506","Year = 1960 <br />Gini = 0.506"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1960","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1970","data":[{"x":[0.02,0.04,0.06,0.08,0.1,0.12,0.14,0.16,0.18,0.2,0.22,0.24,0.26,0.28,0.3,0.32,0.34,0.36,0.38,0.4,0.42,0.44,0.46,0.48,0.5,0.52,0.54,0.56,0.58,0.6,0.62,0.64,0.66,0.68,0.7,0.72,0.74,0.76,0.78,0.8,0.82,0.84,0.86,0.88,0.9,0.92,0.94,0.96,0.98,1],"y":[0.00148369456315261,0.00312561655549882,0.00532032198140849,0.0077343744659318,0.0104416569423858,0.0134930003551992,0.0167801784072796,0.0202101138158734,0.0237297381068828,0.0273734094621603,0.0311696082262378,0.0358458229638075,0.0407459042735611,0.0457642931123166,0.0509964228371149,0.0583239274764573,0.0669393403632136,0.0756864513814735,0.0851862960287513,0.0955163975460158,0.106418842358853,0.117368966805017,0.128465622278043,0.141106573310936,0.15390206207178,0.167852669350174,0.182827368767452,0.198725713517094,0.215564823417715,0.232576791129164,0.250562509031618,0.269356627140071,0.288730764308128,0.308111263370697,0.329932023157138,0.352601582167602,0.375562163276482,0.398661081015486,0.423763195349637,0.449416591552186,0.477517445124807,0.51105294214505,0.546459078180452,0.590296300099969,0.642910437130514,0.697806355548424,0.753111025688737,0.811365377353007,0.901444306137999,1],"text":"","frame":"1970","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510","Year = 1970 <br />Gini = 0.510"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1970","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1980","data":[{"x":[0.02,0.04,0.06,0.08,0.1,0.12,0.14,0.16,0.18,0.2,0.22,0.24,0.26,0.28,0.3,0.32,0.34,0.36,0.38,0.4,0.42,0.44,0.46,0.48,0.5,0.52,0.54,0.56,0.58,0.6,0.62,0.64,0.66,0.68,0.7,0.72,0.74,0.76,0.78,0.8,0.82,0.84,0.86,0.88,0.9,0.92,0.94,0.96,0.98,1],"y":[0.00177883005126984,0.00385736687806413,0.00612137344443392,0.00875226473252731,0.011641575981161,0.0146993234469022,0.0181816783820236,0.0217251335537941,0.0258002975660761,0.0299787118152515,0.0341713752611069,0.0384416678346965,0.0434200777564365,0.0491874567123659,0.0556548700611372,0.0626038434000979,0.0712341201356987,0.0813552329070373,0.0918182732796018,0.102976106961172,0.114631786061508,0.126664212328488,0.139456901186518,0.15235513768221,0.165746859404456,0.179502827600142,0.193321848159144,0.20952661096575,0.22676326084513,0.244805913281168,0.263097278163513,0.28171507757831,0.300381901489296,0.320704912319146,0.341535418536311,0.363299576917049,0.386967753771332,0.411150685622298,0.435453662196707,0.460849178994841,0.486885351893097,0.519486411675662,0.560485843513844,0.603628834375164,0.651425526996292,0.702006049627256,0.754522661384126,0.817509471311334,0.895231876172737,1],"text":"","frame":"1980","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497","Year = 1980 <br />Gini = 0.497"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1980","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"1990","data":[{"x":[0.02,0.04,0.06,0.08,0.1,0.12,0.14,0.16,0.18,0.2,0.22,0.24,0.26,0.28,0.3,0.32,0.34,0.36,0.38,0.4,0.42,0.44,0.46,0.48,0.5,0.52,0.54,0.56,0.58,0.6,0.62,0.64,0.66,0.68,0.7,0.72,0.74,0.76,0.78,0.8,0.82,0.84,0.86,0.88,0.9,0.92,0.94,0.96,0.98,1],"y":[0.00182822476698012,0.0040452195629272,0.00631346324092618,0.00888820062627786,0.0115732470485148,0.0143785499902091,0.0175992490021472,0.0216437954574611,0.0257015823828923,0.030168393024456,0.0346393269539741,0.0394834164280651,0.0444326840049595,0.0505392976488033,0.0569011117815182,0.0638452043055526,0.0710739649218149,0.080548760695423,0.0905348320836123,0.100906396635561,0.112098342328207,0.123554557324873,0.136233103502553,0.149482102336597,0.16276043576471,0.176813886869465,0.19158689807397,0.206440795048433,0.222726722424241,0.239735680233062,0.257369886494669,0.276641997353252,0.296257610746164,0.315915517062345,0.335632205423028,0.356257000596281,0.378603201985814,0.402852911399816,0.427791580715963,0.453902577781686,0.480619859400073,0.511777035416661,0.549242515526003,0.592962729229367,0.63903473659705,0.686924702832964,0.739072106967457,0.807537671062088,0.880049720323182,1],"text":"","frame":"1990","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505","Year = 1990 <br />Gini = 0.505"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"1990","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"2000","data":[{"x":[0.02,0.04,0.06,0.08,0.1,0.12,0.14,0.16,0.18,0.2,0.22,0.24,0.26,0.28,0.3,0.32,0.34,0.36,0.38,0.4,0.42,0.44,0.46,0.48,0.5,0.52,0.54,0.56,0.58,0.6,0.62,0.64,0.66,0.68,0.7,0.72,0.74,0.76,0.78,0.8,0.82,0.84,0.86,0.88,0.9,0.92,0.94,0.96,0.98,1],"y":[0.00175817079935956,0.00392597329775294,0.00615824084817821,0.0084448719674752,0.0111325857336144,0.0139226887312493,0.0171350636341988,0.0208677307913933,0.0251815554665408,0.0295817216521396,0.0341212398808962,0.0387285167365607,0.0448216765451896,0.0512605050484503,0.0577374393228706,0.0648524761346941,0.0728039456613982,0.0823229111461827,0.091895350044467,0.102024100443964,0.112443632557863,0.124569560474071,0.136751867270912,0.149038340049372,0.163323596184833,0.177714805733898,0.193029968074008,0.208864407891239,0.224776739864131,0.242293142499024,0.260561381042874,0.279420162902919,0.298518179360091,0.318440607874,0.338697991172486,0.359684725055236,0.381335030600889,0.403941761805553,0.429145674414414,0.457806231242134,0.486955091700655,0.516915407114322,0.552302444373416,0.592726678608445,0.636454863370461,0.680675264886293,0.73758246341505,0.805150443966594,0.879395882312872,1],"text":"","frame":"2000","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503","Year = 2000 <br />Gini = 0.503"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"2000","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]},{"name":"2010","data":[{"x":[0.02,0.04,0.06,0.08,0.1,0.12,0.14,0.16,0.18,0.2,0.22,0.24,0.26,0.28,0.3,0.32,0.34,0.36,0.38,0.4,0.42,0.44,0.46,0.48,0.5,0.52,0.54,0.56,0.58,0.6,0.62,0.64,0.66,0.68,0.7,0.72,0.74,0.76,0.78,0.8,0.82,0.84,0.86,0.88,0.9,0.92,0.94,0.96,0.98,1],"y":[0.00182910048024167,0.00385977891524449,0.00604249674782536,0.00834736533653937,0.010989573164076,0.0139035826501986,0.0171144697484842,0.0205303001132767,0.0248025585066505,0.0291134060243916,0.0335279064419969,0.0386150830254373,0.044541994133486,0.0505554005684002,0.0572379263883651,0.0660018569576027,0.0749713214266527,0.0842303682129723,0.0936932159420432,0.103322800751331,0.11320894758183,0.124807742774263,0.13698176937285,0.149414516075878,0.16349679450811,0.17820866532726,0.193219072075161,0.208730452694629,0.225051390371084,0.242263889022079,0.260719511764336,0.279456061774273,0.298891554905945,0.319486175635231,0.340229791728904,0.361271271987075,0.382519886047364,0.404342618397192,0.43030784505605,0.458839633046018,0.489784544271966,0.521223283355533,0.55329804688762,0.590736747385308,0.631958989668509,0.673597443453473,0.734612168022908,0.797498719875328,0.879102048502904,1],"text":"","frame":"2010","type":"scatter","mode":"markers+lines","marker":{"autocolorscale":false,"color":"rgba(0,0,0,1)","opacity":1,"size":5.66929133858268,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)","dash":"solid"},"visible":true},{"x":[0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2],"y":[0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9],"text":["Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503","Year = 2010 <br />Gini = 0.503"],"hovertext":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"frame":"2010","textfont":{"size":14.6645669291339,"color":"rgba(0,0,0,1)"},"type":"scatter","mode":"text","hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","visible":true}],"traces":[0,1]}],"base_url":"https://plot.ly"},"evals":["config.modeBarButtonsToAdd.0.click"],"jsHooks":{"render":[{"code":"function(el, x) { var ctConfig = crosstalk.var('plotlyCrosstalkOpts').set({\"on\":\"plotly_click\",\"persistent\":false,\"dynamic\":false,\"selectize\":false,\"opacityDim\":0.2,\"selected\":{\"opacity\":1}}); }","data":null}]}}</script>
<p>This post doesn’t fully address the implications of <span class="citation">@NormOrnstein</span>’s point: I don’t do any forecasting and don’t disaggregate anything by race or other predictors of party identification, but I think it is interesting to think about whether and at what point the reality of where people live overcome whatever benefits may have come from a legislative body that divides power equally across arbitrarily chosen geographic divisions. At what point does this violate the basic <strong>one person, one vote</strong> premise of democracy?</p>
</div>

Uncovering the relationships among functions in a package
https://www.carlbfrederick.com/post/uncoveringtherelationshipsamongfunctionsinapackage/
Sat, 03 Mar 2018 00:00:00 +0000
https://www.carlbfrederick.com/post/uncoveringtherelationshipsamongfunctionsinapackage/
<script src="https://www.carlbfrederick.com/rmarkdownlibs/htmlwidgets/htmlwidgets.js"></script>
<script src="https://www.carlbfrederick.com/rmarkdownlibs/viz/viz.js"></script>
<link href="https://www.carlbfrederick.com/rmarkdownlibs/DiagrammeRstyles/styles.css" rel="stylesheet" />
<script src="https://www.carlbfrederick.com/rmarkdownlibs/grVizbinding/grViz.js"></script>
<p>I maintain a few internal R packages that we have at work. Recently, and perhaps foolishly, I decided that I needed to totally refactor one of them to add some more bells and whistles. A substantial part of this task involved simplifying the internal workflow of the package. I needed to be sure not to omit any of the previous functionality, but a simple list of all the exported and unexported functions was not sufficient.<a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a></p>
<p>So, I decided to map the dependencies between all of the internal functions (e.g. which functions called which). I found it useful, so I thought I’d share a function I wrote that does just that: visualizes the relationships among functions in a package. The functions are available at <a href="https://gist.github.com/carlbfrederick/b30d861ea80a27fad4e44623c41e0170">this gist</a>.</p>
<p>For the sake of this post, I will use the <a href="https://cran.rproject.org/web/packages/merTools/index.html"><code>merTools</code></a> package that I have had the pleasure of working on with a great coauthor. The end results are:</p>
<pre class="r"><code>suppressMessages(
devtools::source_gist("b30d861ea80a27fad4e44623c41e0170", filename = "packageFunctionMap.R")
)
fake < plotFcnDependencies("merTools")
fake %>% select_nodes_by_degree(expressions = "deg > 0") %>% transform_to_subgraph_ws %>% render_graph</code></pre>
<div id="htmlwidget1" style="width:672px;height:480px;" class="grViz htmlwidget"></div>
<script type="application/json" datafor="htmlwidget1">{"x":{"diagram":"digraph {\n\ngraph [layout = \"dot\",\n outputorder = \"edgesfirst\",\n bgcolor = \"white\",\n rankdir = \"LR\"]\n\nnode [fontname = \"Helvetica\",\n fontsize = \"10\",\n shape = \"circle\",\n fixedsize = \"false\",\n width = \"0.5\",\n style = \"filled\",\n fillcolor = \"aliceblue\",\n color = \"gray70\",\n fontcolor = \"gray50\"]\n\nedge [fontname = \"Helvetica\",\n fontsize = \"8\",\n len = \"1.5\",\n color = \"gray80\",\n arrowsize = \"0.5\"]\n\n \"1\" [label = \"averageObs\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"4\" [label = \"buildModelMatrix\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"5\" [label = \"collapseFrame\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"7\" [label = \"draw.merMod\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"8\" [label = \"easyVarCorr\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"9\" [label = \"expectedRank\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"10\" [label = \"fastdisp\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"12\" [label = \"findFormFuns\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"18\" [label = \"mkNewReTrms\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"19\" [label = \"modelFixedEff\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"24\" [label = \"predictInterval\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"25\" [label = \"print.merModList\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"26\" [label = \"randomObs\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"29\" [label = \"REimpact\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"30\" [label = \"reOnly\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"31\" [label = \"REquantile\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"33\" [label = \"residDF.merMod\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"37\" [label = \"RHSForm\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"41\" [label = \"setup_parallel\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"44\" [label = \"stripAttributes\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"46\" [label = \"subsetList\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"47\" [label = \"superFactor\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"51\" [label = \"wiggle\", fontsize = \"20\", shape = \"rectangle\", fillcolor = \"#F0F8FF\", fontcolor = \"#000000\"] \n \"1\">\"12\" \n \"1\">\"31\" \n \"1\">\"44\" \n \"1\">\"46\" \n \"1\">\"47\" \n \"4\">\"18\" \n \"4\">\"30\" \n \"4\">\"37\" \n \"7\">\"1\" \n \"7\">\"26\" \n \"10\">\"8\" \n \"12\">\"5\" \n \"24\">\"4\" \n \"24\">\"33\" \n \"24\">\"41\" \n \"25\">\"19\" \n \"26\">\"44\" \n \"26\">\"46\" \n \"26\">\"47\" \n \"29\">\"9\" \n \"29\">\"24\" \n \"51\">\"47\" \n}","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
<p>This diagram shows which of the <code>merTools</code> functions call other <code>merTools</code> functions. Well, technically it shows all of the functions that explicitly call other functions. It does <strong>not</strong> include dependencies that are based on the output of other functions and/or functions that do not call other internal functions. The latter would have degree = 0 in social network terms.</p>
<p>Columns to the left are upstream and columns to the right are downstream. For example <code>REimpact()</code> calls <code>expectedRank()</code> and <code>predictInterval()</code>. <code>predictInterval()</code> then goes on to call three more functions, etc.</p>
<p>The practical value of this exercise comes from the following sorts of insights:</p>
<ul>
<li><code>stripAttributes()</code> is called by both <code>averageObs()</code> and <code>randomObs()</code>, don’t forget to include that functionality in whatever function(s) replace those two; and</li>
<li><code>fastdisp()</code> is the only function that calls <code>easyVarCorr()</code>, perhaps <code>easyVarCorr()</code> is a good candidate to be rolled into <code>fastdisp()</code> if there are no other use cases for this function.</li>
</ul>
<div id="steppingthroughthefunctions" class="section level2">
<h2>Stepping through the functions</h2>
<p>The first function, <code>ls_fcns()</code>, retrieves the names of the functions from a namespace (using <code>lsf.str</code>) and returns it as a character vector.</p>
<pre class="r"><code>ls_fcns < function(pkg) {
fcns < unclass(lsf.str(envir = asNamespace(pkg), all = TRUE))
return(as.character(fcns))
}
ls_fcns("merTools")</code></pre>
<pre><code>## [1] "averageObs" "bglmerModList" "blmerModList"
## [4] "buildModelMatrix" "collapseFrame" "draw"
## [7] "draw.merMod" "easyVarCorr" "expectedRank"
## [10] "fastdisp" "FEsim" "findFormFuns"
## [13] "formulaBuild" "glmerModList" "ICC"
## [16] "levelfun" "lmerModList" "mkNewReTrms"
## [19] "modelFixedEff" "modelInfo" "modelRandEffStats"
## [22] "plotFEsim" "plotREsim" "predictInterval"
## [25] "print.merModList" "randomObs" "REcorrExtract"
## [28] "REextract" "REimpact" "reOnly"
## [31] "REquantile" "REsdExtract" "residDF.merMod"
## [34] "REsim" "reTermCount" "reTermNames"
## [37] "RHSForm" "RMSE.merMod" "safeDeparse"
## [40] "sanitizeNames" "setup_parallel" "shinyMer"
## [43] "shuffle" "stripAttributes" "subBoot"
## [46] "subsetList" "superFactor" "thetaExtract"
## [49] "trimModelFrame" "VarCorr.merModList" "wiggle"
## [52] "zzz"</code></pre>
<p>The second function, <code>fcn_deps()</code>, cycles through each function to and does a regular expression search to see which, if any, of the other functions from that namespace are called. This part could be written more efficiently, I’m sure, but I was starting to feel bad about procrastinating too much. Feel free to suggest improvements in the comments or via twitter – <a href="https://twitter.com/carlbfrederick">@carlbfrederick</a>.</p>
<pre class="r"><code>fcn_deps < function(pkg) {
fcns < ls_fcns(pkg)
out < data.frame(Function = as.character(),
Dependency_Function = as.character(),
Number_Calls = as.integer())
for (i in fcns) {
this_fcn < capture.output(getAnywhere(i))
for (j in fcns[grep(i, fcns)]) {
dep_fcns < grep(paste(j, "\\(", sep=""), this_fcn)
if (length(dep_fcns > 0)) {
out < rbind(out,
data.frame(Function = i,
Dependency_Function = j,
Number_Calls = length(dep_fcns)))
}
}
}
return(out)
}
fcn_deps("merTools") %>% as_data_frame</code></pre>
<pre><code>## # A tibble: 22 x 3
## Function Dependency_Function Number_Calls
## * <fct> <fct> <int>
## 1 averageObs findFormFuns 1
## 2 averageObs REquantile 1
## 3 averageObs stripAttributes 1
## 4 averageObs subsetList 2
## 5 averageObs superFactor 1
## 6 buildModelMatrix mkNewReTrms 1
## 7 buildModelMatrix reOnly 1
## 8 buildModelMatrix RHSForm 1
## 9 draw.merMod averageObs 1
## 10 draw.merMod randomObs 1
## # ... with 12 more rows</code></pre>
<p>As you can see, <code>fcn_deps()</code> returns a data.frame with three columns: Function, Dependency_Function and Number_Calls. The first two are used to create the diagram. I don’t recall what I originally intended to do with Number_Calls, but it is still there.</p>
<p>The third function, <code>plotFcnDependencies()</code>, produces the <a href="https://cran.rstudio.com/web/packages/DiagrammeR/index.html"><code>DiagrammeR</code></a> <span class="citation">[@Ianone]</span><br />
object that can be plotted. It is definitely “hacky” and will throw some errors that I haven’t quite ironed out yet, hence the <code>try()</code> in there.</p>
<p>The for loop is used to place the functions horizontally in the diagram above by calculating the longest of the shortest paths from each function to all the others. For example, the longest shortest paths between <code>draw.MerMod()</code> and the rest of the functions is 4. I call this quantity depth in the function.</p>
<p>Using this depth quantity, the rest of the function just creates the node and edge data.frames and then creates the diagram using the <code>DiagrammeR</code> package … and voila!</p>
<pre class="r"><code>plotFcnDependencies < function(pkg) {
fcns < ls_fcns(pkg)
depFcn < fcn_deps(pkg)
depth < NULL
for (i in fcns) {
try(suppressWarnings(dist < max(sapply(igraph::shortest_paths(igraph::graph_from_data_frame(depFcn[,1:2]), from = i)$vpath, length))))
depth < c(depth, dist)
dist < 0
}
nodes < data.frame(nodes = fcns,
type = "",
label = htmltools::htmlEscape(fcns),
depth = depth)
nodes < dplyr::arrange(nodes, desc(depth))
out < DiagrammeR::create_graph(
nodes_df = nodes,
edges_df = DiagrammeR::create_edges(
from = depFcn$Function,
to = depFcn$Dependency_Function,
rel = "leading_to"
),
graph_name = paste(pkg, " (version ", packageVersion(pkg), ") Function Map", sep=""),
graph_attrs = c("layout = dot", "rankdir = LR"),
node_attrs = "fontsize = 20"
)
return(out)
}</code></pre>
</div>
<div id="advice" class="section level2">
<h2>Advice</h2>
<p>Many packages have <em>a lot</em> of functions. Mapping an entire package often results in an unreadable network diagram. Go ahead an make a diagram of <code>dplyr</code> once and you will see what I mean.</p>
</div>
<div id="ideasforfurtherenhancements" class="section level2">
<h2>Ideas for further enhancements</h2>
<ol style="liststyletype: decimal">
<li>Differentiate exported functions from unexported functions.</li>
<li>Add an argument to focus on certain function(s) to focus the diagram on the area of interest.</li>
</ol>
<p>Thanks for reading! Feel free to join the discussion below.</p>
<pre class="r"><code>devtools::session_info()</code></pre>
<pre><code>## Session info </code></pre>
<pre><code>## setting value
## version R version 3.3.2 (20161031)
## system x86_64, darwin13.4.0
## ui X11
## language (EN)
## collate en_US.UTF8
## tz <NA>
## date 20180303</code></pre>
<pre><code>## Packages </code></pre>
<pre><code>## package * version date
## abind 1.45 20160721
## arm 1.93 20161127
## assertthat 0.2.0 20170411
## backports 1.1.2 20171213
## bindr 0.1 20161113
## bindrcpp * 0.2 20170617
## blme 1.04 20150614
## blogdown 0.5 20180128
## bookdown 0.5 20170820
## brew 1.06 20110413
## broom 0.4.2 20170213
## cellranger 1.1.0 20160727
## cli 1.0.0 20171105
## coda 0.191 20161208
## colorspace 1.32 20161214
## crayon 1.3.4 20170916
## curl 3.1 20180130
## devtools 1.12.0 20160624
## DiagrammeR * 0.9.3 20180130
## digest 0.6.12 20170127
## downloader 0.4 20150709
## dplyr * 0.7.4 20170928
## DT 0.2 20160809
## evaluate 0.10.1 20170624
## forcats * 0.2.0 20170123
## foreign 0.867 20160913
## ggplot2 * 2.2.1 20161230
## glue 1.2.0 20171029
## gridExtra 2.3 20170909
## gtable 0.2.0 20160226
## haven 1.1.0 20170709
## hms 0.3 20161122
## htmltools 0.3.6 20170428
## htmlwidgets 1.0 20180120
## httpuv 1.3.5 20170704
## httr 1.3.1 20170820
## igraph 1.1.2 20170721
## influenceR 0.1.0 20150903
## jsonlite 1.5 20170601
## knitr 1.18.10 20180128
## lattice 0.2034 20160906
## lazyeval 0.2.0 20160612
## lme4 1.112 20160416
## lubridate 1.7.1 20171103
## magrittr 1.5 20141122
## MASS 7.345 20160421
## Matrix 1.27.1 20160901
## memoise 1.0.0 20160129
## merTools 0.3.0 20161212
## mime 0.5 20160707
## minqa 1.2.4 20141009
## mnormt 1.55 20161015
## modelr 0.1.1 20170724
## munsell 0.4.3 20160213
## mvtnorm 1.05 20160202
## nlme 3.1128 20160510
## nloptr 1.0.4 20140804
## pillar 1.1.0 20180114
## pkgconfig 2.0.1 20170321
## plyr 1.8.4 20160608
## psych 1.7.3.21 20170322
## purrr * 0.2.4 20171018
## R6 2.2.2 20170617
## RColorBrewer 1.12 20141207
## Rcpp 0.12.13 20170928
## readr * 1.1.1 20170516
## readxl 1.0.0 20170418
## reshape2 1.4.2 20161022
## rgexf 0.15.3 20150324
## rlang 0.1.6 20171221
## rmarkdown 1.8 20171117
## Rook 1.11 20141020
## rprojroot 1.32 20180103
## rstudioapi 0.7 20170907
## rvest 0.3.2 20160617
## scales 0.5.0 20170824
## shiny 1.0.5 20170823
## stringi 1.1.5 20170407
## stringr * 1.2.0 20170218
## tibble * 1.4.1 20171225
## tidyr * 0.7.2 20171016
## tidyverse * 1.2.1 20171114
## utf8 1.1.3 20180103
## viridis 0.4.1 20180108
## viridisLite 0.2.0 20170324
## visNetwork 2.0.3 20180109
## withr 1.0.2 20160620
## xfun 0.1 20180122
## XML 3.981.5 20161110
## xml2 1.1.1 20170124
## xtable 1.82 20160205
## yaml 2.1.16 20171212
## source
## CRAN (R 3.3.0)
## CRAN (R 3.3.2)
## cran (@0.2.0)
## cran (@1.1.2)
## cran (@0.1)
## cran (@0.2)
## CRAN (R 3.3.0)
## Github (rstudio/blogdown@aa98b32)
## cran (@0.5)
## CRAN (R 3.3.0)
## cran (@0.4.2)
## CRAN (R 3.3.0)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## local
## CRAN (R 3.3.0)
## Github (richiannone/DiagrammeR@9d6a8e2)
## cran (@0.6.12)
## CRAN (R 3.3.0)
## cran (@0.7.4)
## CRAN (R 3.3.0)
## cran (@0.10.1)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## cran (@2.2.1)
## CRAN (R 3.3.2)
## cran (@2.3)
## CRAN (R 3.3.0)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## cran (@0.3.6)
## CRAN (R 3.3.2)
## cran (@1.3.5)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## CRAN (R 3.3.0)
## cran (@1.5)
## Github (yihui/knitr@1bdaf39)
## CRAN (R 3.3.2)
## CRAN (R 3.3.0)
## CRAN (R 3.3.0)
## CRAN (R 3.3.2)
## CRAN (R 3.3.0)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## CRAN (R 3.3.0)
## CRAN (R 3.3.2)
## CRAN (R 3.3.0)
## CRAN (R 3.3.0)
## CRAN (R 3.3.0)
## CRAN (R 3.3.2)
## CRAN (R 3.3.0)
## CRAN (R 3.3.0)
## CRAN (R 3.3.2)
## CRAN (R 3.3.0)
## CRAN (R 3.3.2)
## cran (@2.0.1)
## CRAN (R 3.3.0)
## cran (@1.7.3.2)
## CRAN (R 3.3.2)
## cran (@2.2.2)
## CRAN (R 3.3.0)
## cran (@0.12.13)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## CRAN (R 3.3.0)
## CRAN (R 3.3.0)
## CRAN (R 3.3.2)
## cran (@1.8)
## CRAN (R 3.3.0)
## cran (@1.32)
## CRAN (R 3.3.2)
## CRAN (R 3.3.0)
## cran (@0.5.0)
## cran (@1.0.5)
## cran (@1.1.5)
## cran (@1.2.0)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## cran (@0.2.0)
## CRAN (R 3.3.2)
## CRAN (R 3.3.0)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## CRAN (R 3.3.2)
## CRAN (R 3.3.0)
## cran (@2.1.16)</code></pre>
</div>
<div class="footnotes">
<hr />
<ol>
<li id="fn1"><p>Also developing this function was a fun way to put off doing the hard work.<a href="#fnref1">↩</a></p></li>
</ol>
</div>

Using R to Create Google Maps
https://www.carlbfrederick.com/post/usingrtocreategooglemaps/
Fri, 09 Feb 2018 00:00:00 +0000
https://www.carlbfrederick.com/post/usingrtocreategooglemaps/
<p>Google maps are a great way to share maps that users can interact with and customize for their own purposes. The <a href="https://cran.rproject.org/web/packages/RgoogleMaps/"><code>RgoogleMaps</code></a> <span class="citation">(Loecher and Ropkins 2015)</span> and <a href="https://cran.rproject.org/web/packages/ggmap/"><code>ggmap</code></a> <span class="citation">(Kahle and Wickham 2013)</span> packages are great tools to download static map queries from Google maps and plot over them. There are some helpful tutorials on using <code>ggmap</code> <a href="https://rpubs.com/nickbearman/rgooglemapmaking">here</a> and <a href="https://www.youtube.com/watch?v=qSVwTj60di8">a video here</a>.</p>
<p>This post illustrates how I have implemented the reverse process: creating maps in R and embedding them in Google Maps using the awesome <a href="https://cran.rstudio.com/web/packages/plotKML/index.html"><code>plotKML</code></a> <span class="citation">(Hengl et al. 2015)</span> and <a href="https://cran.rstudio.com/web/packages/rmapshaper/index.html"><code>rmapshaper</code></a> <span class="citation">(Teucher and Russell 2017)</span> packages. Specifically, I wanted to create a shareable map that overlaid Wisconsin school district boundaries onto the regular Google Maps interface to share with users who are not R users.</p>
<div id="createspatialpolygondataframeinr" class="section level2">
<h2>Create SpatialPolygonDataFrame in R</h2>
<p>Wisconsin’s Department of Public Instruction has <a href="https://dpi.wi.gov/gis/schooldistrictboundaries/data">published shapefiles for district boundaries and school locations</a>. This post will use the elementary school boundary shapefile. After downloading the file, we need to read the file into R using the <a href="https://cran.rstudio.com/web/packages/rgdal/"><code>rgdal</code></a> package:<a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a></p>
<pre class="r"><code>library(sp)
library(rgdal)
library(tidyverse)
#Download files to temporary directory
fname < tempfile(fileext = ".zip")
dname < tempdir()
curl::curl_download("https://dpi.wi.gov/sites/default/files/imce/gis/spatialdata/tl_2013_55_unsd_elsd_harn.zip",
destfile = fname)
unzip(fname, exdir = dname)
#Read data into R
widists < readOGR(dname, layer="tl_2013_55_unsd_elsd_harn", verbose = FALSE, stringsAsFactors = FALSE)
plot(widists)</code></pre>
<p><img src="https://www.carlbfrederick.com/post/20180206usingrtocreategooglemaps_files/figurehtml/unnamedchunk11.png" width="672" /></p>
</div>
<div id="exportto.kmlformat" class="section level2">
<h2>Export to .kml format</h2>
<p>This looks about right. The <code>plotKML</code> package writes geographic objects to <strong>K</strong>eyhole <strong>M</strong>arkup <strong>L</strong>anguage the format used by Google Maps, among others. The package comes with a handy vignette that I was able to use to do everything that follows.</p>
<pre class="r"><code>library(plotKML)
#Write the district boundaries to a KML file to the working directory
kml_open("mapdata/widists_sm.kml")
kml_layer.SpatialPolygons(widists,
subfolder.name = "Elementary District Boundaries",
labels = widists@data$NAME,
outline = TRUE,
alpha = 0,
width = 2,
colour = "yellow")
kml_close("mapdata/widists_sm.kml")</code></pre>
<p>Now, this file will open just fine in Google Earth, but unfortunately it is too large for sharing via Google Maps because, at 1.6 MB, it is over the 5 MB limit. Luckily, <code>rmapshaper</code> provides</p>
<blockquote>
<p>“a wrapper around the ‘mapshaper’ ‘JavaScript’ library by Matthew Bloch <a href="https://github.com/mbloch/mapshaper/" class="uri">https://github.com/mbloch/mapshaper/</a> to perform topologicallyaware polygon simplification.”</p>
</blockquote>
<p>via the <code>ms_simplify()</code> (among other) function.</p>
<pre class="r"><code>library(rmapshaper)
widists_sm < ms_simplify(widists)
#Write the district boundaries to a KML file to the working directory
kml_open("mapdata/widists_sm.kml")
kml_layer.SpatialPolygons(widists_sm,
subfolder.name = "Elementary District Boundaries",
labels = widists_sm@data$NAME,
outline = TRUE,
alpha = 0,
width = 3,
colour = "yellow")
kml_close("mapdata/widists_sm.kml")</code></pre>
<p>Voila! The new file is only 1.6 MB. Now, all that is left to do is to login to Google Maps, import the widists_sm.kml file and share it. The results are below:</p>
<iframe src="https://www.google.com/maps/d/u/3/embed?mid=1xFVB_OuvZYaQonABVCeEh0yJbte3BO" width="640" height="480">
</iframe>
</div>
<div id="myunresolvedissues" class="section level2">
<h2>(My) Unresolved issues</h2>
<p>Observant readers will notice that I specified many options in the <code>kml_layer.SpatialPolygons()</code> function including alpha, color and (perhaps?) width that do not appear to have translated to the shared Google map above. As far as I can tell, this happens upon importing the file into Google Maps. Opening either file in Google Earth will show yellow lines and transparent polygons.</p>
<p>I am sure there are more, so please reach out in the <a href = ".#commentsection">comments below</a>.</p>
</div>
<div id="sessioninfo" class="section level2">
<h2>Session Info</h2>
<pre class="r"><code>devtools::session_info()</code></pre>
<pre><code>## setting value
## version R version 3.3.2 (20161031)
## system x86_64, darwin13.4.0
## ui X11
## language (EN)
## collate en_US.UTF8
## tz <NA>
## date 20180209
##
## package * version date source
## acepack 1.4.1 20161029 CRAN (R 3.3.0)
## aqp 1.15 20171112 CRAN (R 3.3.2)
## assertthat 0.2.0 20170411 cran (@0.2.0)
## backports 1.1.2 20171213 cran (@1.1.2)
## base64 2.0 20160510 CRAN (R 3.3.0)
## bindr 0.1 20161113 cran (@0.1)
## bindrcpp 0.2 20170617 cran (@0.2)
## blogdown 0.5 20180128 Github (rstudio/blogdown@aa98b32)
## bookdown 0.5 20170820 cran (@0.5)
## broom 0.4.2 20170213 cran (@0.4.2)
## cellranger 1.1.0 20160727 CRAN (R 3.3.0)
## class 7.314 20150830 CRAN (R 3.3.2)
## classInt 0.124 20170416 CRAN (R 3.3.2)
## cli 1.0.0 20171105 CRAN (R 3.3.2)
## cluster 2.0.5 20161008 CRAN (R 3.3.2)
## codetools 0.215 20161005 CRAN (R 3.3.2)
## colorRamps 2.3 20121029 CRAN (R 3.3.0)
## colorspace 1.32 20161214 CRAN (R 3.3.2)
## crayon 1.3.4 20170916 CRAN (R 3.3.2)
## curl 3.1 20180130 local
## data.table 1.10.0 20161203 CRAN (R 3.3.2)
## devtools 1.12.0 20160624 CRAN (R 3.3.0)
## digest 0.6.12 20170127 cran (@0.6.12)
## dismo 1.14 20170109 CRAN (R 3.3.2)
## dplyr * 0.7.4 20170928 cran (@0.7.4)
## e1071 1.67 20150805 CRAN (R 3.3.0)
## evaluate 0.10.1 20170624 cran (@0.10.1)
## FNN 1.1 20130731 CRAN (R 3.3.0)
## forcats * 0.2.0 20170123 CRAN (R 3.3.2)
## foreign 0.867 20160913 CRAN (R 3.3.2)
## Formula 1.21 20150407 CRAN (R 3.3.0)
## geojson 0.2.0 20171108 CRAN (R 3.3.2)
## geojsonio 0.5.0 20171110 CRAN (R 3.3.2)
## geojsonlint 0.2.0 20161103 CRAN (R 3.3.0)
## ggplot2 * 2.2.1 20161230 cran (@2.2.1)
## glue 1.2.0 20171029 CRAN (R 3.3.2)
## gridExtra 2.3 20170909 cran (@2.3)
## gstat 1.15 20170312 CRAN (R 3.3.2)
## gtable 0.2.0 20160226 CRAN (R 3.3.0)
## haven 1.1.0 20170709 CRAN (R 3.3.2)
## Hmisc 4.01 20161208 CRAN (R 3.3.2)
## hms 0.3 20161122 CRAN (R 3.3.2)
## htmlTable 1.7 20161019 CRAN (R 3.3.0)
## htmltools 0.3.6 20170428 cran (@0.3.6)
## httr 1.3.1 20170820 CRAN (R 3.3.2)
## intervals 0.15.1 20150827 CRAN (R 3.3.0)
## jqr 1.0.0 20170928 CRAN (R 3.3.2)
## jsonlite 1.5 20170601 cran (@1.5)
## jsonvalidate 1.0.0 20160613 CRAN (R 3.3.0)
## knitr 1.18.10 20180128 Github (yihui/knitr@1bdaf39)
## lattice 0.2034 20160906 CRAN (R 3.3.2)
## latticeExtra 0.628 20160209 CRAN (R 3.3.0)
## lazyeval 0.2.0 20160612 CRAN (R 3.3.0)
## lubridate 1.7.1 20171103 CRAN (R 3.3.2)
## magrittr 1.5 20141122 CRAN (R 3.3.0)
## maptools 0.840 20161115 CRAN (R 3.3.2)
## MASS 7.345 20160421 CRAN (R 3.3.2)
## Matrix 1.27.1 20160901 CRAN (R 3.3.2)
## memoise 1.0.0 20160129 CRAN (R 3.3.0)
## mnormt 1.55 20161015 CRAN (R 3.3.0)
## modelr 0.1.1 20170724 CRAN (R 3.3.2)
## munsell 0.4.3 20160213 CRAN (R 3.3.0)
## nlme 3.1128 20160510 CRAN (R 3.3.2)
## nnet 7.312 20160202 CRAN (R 3.3.2)
## openssl 0.9.5 20161028 CRAN (R 3.3.0)
## pillar 1.1.0 20180114 CRAN (R 3.3.2)
## pixmap 0.411 20110719 CRAN (R 3.3.0)
## pkgconfig 2.0.1 20170321 cran (@2.0.1)
## plotKML * 0.58 20170514 CRAN (R 3.3.2)
## plotrix 3.7 20171207 CRAN (R 3.3.2)
## plyr 1.8.4 20160608 CRAN (R 3.3.0)
## psych 1.7.3.21 20170322 cran (@1.7.3.2)
## purrr * 0.2.4 20171018 CRAN (R 3.3.2)
## R6 2.2.2 20170617 cran (@2.2.2)
## raster 2.58 20160602 CRAN (R 3.3.0)
## RColorBrewer 1.12 20141207 CRAN (R 3.3.0)
## Rcpp 0.12.13 20170928 cran (@0.12.13)
## readr * 1.1.1 20170516 CRAN (R 3.3.2)
## readxl 1.0.0 20170418 CRAN (R 3.3.2)
## reshape 0.8.6 20161021 CRAN (R 3.3.0)
## reshape2 1.4.2 20161022 CRAN (R 3.3.0)
## rgdal * 1.25 20161215 CRAN (R 3.3.2)
## rgeos 0.321 20161020 CRAN (R 3.3.0)
## rlang 0.1.6 20171221 CRAN (R 3.3.2)
## rmapshaper * 0.3.0 20170816 CRAN (R 3.3.2)
## rmarkdown 1.8 20171117 cran (@1.8)
## rpart 4.110 20150629 CRAN (R 3.3.2)
## rprojroot 1.32 20180103 cran (@1.32)
## RSAGA 0.945 20160105 CRAN (R 3.3.0)
## rstudioapi 0.7 20170907 CRAN (R 3.3.2)
## rvest 0.3.2 20160617 CRAN (R 3.3.0)
## scales 0.5.0 20170824 cran (@0.5.0)
## shapefiles 0.7 20130126 CRAN (R 3.3.0)
## sp * 1.24 20161222 CRAN (R 3.3.2)
## spacetime 1.21 20170924 CRAN (R 3.3.2)
## stringi 1.1.5 20170407 cran (@1.1.5)
## stringr * 1.2.0 20170218 cran (@1.2.0)
## survival 2.401 20161030 CRAN (R 3.3.0)
## tibble * 1.4.1 20171225 CRAN (R 3.3.2)
## tidyr * 0.7.2 20171016 CRAN (R 3.3.2)
## tidyverse * 1.2.1 20171114 CRAN (R 3.3.2)
## V8 1.5 20170425 CRAN (R 3.3.2)
## withr 1.0.2 20160620 CRAN (R 3.3.0)
## xfun 0.1 20180122 CRAN (R 3.3.2)
## XML 3.981.5 20161110 CRAN (R 3.3.2)
## xml2 1.1.1 20170124 CRAN (R 3.3.2)
## xts 0.97 20140102 CRAN (R 3.3.0)
## yaml 2.1.16 20171212 cran (@2.1.16)
## zoo 1.714 20161216 CRAN (R 3.3.2)</code></pre>
</div>
<div id="references" class="section level2 unnumbered">
<h2>References</h2>
<div id="refs" class="references">
<div id="refHenglRoudieretal2015">
<p>Hengl, Tomislav, Pierre Roudier, Dylan Beaudette, and Edzer Pebesma. 2015. “plotKML: Scientific Visualization of SpatioTemporal Data.” <em>Journal of Statistical Software</em> 63 (5): 1–25. <a href="http://www.jstatsoft.org/v63/i05/" class="uri">http://www.jstatsoft.org/v63/i05/</a>.</p>
</div>
<div id="refKahleWickham2013">
<p>Kahle, David, and Hadley Wickham. 2013. “ggmap: Spatial Visualization with ggplot2.” <em>The R Journal</em> 5 (1): 144–61. <a href="http://journal.rproject.org/archive/20131/kahlewickham.pdf" class="uri">http://journal.rproject.org/archive/20131/kahlewickham.pdf</a>.</p>
</div>
<div id="refLoecherRopkins2015">
<p>Loecher, Markus, and Karl Ropkins. 2015. “RgoogleMaps and loa: Unleashing R Graphics Power on Map Tiles.” <em>Journal of Statistical Software</em> 63 (4): 1–18. <a href="http://www.jstatsoft.org/v63/i04/" class="uri">http://www.jstatsoft.org/v63/i04/</a>.</p>
</div>
<div id="refTeucherRussell2017">
<p>Teucher, Andy, and Kenton Russell. 2017. <em>rmapshaper: Client for ’mapshaper’ for ’Geospatial’ Operations</em>. <a href="https://CRAN.Rproject.org/package=rmapshaper" class="uri">https://CRAN.Rproject.org/package=rmapshaper</a>.</p>
</div>
</div>
</div>
<div class="footnotes">
<hr />
<ol>
<li id="fn1"><p>I choose to use <code>rgdal</code> instead of the <a href="https://cran.rstudio.com/web/packages/sf/"><code>sf</code></a> (simple features) package because <code>plotKML</code> plays better with spclass objects.<a href="#fnref1">↩</a></p></li>
</ol>
</div>

Curriculum Vitae
https://www.carlbfrederick.com/about/cv/
Mon, 01 Jan 0001 00:00:00 +0000
https://www.carlbfrederick.com/about/cv/
<ul>
<li>… in progress… *</li>
</ul>