apexcharter/docs/articles/articles/advanced-configuration.html

922 lines
181 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Advanced configuration examples • apexcharter</title>
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="../../css/theme.css" rel="stylesheet">
<style>
#pkgdown-sidebar {
z-index: 100;
background: #FFF;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- Font --><link href="../../css/montserrat.css" rel="stylesheet">
<style>body {font-family: 'Montserrat', sans-serif;}</style>
<!-- bootstrap-toc --><link rel="stylesheet" href="../../bootstrap-toc.css">
<script src="../../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../../pkgdown.css" rel="stylesheet">
<script src="../../pkgdown.js"></script><!-- Particles --><script src="../../js/particles.min.js"></script><style>
html,
body {
margin: 0;
padding: 0;
}
.contents {
opacity: 1;
background-color: #FFF;
z-index: 1;
}
#sidebar {
opacity: 1;
background-color: #FFF;
z-index: 1;
}
footer {
z-index: 1;
}
#particles {
position: fixed;
display: block;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 0;
}
.background {
position: absolute;
display: block;
top: 0;
left: 0;
z-index: 0;
}
</style>
<!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../../pkgdown.css" rel="stylesheet">
<script src="../../pkgdown.js"></script><meta property="og:title" content="Advanced configuration examples">
<meta property="og:description" content="apexcharter">
<meta name="twitter:card" content="summary">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body id="body">
<div class="container template-article">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand hidden-xs hidden-sm" style="padding: 10px 15px !important;">
<img src="https://github.com/dreamRs.png" class="hidden-xs hidden-sm" style="height: 50px;display: inline;vertical-align: middle;"><a class="navbar-link" href="../../index.html">apexcharter</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.5.920</span>
</span>
<span class="navbar-brand hidden-md hidden-lg">
<a class="navbar-link" href="../../index.html">apexcharter</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.5.920</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../../articles/apexcharter.html">Get started</a>
</li>
<li>
<a href="../../reference/index.html">Reference</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Articles
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../../articles/articles/advanced-configuration.html">Advanced configuration examples</a>
</li>
<li>
<a href="../../articles/chart-options.html">Chart options</a>
</li>
<li>
<a href="../../articles/shiny-integration.html">Shiny integration</a>
</li>
<li>
<a href="../../articles/spark-box.html">Spark boxes</a>
</li>
<li>
<a href="../../articles/sync-charts.html">Syncing charts</a>
</li>
</ul>
</li>
<li>
<a href="../../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/dreamRs/apexcharter/">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
<!--/.container -->
</div>
<!--/.navbar -->
</header><script src="advanced-configuration_files/accessible-code-block-0.0.1/empty-anchor.js"></script><script src="advanced-configuration_files/htmlwidgets-1.5.1/htmlwidgets.js"></script><script src="advanced-configuration_files/apexcharts-3.20.1/apexcharts.min.js"></script><link href="advanced-configuration_files/apexcharter-css-0.1.0/apexcharter.css" rel="stylesheet">
<script src="advanced-configuration_files/d3-format-1.4.2/d3-format.min.js"></script><script src="advanced-configuration_files/apexcharter-binding-0.1.5.920/apexcharter.js"></script><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
<h1>Advanced configuration examples</h1>
<small class="dont-index">Source: <a href="https://github.com/dreamRs/apexcharter/blob/master/vignettes/articles/advanced-configuration.Rmd"><code>vignettes/articles/advanced-configuration.Rmd</code></a></small>
<div class="hidden name"><code>advanced-configuration.Rmd</code></div>
</div>
<div class="sourceCode" id="cb1"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="kw"><a href="https://github.com/dreamRs/apexcharter">apexcharter</a></span>)
<span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="kw"><a href="https://dplyr.tidyverse.org">dplyr</a></span>)
</pre></div>
<p>Here some advanced configuration examples to use the full potential of <a href="https://apexcharts.com/">ApexCharts</a>.</p>
<div id="bar-chart" class="section level1">
<h1 class="hasAnchor">
<a href="#bar-chart" class="anchor"></a>Bar chart</h1>
<p>This example is taken from <a href="https://github.com/hrbrmstr/hrbrthemes">{hrbrthemes}</a> readme, it use <code>mpg</code> dataset from <a href="https://github.com/tidyverse/ggplot2">{ggplot2}</a>.</p>
<p>Transform data and initialize the chart :</p>
<div class="sourceCode" id="cb2"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/utils/data.html">data</a></span>(<span class="st">"mpg"</span>, package = <span class="st">"ggplot2"</span>)
<span class="kw">bars</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span>(<span class="kw">mpg</span>, <span class="kw">class</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(pct = <span class="kw">n</span><span class="op">/</span><span class="fu"><a href="https://rdrr.io/r/base/sum.html">sum</a></span>(<span class="kw">n</span>)) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/apex.html">apex</a></span>(mapping = <span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span>(<span class="kw">class</span>, <span class="kw">pct</span>), type = <span class="st">"column"</span>)
</pre></div>
<p>Change color used :</p>
<div class="sourceCode" id="cb3"><pre class="downlit">
<span class="kw">bars</span> <span class="op">&lt;-</span> <span class="kw">bars</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_colors.html">ax_colors</a></span>(<span class="st">"#617a89"</span>)
</pre></div>
<p>Modify the y-axis and add a percent symbol after the labels :</p>
<div class="sourceCode" id="cb4"><pre class="downlit">
<span class="kw">bars</span> <span class="op">&lt;-</span> <span class="kw">bars</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_yaxis.html">ax_yaxis</a></span>(
title = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(text = <span class="st">"Weight (tons)"</span>),
labels = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
formatter = <span class="fu"><a href="../../reference/format_num.html">format_num</a></span>(<span class="st">".0%"</span>)
),
tickAmount = <span class="fl">6</span>,
max = <span class="fl">0.3</span>
)
</pre></div>
<p>Add a title to the x-axis :</p>
<div class="sourceCode" id="cb5"><pre class="downlit">
<span class="kw">bars</span> <span class="op">&lt;-</span> <span class="kw">bars</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_xaxis.html">ax_xaxis</a></span>(
title = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(text = <span class="st">"Fuel efficiency (mpg)"</span>)
)
</pre></div>
<p>Modify the tooltip to display “Percentage” instead of the variable name “pct” :</p>
<div class="sourceCode" id="cb6"><pre class="downlit">
<span class="kw">bars</span> <span class="op">&lt;-</span> <span class="kw">bars</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_tooltip.html">ax_tooltip</a></span>(
y = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
title = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
formatter = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(<span class="st">"function() {return 'Percentage';}"</span>)
)
)
)
</pre></div>
<p>Add title and subtitle and format them :</p>
<div class="sourceCode" id="cb7"><pre class="downlit">
<span class="kw">bars</span> <span class="op">&lt;-</span> <span class="kw">bars</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_labs.html">ax_labs</a></span>(
title = <span class="st">"Seminal ggplot2 column chart example with percents"</span>,
subtitle = <span class="st">"Example taken from {hrbrthemes} readme"</span>
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_title.html">ax_title</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"22px"</span>)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_subtitle.html">ax_subtitle</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"16px"</span>, color = <span class="st">"#BDBDBD"</span>)
)
</pre></div>
<p>Final result looks like :</p>
<div class="sourceCode" id="cb8"><pre class="downlit">
<span class="kw">bars</span>
</pre></div>
<div id="htmlwidget-e269f12752f2f5a04aa2" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
<script type="application/json" data-for="htmlwidget-e269f12752f2f5a04aa2">{"x":{"ax_opts":{"chart":{"type":"bar"},"series":[{"name":"pct","type":"bar","data":[{"x":"2seater","y":0.0213675213675214},{"x":"compact","y":0.200854700854701},{"x":"midsize","y":0.175213675213675},{"x":"minivan","y":0.047008547008547},{"x":"pickup","y":0.141025641025641},{"x":"subcompact","y":0.14957264957265},{"x":"suv","y":0.264957264957265}]}],"dataLabels":{"enabled":false},"plotOptions":{"bar":{"horizontal":false}},"tooltip":{"shared":true,"followCursor":true,"y":{"title":{"formatter":"function() {return 'Percentage';}"}}},"yaxis":{"labels":{"style":{"colors":"#848484"},"formatter":"function(value) {var locale = d3.formatLocale(JSON.parse('{ \"decimal\": \".\", \"thousands\": \",\", \"grouping\": [3], \"currency\": [\"$\", \"\"]}')); return '' + locale.format('.0%')(value) + '';}"},"tickAmount":6,"max":0.3,"title":{"text":"Weight (tons)"}},"xaxis":{"labels":{"style":{"colors":"#848484"}},"title":{"text":"Fuel efficiency (mpg)"}},"colors":["#617a89"],"title":{"text":"Seminal ggplot2 column chart example with percents","style":{"fontWeight":700,"fontSize":"22px"}},"subtitle":{"text":"Example taken from {hrbrthemes} readme","style":{"fontWeight":400,"fontSize":"16px","color":"#BDBDBD"}}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"2seater","max":"suv"}},"evals":["ax_opts.tooltip.y.title.formatter","ax_opts.yaxis.labels.formatter"],"jsHooks":[]}</script><details><p><summary><span title="View full code">View full code</span></summary></p>
<div class="sourceCode" id="cb9"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/utils/data.html">data</a></span>(<span class="st">"mpg"</span>, package = <span class="st">"ggplot2"</span>)
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span>(<span class="kw">mpg</span>, <span class="kw">class</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(pct = <span class="kw">n</span><span class="op">/</span><span class="fu"><a href="https://rdrr.io/r/base/sum.html">sum</a></span>(<span class="kw">n</span>)) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/apex.html">apex</a></span>(mapping = <span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span>(<span class="kw">class</span>, <span class="kw">pct</span>), type = <span class="st">"column"</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_colors.html">ax_colors</a></span>(<span class="st">"#617a89"</span>)<span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_yaxis.html">ax_yaxis</a></span>(
title = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(text = <span class="st">"Weight (tons)"</span>),
labels = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
formatter = <span class="fu"><a href="../../reference/format_num.html">format_num</a></span>(<span class="st">".0%"</span>)
),
tickAmount = <span class="fl">6</span>,
max = <span class="fl">0.3</span>
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_xaxis.html">ax_xaxis</a></span>(
title = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(text = <span class="st">"Fuel efficiency (mpg)"</span>)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_tooltip.html">ax_tooltip</a></span>(
y = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
title = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
formatter = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(<span class="st">"function() {return 'Percentage';}"</span>)
)
)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_labs.html">ax_labs</a></span>(
title = <span class="st">"Seminal ggplot2 column chart example with percents"</span>,
subtitle = <span class="st">"Example taken from {hrbrthemes} readme"</span>
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_title.html">ax_title</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"22px"</span>)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_subtitle.html">ax_subtitle</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"16px"</span>, color = <span class="st">"#BDBDBD"</span>)
)
</pre></div>
</details><p><br><br></p>
</div>
<div id="lines" class="section level1">
<h1 class="hasAnchor">
<a href="#lines" class="anchor"></a>Lines</h1>
<p>Dataset used is from the UNHCR (The UN Refugee Agency) and contains data about UNHCRs populations of concern summarised by continent of origin.</p>
<p>Transform data and initialize the chart :</p>
<div class="sourceCode" id="cb10"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/utils/data.html">data</a></span>(<span class="st">"unhcr_ts"</span>)
<span class="kw">lines</span> <span class="op">&lt;-</span> <span class="kw">unhcr_ts</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="kw">population_type</span> <span class="op">==</span> <span class="st">"Refugees (incl. refugee-like situations)"</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(date = <span class="fu"><a href="https://rdrr.io/r/base/as.Date.html">as.Date</a></span>(<span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span>(<span class="kw">year</span>, <span class="st">"-01-01"</span>))) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/apex.html">apex</a></span>(<span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span>(<span class="kw">date</span>, <span class="kw">n</span>, group = <span class="kw">continent_origin</span>), type = <span class="st">"line"</span>)
<span class="co">#&gt; Warning in make_series(mapdata, mapping, type, serie_name): apex: all groups</span>
<span class="co">#&gt; must have same length! You can use `tidyr::complete` for this.</span>
</pre></div>
<p>Put the legend at the bottom :</p>
<div class="sourceCode" id="cb11"><pre class="downlit">
<span class="kw">lines</span> <span class="op">&lt;-</span> <span class="kw">lines</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_legend.html">ax_legend</a></span>(position = <span class="st">"bottom"</span>)
</pre></div>
<p>Change the width of the lines :</p>
<div class="sourceCode" id="cb12"><pre class="downlit">
<span class="kw">lines</span> <span class="op">&lt;-</span> <span class="kw">lines</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_stroke.html">ax_stroke</a></span>(width = <span class="fl">2</span>)
</pre></div>
<p>Change the colors (Viridis palette) :</p>
<div class="sourceCode" id="cb13"><pre class="downlit">
<span class="kw">lines</span> <span class="op">&lt;-</span> <span class="kw">lines</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_colors.html">ax_colors</a></span>(<span class="st">"#440154"</span>, <span class="st">"#414487"</span>, <span class="st">"#2A788E"</span>,
<span class="st">"#22A884"</span>, <span class="st">"#7AD151"</span>, <span class="st">"#FDE725"</span>)
</pre></div>
<p>Data are in million, in the y-axis we divide by <code>1e6</code> to limit the number of digits :</p>
<div class="sourceCode" id="cb14"><pre class="downlit">
<span class="kw">lines</span> <span class="op">&lt;-</span> <span class="kw">lines</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_yaxis.html">ax_yaxis</a></span>(
labels = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
formatter = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(<span class="st">"function(val) {return (val/1e6).toFixed(0);}"</span>)
),
title = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(text = <span class="st">"Number of refugees (in million)"</span>)
)
</pre></div>
<p>Only display the years in the x-axis labels :</p>
<div class="sourceCode" id="cb15"><pre class="downlit">
<span class="kw">lines</span> <span class="op">&lt;-</span> <span class="kw">lines</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_xaxis.html">ax_xaxis</a></span>(labels = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(format = <span class="st">"yyyy"</span>))
</pre></div>
<p>Same in tooltip, and a thousand separator in the value displayed :</p>
<div class="sourceCode" id="cb16"><pre class="downlit">
<span class="kw">lines</span> <span class="op">&lt;-</span> <span class="kw">lines</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_tooltip.html">ax_tooltip</a></span>(
x = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(format = <span class="st">"yyyy"</span>),
y = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
formatter = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(
<span class="co"># thousand separator in javascript</span>
<span class="st">"function(value) {return value.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");}"</span>
)
)
)
</pre></div>
<p>Add an annotation to the chart to identify the <a href="https://en.wikipedia.org/wiki/Great_Lakes_refugee_crisis">Great Lakes refugee crisis</a> in 1994 :</p>
<div class="sourceCode" id="cb17"><pre class="downlit">
<span class="kw">lines</span> <span class="op">&lt;-</span> <span class="kw">lines</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_annotations.html">ax_annotations</a></span>(
points = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
x = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(<span class="st">"new Date('1994').getTime()"</span>),
y = <span class="fl">6935296</span>,
label = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(text = <span class="st">"Great Lakes refugee crisis"</span>, offsetY = <span class="fl">0</span>),
marker = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(size = <span class="fl">6</span>)
)
)
)
</pre></div>
<p>Add title and subtitle and format them :</p>
<div class="sourceCode" id="cb18"><pre class="downlit">
<span class="kw">lines</span> <span class="op">&lt;-</span> <span class="kw">lines</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_labs.html">ax_labs</a></span>(
title = <span class="st">"Continent of origin for refugees population"</span>,
subtitle = <span class="st">"Data from the UN Refugee Agency"</span>
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_title.html">ax_title</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"22px"</span>)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_subtitle.html">ax_subtitle</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"16px"</span>, color = <span class="st">"#BDBDBD"</span>)
)
</pre></div>
<p>Final result looks like :</p>
<div class="sourceCode" id="cb19"><pre class="downlit">
<span class="kw">lines</span>
</pre></div>
<div id="htmlwidget-5ae887cd3574002a15cd" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
<script type="application/json" data-for="htmlwidget-5ae887cd3574002a15cd">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"Africa","type":"line","data":[["new Date('1960-01-01').getTime()",150000],["new Date('1961-01-01').getTime()",302000],["new Date('1962-01-01').getTime()",322000],["new Date('1963-01-01').getTime()",353000],["new Date('1964-01-01').getTime()",490300],["new Date('1965-01-01').getTime()",579460],["new Date('1966-01-01').getTime()",736320],["new Date('1967-01-01').getTime()",833690],["new Date('1968-01-01').getTime()",963850],["new Date('1969-01-01').getTime()",937540],["new Date('1970-01-01').getTime()",974770],["new Date('1971-01-01').getTime()",976240],["new Date('1972-01-01').getTime()",1071850],["new Date('1973-01-01').getTime()",986220],["new Date('1974-01-01').getTime()",1070220],["new Date('1975-01-01').getTime()",1501340],["new Date('1976-01-01').getTime()",1697590],["new Date('1977-01-01').getTime()",2064965],["new Date('1978-01-01').getTime()",2377380],["new Date('1979-01-01').getTime()",3128940],["new Date('1980-01-01').getTime()",4222403],["new Date('1981-01-01').getTime()",3043515],["new Date('1982-01-01').getTime()",2952215],["new Date('1983-01-01').getTime()",2881859],["new Date('1984-01-01').getTime()",3470578],["new Date('1985-01-01').getTime()",3797764],["new Date('1986-01-01').getTime()",3595154],["new Date('1987-01-01').getTime()",3978264],["new Date('1988-01-01').getTime()",4593524],["new Date('1989-01-01').getTime()",4824904],["new Date('1990-01-01').getTime()",5912693],["new Date('1991-01-01').getTime()",5335460],["new Date('1992-01-01').getTime()",5577181],["new Date('1993-01-01').getTime()",6492397],["new Date('1994-01-01').getTime()",6935296],["new Date('1995-01-01').getTime()",5811513],["new Date('1996-01-01').getTime()",4543635],["new Date('1997-01-01').getTime()",3722238],["new Date('1998-01-01').getTime()",3593405],["new Date('1999-01-01').getTime()",3798915],["new Date('2000-01-01').getTime()",3951187],["new Date('2001-01-01').getTime()",3646853],["new Date('2002-01-01').getTime()",3715548],["new Date('2003-01-01').getTime()",3501590],["new Date('2004-01-01').getTime()",3409723],["new Date('2005-01-01').getTime()",3213525],["new Date('2006-01-01').getTime()",3156132],["new Date('2007-01-01').getTime()",2891309],["new Date('2008-01-01').getTime()",2769104],["new Date('2009-01-01').getTime()",2805162],["new Date('2010-01-01').getTime()",2947809],["new Date('2011-01-01').getTime()",3511640],["new Date('2012-01-01').getTime()",3677797],["new Date('2013-01-01').getTime()",3842504],["new Date('2014-01-01').getTime()",4623635],["new Date('2015-01-01').getTime()",5382290],["new Date('2016-01-01').getTime()",6165089],["new Date('2017-01-01').getTime()",7373420]]},{"name":"Asia","type":"line","data":[["new Date('1964-01-01').getTime()",1261170],["new Date('1965-01-01').getTime()",1397000],["new Date('1966-01-01').getTime()",1395810],["new Date('1967-01-01').getTime()",151180],["new Date('1968-01-01').getTime()",158830],["new Date('1969-01-01').getTime()",155240],["new Date('1970-01-01').getTime()",150760],["new Date('1971-01-01').getTime()",195180],["new Date('1972-01-01').getTime()",205130],["new Date('1973-01-01').getTime()",101840],["new Date('1974-01-01').getTime()",68000],["new Date('1975-01-01').getTime()",84650],["new Date('1976-01-01').getTime()",95420],["new Date('1977-01-01').getTime()",264670],["new Date('1978-01-01').getTime()",676850],["new Date('1979-01-01').getTime()",1222020],["new Date('1980-01-01').getTime()",2524154],["new Date('1981-01-01').getTime()",4584803],["new Date('1982-01-01').getTime()",5249822],["new Date('1983-01-01').getTime()",5476427],["new Date('1984-01-01').getTime()",5166666],["new Date('1985-01-01').getTime()",5819892],["new Date('1986-01-01').getTime()",6326541],["new Date('1987-01-01').getTime()",6574797],["new Date('1988-01-01').getTime()",7066582],["new Date('1989-01-01').getTime()",7084483],["new Date('1990-01-01').getTime()",8494046],["new Date('1991-01-01').getTime()",8793297],["new Date('1992-01-01').getTime()",7956380],["new Date('1993-01-01').getTime()",6251694],["new Date('1994-01-01').getTime()",5564747],["new Date('1995-01-01').getTime()",5344395],["new Date('1996-01-01').getTime()",5570972],["new Date('1997-01-01').getTime()",5497379],["new Date('1998-01-01').getTime()",5375832],["new Date('1999-01-01').getTime()",5328517],["new Date('2000-01-01').getTime()",5889397],["new Date('2001-01-01').getTime()",6278879],["new Date('2002-01-01').getTime()",5208529],["new Date('2003-01-01').getTime()",4566604],["new Date('2004-01-01').getTime()",4752246],["new Date('2005-01-01').getTime()",4430665],["new Date('2006-01-01').getTime()",5523929],["new Date('2007-01-01').getTime()",7146281],["new Date('2008-01-01').getTime()",6525128],["new Date('2009-01-01').getTime()",6393200],["new Date('2010-01-01').getTime()",6441865],["new Date('2011-01-01').getTime()",5772713],["new Date('2012-01-01').getTime()",5713324],["new Date('2013-01-01').getTime()",6992887],["new Date('2014-01-01').getTime()",8718891],["new Date('2015-01-01').getTime()",9609536],["new Date('2016-01-01').getTime()",10000250],["new Date('2017-01-01').getTime()",11681576]]},{"name":"Europe","type":"line","data":[["new Date('1964-01-01').getTime()",220],["new Date('1965-01-01').getTime()",25820],["new Date('1966-01-01').getTime()",33190],["new Date('1967-01-01').getTime()",30950],["new Date('1968-01-01').getTime()",29210],["new Date('1969-01-01').getTime()",29460],["new Date('1970-01-01').getTime()",30730],["new Date('1971-01-01').getTime()",3680],["new Date('1972-01-01').getTime()",10690],["new Date('1973-01-01').getTime()",9380],["new Date('1974-01-01').getTime()",2010],["new Date('1975-01-01').getTime()",1840],["new Date('1976-01-01').getTime()",1120],["new Date('1977-01-01').getTime()",2460],["new Date('1978-01-01').getTime()",7130],["new Date('1979-01-01').getTime()",1970],["new Date('1980-01-01').getTime()",15846],["new Date('1981-01-01').getTime()",16546],["new Date('1982-01-01').getTime()",17155],["new Date('1983-01-01').getTime()",17451],["new Date('1984-01-01').getTime()",16592],["new Date('1985-01-01').getTime()",18785],["new Date('1986-01-01').getTime()",13467],["new Date('1987-01-01').getTime()",13131],["new Date('1988-01-01').getTime()",88047],["new Date('1989-01-01').getTime()",149036],["new Date('1990-01-01').getTime()",212051],["new Date('1991-01-01').getTime()",265736],["new Date('1992-01-01').getTime()",964362],["new Date('1993-01-01').getTime()",1157164],["new Date('1994-01-01').getTime()",1253868],["new Date('1995-01-01').getTime()",1389346],["new Date('1996-01-01').getTime()",1653932],["new Date('1997-01-01').getTime()",1564757],["new Date('1998-01-01').getTime()",1307240],["new Date('1999-01-01').getTime()",1199074],["new Date('2000-01-01').getTime()",1079134],["new Date('2001-01-01').getTime()",998238],["new Date('2002-01-01').getTime()",1269077],["new Date('2003-01-01').getTime()",1097853],["new Date('2004-01-01').getTime()",948400],["new Date('2005-01-01').getTime()",698304],["new Date('2006-01-01').getTime()",772309],["new Date('2007-01-01').getTime()",516416],["new Date('2008-01-01').getTime()",539452],["new Date('2009-01-01').getTime()",528245],["new Date('2010-01-01').getTime()",500063],["new Date('2011-01-01').getTime()",467387],["new Date('2012-01-01').getTime()",456821],["new Date('2013-01-01').getTime()",233539],["new Date('2014-01-01').getTime()",444471],["new Date('2015-01-01').getTime()",507447],["new Date('2016-01-01').getTime()",412142],["new Date('2017-01-01').getTime()",308707]]},{"name":"North America","type":"line","data":[["new Date('1969-01-01').getTime()",14500],["new Date('1970-01-01').getTime()",16700],["new Date('1971-01-01').getTime()",54500],["new Date('1972-01-01').getTime()",17070],["new Date('1974-01-01').getTime()",2600],["new Date('1978-01-01').getTime()",145150],["new Date('1979-01-01').getTime()",23460],["new Date('1980-01-01').getTime()",98834],["new Date('1981-01-01').getTime()",316924],["new Date('1982-01-01').getTime()",303514],["new Date('1983-01-01').getTime()",316075],["new Date('1984-01-01').getTime()",332697],["new Date('1985-01-01').getTime()",294121],["new Date('1986-01-01').getTime()",298042],["new Date('1987-01-01').getTime()",295761],["new Date('1988-01-01').getTime()",315341],["new Date('1989-01-01').getTime()",194096],["new Date('1990-01-01').getTime()",146893],["new Date('1991-01-01').getTime()",152577],["new Date('1992-01-01').getTime()",153544],["new Date('1993-01-01').getTime()",136866],["new Date('1994-01-01').getTime()",144679],["new Date('1995-01-01').getTime()",131444],["new Date('1996-01-01').getTime()",125707],["new Date('1997-01-01').getTime()",119854],["new Date('1998-01-01').getTime()",106300],["new Date('1999-01-01').getTime()",96001],["new Date('2000-01-01').getTime()",63919],["new Date('2001-01-01').getTime()",57589],["new Date('2002-01-01').getTime()",53704],["new Date('2003-01-01').getTime()",43442],["new Date('2004-01-01').getTime()",39348],["new Date('2005-01-01').getTime()",46780],["new Date('2006-01-01').getTime()",77124],["new Date('2007-01-01').getTime()",56508],["new Date('2008-01-01').getTime()",56488],["new Date('2009-01-01').getTime()",57501],["new Date('2010-01-01').getTime()",60487],["new Date('2011-01-01').getTime()",73599],["new Date('2012-01-01').getTime()",83091],["new Date('2013-01-01').getTime()",87189],["new Date('2014-01-01').getTime()",90987],["new Date('2015-01-01').getTime()",97919],["new Date('2016-01-01').getTime()",96526],["new Date('2017-01-01').getTime()",110091]]},{"name":"Oceania","type":"line","data":[["new Date('1990-01-01').getTime()",1],["new Date('1991-01-01').getTime()",1],["new Date('1992-01-01').getTime()",19],["new Date('1993-01-01').getTime()",89],["new Date('1994-01-01').getTime()",159],["new Date('1995-01-01').getTime()",2260],["new Date('1996-01-01').getTime()",2354],["new Date('1997-01-01').getTime()",1177],["new Date('1998-01-01').getTime()",562],["new Date('1999-01-01').getTime()",383],["new Date('2000-01-01').getTime()",456],["new Date('2001-01-01').getTime()",787],["new Date('2002-01-01').getTime()",1168],["new Date('2003-01-01').getTime()",1215],["new Date('2004-01-01').getTime()",1416],["new Date('2005-01-01').getTime()",1515],["new Date('2006-01-01').getTime()",1849],["new Date('2007-01-01').getTime()",2039],["new Date('2008-01-01').getTime()",2074],["new Date('2009-01-01').getTime()",2105],["new Date('2010-01-01').getTime()",2109],["new Date('2011-01-01').getTime()",1890],["new Date('2012-01-01').getTime()",1682],["new Date('2013-01-01').getTime()",1500],["new Date('2014-01-01').getTime()",1377],["new Date('2015-01-01').getTime()",1387],["new Date('2016-01-01').getTime()",1361],["new Date('2017-01-01').getTime()",1281]]},{"name":"South America","type":"line","data":[["new Date('1970-01-01').getTime()",1400],["new Date('1971-01-01').getTime()",4930],["new Date('1972-01-01').getTime()",3730],["new Date('1974-01-01').getTime()",18200],["new Date('1975-01-01').getTime()",16010],["new Date('1976-01-01').getTime()",3890],["new Date('1977-01-01').getTime()",3000],["new Date('1978-01-01').getTime()",3130],["new Date('1979-01-01').getTime()",3130],["new Date('1980-01-01').getTime()",1742],["new Date('1981-01-01').getTime()",2103],["new Date('1982-01-01').getTime()",4403],["new Date('1983-01-01').getTime()",1867],["new Date('1984-01-01').getTime()",1765],["new Date('1985-01-01').getTime()",2835],["new Date('1986-01-01').getTime()",2587],["new Date('1987-01-01').getTime()",2044],["new Date('1988-01-01').getTime()",730],["new Date('1989-01-01').getTime()",8237],["new Date('1990-01-01').getTime()",23863],["new Date('1991-01-01').getTime()",22057],["new Date('1992-01-01').getTime()",18799],["new Date('1993-01-01').getTime()",19690],["new Date('1994-01-01').getTime()",23817],["new Date('1995-01-01').getTime()",24521],["new Date('1996-01-01').getTime()",23985],["new Date('1997-01-01').getTime()",20827],["new Date('1998-01-01').getTime()",19790],["new Date('1999-01-01').getTime()",15692],["new Date('2000-01-01').getTime()",19673],["new Date('2001-01-01').getTime()",27789],["new Date('2002-01-01').getTime()",41787],["new Date('2003-01-01').getTime()",48122],["new Date('2004-01-01').getTime()",57174],["new Date('2005-01-01').getTime()",71703],["new Date('2006-01-01').getTime()",88149],["new Date('2007-01-01').getTime()",571145],["new Date('2008-01-01').getTime()",392701],["new Date('2009-01-01').getTime()",407775],["new Date('2010-01-01').getTime()",413321],["new Date('2011-01-01').getTime()",414355],["new Date('2012-01-01').getTime()",412762],["new Date('2013-01-01').getTime()",414251],["new Date('2014-01-01').getTime()",376899],["new Date('2015-01-01').getTime()",355158],["new Date('2016-01-01').getTime()",324651],["new Date('2017-01-01').getTime()",206979]]}],"dataLabels":{"enabled":false},"stroke":{"curve":"straight","width":2},"yaxis":{"decimalsInFloat":2,"labels":{"style":{"colors":"#848484"},"formatter":"function(val) {return (val/1e6).toFixed(0);}"},"title":{"text":"Number of refugees (in million)"}},"xaxis":{"type":"datetime","labels":{"style":{"colors":"#848484"},"format":"yyyy"}},"legend":{"position":"bottom"},"colors":["#440154","#414487","#2A788E","#22A884","#7AD151","#FDE725"],"tooltip":{"x":{"format":"yyyy"},"y":{"formatter":"function(value) {return value.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");}"}},"annotations":{"points":[{"x":"new Date('1994').getTime()","y":6935296,"label":{"text":"Great Lakes refugee crisis","offsetY":0},"marker":{"size":6}}]},"title":{"text":"Continent of origin for refugees population","style":{"fontWeight":700,"fontSize":"22px"}},"subtitle":{"text":"Data from the UN Refugee Agency","style":{"fontWeight":400,"fontSize":"16px","color":"#BDBDBD"}}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"1960-01-01","max":"2017-01-01"}},"evals":["ax_opts.series.0.data.0.0","ax_opts.series.0.data.1.0","ax_opts.series.0.data.2.0","ax_opts.series.0.data.3.0","ax_opts.series.0.data.4.0","ax_opts.series.0.data.5.0","ax_opts.series.0.data.6.0","ax_opts.series.0.data.7.0","ax_opts.series.0.data.8.0","ax_opts.series.0.data.9.0","ax_opts.series.0.data.10.0","ax_opts.series.0.data.11.0","ax_opts.series.0.data.12.0","ax_opts.series.0.data.13.0","ax_opts.series.0.data.14.0","ax_opts.series.0.data.15.0","ax_opts.series.0.data.16.0","ax_opts.series.0.data.17.0","ax_opts.series.0.data.18.0","ax_opts.series.0.data.19.0","ax_opts.series.0.data.20.0","ax_opts.series.0.data.21.0","ax_opts.series.0.data.22.0","ax_opts.series.0.data.23.0","ax_opts.series.0.data.24.0","ax_opts.series.0.data.25.0","ax_opts.series.0.data.26.0","ax_opts.series.0.data.27.0","ax_opts.series.0.data.28.0","ax_opts.series.0.data.29.0","ax_opts.series.0.data.30.0","ax_opts.series.0.data.31.0","ax_opts.series.0.data.32.0","ax_opts.series.0.data.33.0","ax_opts.series.0.data.34.0","ax_opts.series.0.data.35.0","ax_opts.series.0.data.36.0","ax_opts.series.0.data.37.0","ax_opts.series.0.data.38.0","ax_opts.series.0.data.39.0","ax_opts.series.0.data.40.0","ax_opts.series.0.data.41.0","ax_opts.series.0.data.42.0","ax_opts.series.0.data.43.0","ax_opts.series.0.data.44.0","ax_opts.series.0.data.45.0","ax_opts.series.0.data.46.0","ax_opts.series.0.data.47.0","ax_opts.series.0.data.48.0","ax_opts.series.0.data.49.0","ax_opts.series.0.data.50.0","ax_opts.series.0.data.51.0","ax_opts.series.0.data.52.0","ax_opts.series.0.data.53.0","ax_opts.series.0.data.54.0","ax_opts.series.0.data.55.0","ax_opts.series.0.data.56.0","ax_opts.series.0.data.57.0","ax_opts.series.1.data.0.0","ax_opts.series.1.data.1.0","ax_opts.series.1.data.2.0","ax_opts.series.1.data.3.0","ax_opts.series.1.data.4.0","ax_opts.series.1.data.5.0","ax_opts.series.1.data.6.0","ax_opts.series.1.data.7.0","ax_opts.series.1.data.8.0","ax_opts.series.1.data.9.0","ax_opts.series.1.data.10.0","ax_opts.series.1.data.11.0","ax_opts.series.1.data.12.0","ax_opts.series.1.data.13.0","ax_opts.series.1.data.14.0","ax_opts.series.1.data.15.0","ax_opts.series.1.data.16.0","ax_opts.series.1.data.17.0","ax_opts.series.1.data.18.0","ax_opts.series.1.data.19.0","ax_opts.series.1.data.20.0","ax_opts.series.1.data.21.0","ax_opts.series.1.data.22.0","ax_opts.series.1.data.23.0","ax_opts.series.1.data.24.0","ax_opts.series.1.data.25.0","ax_opts.series.1.data.26.0","ax_opts.series.1.data.27.0","ax_opts.series.1.data.28.0","ax_opts.series.1.data.29.0","ax_opts.series.1.data.30.0","ax_opts.series.1.data.31.0","ax_opts.series.1.data.32.0","ax_opts.series.1.data.33.0","ax_opts.series.1.data.34.0","ax_opts.series.1.data.35.0","ax_opts.series.1.data.36.0","ax_opts.series.1.data.37.0","ax_opts.series.1.data.38.0","ax_opts.series.1.data.39.0","ax_opts.series.1.data.40.0","ax_opts.series.1.data.41.0","ax_opts.series.1.data.42.0","ax_opts.series.1.data.43.0","ax_opts.series.1.data.44.0","ax_opts.series.1.data.45.0","ax_opts.series.1.data.46.0","ax_opts.series.1.data.47.0","ax_opts.series.1.data.48.0","ax_opts.series.1.data.49.0","ax_opts.series.1.data.50.0","ax_opts.series.1.data.51.0","ax_opts.series.1.data.52.0","ax_opts.series.1.data.53.0","ax_opts.series.2.data.0.0","ax_opts.series.2.data.1.0","ax_opts.series.2.data.2.0","ax_opts.series.2.data.3.0","ax_opts.series.2.data.4.0","ax_opts.series.2.data.5.0","ax_opts.series.2.data.6.0","ax_opts.series.2.data.7.0","ax_opts.series.2.data.8.0","ax_opts.series.2.data.9.0","ax_opts.series.2.data.10.0","ax_opts.series.2.data.11.0","ax_opts.series.2.data.12.0","ax_opts.series.2.data.13.0","ax_opts.series.2.data.14.0","ax_opts.series.2.data.15.0","ax_opts.series.2.data.16.0","ax_opts.series.2.data.17.0","ax_opts.series.2.data.18.0","ax_opts.series.2.data.19.0","ax_opts.series.2.data.20.0","ax_opts.series.2.data.21.0","ax_opts.series.2.data.22.0","ax_opts.series.2.data.23.0","ax_opts.series.2.data.24.0","ax_opts.series.2.data.25.0","ax_opts.series.2.data.26.0","ax_opts.series.2.data.27.0","ax_opts.series.2.data.28.0","ax_opts.series.2.data.29.0","ax_opts.series.2.data.30.0","ax_opts.series.2.data.31.0","ax_opts.series.2.data.32.0","ax_opts.series.2.data.33.0","ax_opts.series.2.data.34.0","ax_opts.series.2.data.35.0","ax_opts.series.2.data.36.0","ax_opts.series.2.data.37.0","ax_opts.series.2.data.38.0","ax_opts.series.2.data.39.0","ax_opts.series.2.data.40.0","ax_opts.series.2.data.41.0","ax_opts.series.2.data.42.0","ax_opts.series.2.data.43.0","ax_opts.series.2.data.44.0","ax_opts.series.2.data.45.0","ax_opts.series.2.data.46.0","ax_opts.series.2.data.47.0","ax_opts.series.2.data.48.0","ax_opts.series.2.data.49.0","ax_opts.series.2.data.50.0","ax_opts.series.2.data.51.0","ax_opts.series.2.data.52.0","ax_opts.series.2.data.53.0","ax_opts.series.3.data.0.0","ax_opts.series.3.data.1.0","ax_opts.series.3.data.2.0","ax_opts.series.3.data.3.0","ax_opts.series.3.data.4.0","ax_opts.series.3.data.5.0","ax_opts.series.3.data.6.0","ax_opts.series.3.data.7.0","ax_opts.series.3.data.8.0","ax_opts.series.3.data.9.0","ax_opts.series.3.data.10.0","ax_opts.series.3.data.11.0","ax_opts.series.3.data.12.0","ax_opts.series.3.data.13.0","ax_opts.series.3.data.14.0","ax_opts.series.3.data.15.0","ax_opts.series.3.data.16.0","ax_opts.series.3.data.17.0","ax_opts.series.3.data.18.0","ax_opts.series.3.data.19.0","ax_opts.series.3.data.20.0","ax_opts.series.3.data.21.0","ax_opts.series.3.data.22.0","ax_opts.series.3.data.23.0","ax_opts.series.3.data.24.0","ax_opts.series.3.data.25.0","ax_opts.series.3.data.26.0","ax_opts.series.3.data.27.0","ax_opts.series.3.data.28.0","ax_opts.series.3.data.29.0","ax_opts.series.3.data.30.0","ax_opts.series.3.data.31.0","ax_opts.series.3.data.32.0","ax_opts.series.3.data.33.0","ax_opts.series.3.data.34.0","ax_opts.series.3.data.35.0","ax_opts.series.3.data.36.0","ax_opts.series.3.data.37.0","ax_opts.series.3.data.38.0","ax_opts.series.3.data.39.0","ax_opts.series.3.data.40.0","ax_opts.series.3.data.41.0","ax_opts.series.3.data.42.0","ax_opts.series.3.data.43.0","ax_opts.series.3.data.44.0","ax_opts.series.4.data.0.0","ax_opts.series.4.data.1.0","ax_opts.series.4.data.2.0","ax_opts.series.4.data.3.0","ax_opts.series.4.data.4.0","ax_opts.series.4.data.5.0","ax_opts.series.4.data.6.0","ax_opts.series.4.data.7.0","ax_opts.series.4.data.8.0","ax_opts.series.4.data.9.0","ax_opts.series.4.data.10.0","ax_opts.series.4.data.11.0","ax_opts.series.4.data.12.0","ax_opts.series.4.data.13.0","ax_opts.series.4.data.14.0","ax_opts.series.4.data.15.0","ax_opts.series.4.data.16.0","ax_opts.series.4.data.17.0","ax_opts.series.4.data.18.0","ax_opts.series.4.data.19.0","ax_opts.series.4.data.20.0","ax_opts.series.4.data.21.0","ax_opts.series.4.data.22.0","ax_opts.series.4.data.23.0","ax_opts.series.4.data.24.0","ax_opts.series.4.data.25.0","ax_opts.series.4.data.26.0","ax_opts.series.4.data.27.0","ax_opts.series.5.data.0.0","ax_opts.series.5.data.1.0","ax_opts.series.5.data.2.0","ax_opts.series.5.data.3.0","ax_opts.series.5.data.4.0","ax_opts.series.5.data.5.0","ax_opts.series.5.data.6.0","ax_opts.series.5.data.7.0","ax_opts.series.5.data.8.0","ax_opts.series.5.data.9.0","ax_opts.series.5.data.10.0","ax_opts.series.5.data.11.0","ax_opts.series.5.data.12.0","ax_opts.series.5.data.13.0","ax_opts.series.5.data.14.0","ax_opts.series.5.data.15.0","ax_opts.series.5.data.16.0","ax_opts.series.5.data.17.0","ax_opts.series.5.data.18.0","ax_opts.series.5.data.19.0","ax_opts.series.5.data.20.0","ax_opts.series.5.data.21.0","ax_opts.series.5.data.22.0","ax_opts.series.5.data.23.0","ax_opts.series.5.data.24.0","ax_opts.series.5.data.25.0","ax_opts.series.5.data.26.0","ax_opts.series.5.data.27.0","ax_opts.series.5.data.28.0","ax_opts.series.5.data.29.0","ax_opts.series.5.data.30.0","ax_opts.series.5.data.31.0","ax_opts.series.5.data.32.0","ax_opts.series.5.data.33.0","ax_opts.series.5.data.34.0","ax_opts.series.5.data.35.0","ax_opts.series.5.data.36.0","ax_opts.series.5.data.37.0","ax_opts.series.5.data.38.0","ax_opts.series.5.data.39.0","ax_opts.series.5.data.40.0","ax_opts.series.5.data.41.0","ax_opts.series.5.data.42.0","ax_opts.series.5.data.43.0","ax_opts.series.5.data.44.0","ax_opts.series.5.data.45.0","ax_opts.series.5.data.46.0","ax_opts.yaxis.labels.formatter","ax_opts.tooltip.y.formatter","ax_opts.annotations.points.0.x"],"jsHooks":[]}</script><details><p><summary><span title="View full code">View full code</span></summary></p>
<div class="sourceCode" id="cb20"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/utils/data.html">data</a></span>(<span class="st">"unhcr_ts"</span>)
<span class="kw">unhcr_ts</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="kw">population_type</span> <span class="op">==</span> <span class="st">"Refugees (incl. refugee-like situations)"</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(date = <span class="fu"><a href="https://rdrr.io/r/base/as.Date.html">as.Date</a></span>(<span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span>(<span class="kw">year</span>, <span class="st">"-01-01"</span>))) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/apex.html">apex</a></span>(<span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span>(<span class="kw">date</span>, <span class="kw">n</span>, group = <span class="kw">continent_origin</span>), type = <span class="st">"line"</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_legend.html">ax_legend</a></span>(position = <span class="st">"bottom"</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_stroke.html">ax_stroke</a></span>(width = <span class="fl">2</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_colors.html">ax_colors</a></span>(<span class="st">"#440154"</span>, <span class="st">"#414487"</span>, <span class="st">"#2A788E"</span>,
<span class="st">"#22A884"</span>, <span class="st">"#7AD151"</span>, <span class="st">"#FDE725"</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_yaxis.html">ax_yaxis</a></span>(
labels = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
formatter = <span class="kw">htmlwidgets</span>::<span class="fu"><a href="https://rdrr.io/pkg/htmlwidgets/man/JS.html">JS</a></span>(<span class="st">"function(val) {return (val/1e6).toFixed(0);}"</span>)
),
title = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(text = <span class="st">"Number of refugees (in million)"</span>)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_xaxis.html">ax_xaxis</a></span>(labels = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(format = <span class="st">"yyyy"</span>)) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_tooltip.html">ax_tooltip</a></span>(
x = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(format = <span class="st">"yyyy"</span>),
y = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
formatter = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(
<span class="co"># thousand separator in javascript</span>
<span class="st">"function(value) {return value.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");}"</span>
)
)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_annotations.html">ax_annotations</a></span>(
points = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
x = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(<span class="st">"new Date('1994').getTime()"</span>),
y = <span class="fl">6935296</span>,
label = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(text = <span class="st">"Great Lakes refugee crisis"</span>, offsetY = <span class="fl">0</span>),
marker = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(size = <span class="fl">6</span>)
)
)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_labs.html">ax_labs</a></span>(
title = <span class="st">"Continent of origin for refugees population"</span>,
subtitle = <span class="st">"Data from the UN Refugee Agency"</span>
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_title.html">ax_title</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"22px"</span>)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_subtitle.html">ax_subtitle</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"16px"</span>, color = <span class="st">"#BDBDBD"</span>)
)
</pre></div>
</details><p><br><br></p>
</div>
<div id="scatter-plot" class="section level1">
<h1 class="hasAnchor">
<a href="#scatter-plot" class="anchor"></a>Scatter plot</h1>
<p>Dataset used is from <a href="https://github.com/jennybc/gapminder">{gapminder}</a>.</p>
<p>Transform data and initialize the chart :</p>
<div class="sourceCode" id="cb21"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/utils/data.html">data</a></span>(<span class="st">"gapminder"</span>, package = <span class="st">"gapminder"</span>)
<span class="kw">scatter</span> <span class="op">&lt;-</span> <span class="kw">gapminder</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="kw">year</span> <span class="op">==</span> <span class="fl">2007</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(
gdpPercap = <span class="fu"><a href="https://rdrr.io/r/base/Log.html">log</a></span>(<span class="kw">gdpPercap</span>),
pop = <span class="fu"><a href="https://rdrr.io/r/base/MathFun.html">sqrt</a></span>(<span class="kw">pop</span> <span class="op">/</span> <span class="kw">pi</span>) <span class="op">/</span> <span class="fl">1500</span>
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/apex.html">apex</a></span>(
mapping = <span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span>(<span class="kw">gdpPercap</span>,
<span class="kw">lifeExp</span>,
z = <span class="kw">pop</span>,
group = <span class="kw">continent</span>,
label = <span class="kw">country</span>),
type = <span class="st">"scatter"</span>,
height = <span class="st">"500px"</span>
)
</pre></div>
<p>Enable zoom on both axis :</p>
<div class="sourceCode" id="cb22"><pre class="downlit">
<span class="kw">scatter</span> <span class="op">&lt;-</span> <span class="kw">scatter</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_chart.html">ax_chart</a></span>(zoom = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
enabled = <span class="fl">TRUE</span>, type = <span class="st">"xy"</span>
))
</pre></div>
<p>Show y-axis border and ticks, no decimals in labels :</p>
<div class="sourceCode" id="cb23"><pre class="downlit">
<span class="kw">scatter</span> <span class="op">&lt;-</span> <span class="kw">scatter</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_yaxis.html">ax_yaxis</a></span>(
decimalsInFloat = <span class="fl">0</span>,
axisBorder = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(show = <span class="fl">TRUE</span>),
axisTicks = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(show = <span class="fl">TRUE</span>),
title = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(text = <span class="st">"life expectancy at birth (in years)"</span>)
)
</pre></div>
<p>Configuration for x-axis, hide the tooltip displayed on the axis itself (not the main tooltip), display two decimals in the labels (useful when zooming, since values are logarithm theres a lot of decimals) :</p>
<div class="sourceCode" id="cb24"><pre class="downlit">
<span class="kw">scatter</span> <span class="op">&lt;-</span> <span class="kw">scatter</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_xaxis.html">ax_xaxis</a></span>(
tickAmount = <span class="fl">8</span>,
labels = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
formatter = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(<span class="st">"function(val) {return val.toFixed(2);}"</span>)
),
tooltip = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(enabled = <span class="fl">FALSE</span>),
title = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(text = <span class="st">"GDP per capita (log-scale)"</span>)
)
</pre></div>
<p>Display vertical grid lines (on the x-axis, those on the y-axis are enabled by default) :</p>
<div class="sourceCode" id="cb25"><pre class="downlit">
<span class="kw">scatter</span> <span class="op">&lt;-</span> <span class="kw">scatter</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_grid.html">ax_grid</a></span>(xaxis = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(lines = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(show = <span class="fl">TRUE</span>)))
</pre></div>
<p>Legend on the right and slightly offset downwards :</p>
<div class="sourceCode" id="cb26"><pre class="downlit">
<span class="kw">scatter</span> <span class="op">&lt;-</span> <span class="kw">scatter</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_legend.html">ax_legend</a></span>(position = <span class="st">"right"</span>, offsetY = <span class="fl">70</span>)
</pre></div>
<p>Add a custom tooltip with an HTML string, data used in aesthetic can be accessed in JavaScript with <code>w.config.series[seriesIndex].data[dataPointIndex].x</code> (x is the variable <code>gdpPercap</code>), or <code>w.config.series[seriesIndex].data[dataPointIndex].label</code> (the country), its possible to use custom aesthetics to include more data in the chart configuration script.</p>
<div class="sourceCode" id="cb27"><pre class="downlit">
<span class="kw">scatter</span> <span class="op">&lt;-</span> <span class="kw">scatter</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_tooltip.html">ax_tooltip</a></span>(custom = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(<span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste</a></span>(
<span class="st">"function({ series, seriesIndex, dataPointIndex, w }) {"</span>,
<span class="st">"console.log(w); return ("</span>,
<span class="st">"'&lt;div&gt;' +"</span>,
<span class="st">"'&lt;div class = \"apexcharts-tooltip-title\"&gt;' +"</span>,
<span class="st">"w.config.series[seriesIndex].data[dataPointIndex].label"</span>,
<span class="st">"+ '&lt;/div&gt;' +"</span>,
<span class="st">"'&lt;div style = \"padding: 5px;\"&gt;' +"</span>,
<span class="st">"'&lt;div class = \"apexcharts-tooltip-y-group\"&gt;' +"</span>,
<span class="st">"'&lt;span class = \"apexcharts-tooltip-text-label\"&gt;' +"</span>,
<span class="st">"'Population: ' +"</span>,
<span class="st">"'&lt;/span&gt;' +"</span>,
<span class="st">"'&lt;span class = \"apexcharts-tooltip-text-value\"&gt;' +"</span>,
<span class="st">"Math.round(Math.pow(w.config.series[seriesIndex].data[dataPointIndex].z * 1500, 2) * Math.PI).
toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") +"</span>,
<span class="st">"'&lt;/span&gt;' +"</span>,
<span class="st">"'&lt;/br&gt;' +"</span>,
<span class="st">"'&lt;span class = \"apexcharts-tooltip-text-label\"&gt;' +"</span>,
<span class="st">"'GDP per capita: ' +"</span>,
<span class="st">"'&lt;/span&gt;' +"</span>,
<span class="st">"'&lt;span class = \"apexcharts-tooltip-text-value\"&gt;' +"</span>,
<span class="st">"Math.round(Math.exp(w.config.series[seriesIndex].data[dataPointIndex].x)) +"</span>,
<span class="st">"'&lt;/span&gt;' +"</span>,
<span class="st">"'&lt;/br&gt;' +"</span>,
<span class="st">"'&lt;span class = \"apexcharts-tooltip-text-label\"&gt;' +"</span>,
<span class="st">"'Life expectancy: ' +"</span>,
<span class="st">"'&lt;/span&gt;' +"</span>,
<span class="st">"'&lt;span class = \"apexcharts-tooltip-text-value\"&gt;' +"</span>,
<span class="st">"w.config.series[seriesIndex].data[dataPointIndex].y +"</span>,
<span class="st">"'&lt;/span&gt;' +"</span>,
<span class="st">"'&lt;/div&gt;' +"</span>,
<span class="st">"'&lt;/div&gt;' +"</span>,
<span class="st">"'&lt;/div&gt;'"</span>,
<span class="st">");"</span>,
<span class="st">"}"</span>, sep = <span class="st">"\n"</span>
)))
</pre></div>
<p>Add title and subtitle and format them :</p>
<div class="sourceCode" id="cb28"><pre class="downlit">
<span class="kw">scatter</span> <span class="op">&lt;-</span> <span class="kw">scatter</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_labs.html">ax_labs</a></span>(
title = <span class="st">"Life expectancy, GDP and population"</span>,
subtitle = <span class="st">"gapminder dataset from {gapminder}"</span>
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_title.html">ax_title</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"22px"</span>)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_subtitle.html">ax_subtitle</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"16px"</span>, color = <span class="st">"#BDBDBD"</span>)
)
</pre></div>
<p>Final result looks like :</p>
<div class="sourceCode" id="cb29"><pre class="downlit">
<span class="kw">scatter</span>
</pre></div>
<div id="htmlwidget-39d3aaf1bbba70fc9833" style="width:100%;height:500px;" class="apexcharter html-widget"></div>
<script type="application/json" data-for="htmlwidget-39d3aaf1bbba70fc9833">{"x":{"ax_opts":{"chart":{"type":"bubble","zoom":{"enabled":true,"type":"xy"}},"series":[{"name":"Asia","type":"bubble","data":[{"x":6.8820069561858,"y":43.828,"z":2.12402947882241,"label":"Afghanistan"},{"x":10.3021310576603,"y":75.635,"z":0.316611076512148,"label":"Bahrain"},{"x":7.23796062819251,"y":64.062,"z":4.61346790090975,"label":"Bangladesh"},{"x":7.44645596946729,"y":59.723,"z":1.41394799708641,"label":"Cambodia"},{"x":8.50898254693882,"y":72.961,"z":13.6585319887973,"label":"China"},{"x":10.5897354544633,"y":82.208,"z":0.993743572834219,"label":"Hong Kong, China"},{"x":7.80474510373349,"y":64.698,"z":12.5335129373569,"label":"India"},{"x":8.17206604681841,"y":70.65,"z":5.62364927493123,"label":"Indonesia"},{"x":9.35925288424117,"y":70.964,"z":3.1345925102357,"label":"Iran"},{"x":8.40538122225756,"y":59.545,"z":1.97241044205932,"label":"Iraq"},{"x":10.1473461422239,"y":80.745,"z":0.953514076346544,"label":"Israel"},{"x":10.3626851330503,"y":82.603,"z":4.24653142952633,"label":"Japan"},{"x":8.41614805576445,"y":72.535,"z":0.92539269139071,"label":"Jordan"},{"x":7.37341541389891,"y":67.297,"z":1.81563205188668,"label":"Korea, Dem. Rep."},{"x":10.0582725909726,"y":78.623,"z":2.63408778414488,"label":"Korea, Rep."},{"x":10.764413339038,"y":77.588,"z":0.595368867964044,"label":"Kuwait"},{"x":9.25541494473439,"y":71.993,"z":0.744813639293601,"label":"Lebanon"},{"x":9.42960888903361,"y":74.241,"z":1.8738979838941,"label":"Malaysia"},{"x":8.0377926761257,"y":66.803,"z":0.637656486500986,"label":"Mongolia"},{"x":6.8501261661455,"y":62.069,"z":2.5994110801156,"label":"Myanmar"},{"x":6.99517970049047,"y":63.785,"z":2.02206994992841,"label":"Nepal"},{"x":10.013067831606,"y":75.64,"z":0.673349966560488,"label":"Oman"},{"x":7.86555164236352,"y":65.483,"z":4.89355634512389,"label":"Pakistan"},{"x":8.06792697312615,"y":71.688,"z":3.58954041372049,"label":"Philippines"},{"x":9.98298389282434,"y":72.777,"z":1.97604355151449,"label":"Saudi Arabia"},{"x":10.7609446252124,"y":79.972,"z":0.802570253507449,"label":"Singapore"},{"x":8.2865454053824,"y":72.396,"z":1.69791963384164,"label":"Sri Lanka"},{"x":8.33915399358039,"y":74.143,"z":1.65302079293755,"label":"Syria"},{"x":10.2652890227549,"y":78.4,"z":1.81066063886205,"label":"Taiwan"},{"x":8.91709570051749,"y":70.616,"z":3.03401714654057,"label":"Thailand"},{"x":7.80039917688879,"y":74.249,"z":3.47306146307208,"label":"Vietnam"},{"x":8.01478199948213,"y":73.422,"z":0.753974594788234,"label":"West Bank and Gaza"},{"x":7.73226834301825,"y":62.698,"z":1.77265869200583,"label":"Yemen, Rep."}]},{"name":"Europe","type":"bubble","data":[{"x":8.68896420747711,"y":76.423,"z":0.713701483295867,"label":"Albania"},{"x":10.4947817449763,"y":79.829,"z":1.0770478156025,"label":"Austria"},{"x":10.4250336584334,"y":79.441,"z":1.21251772500331,"label":"Belgium"},{"x":8.91547238295869,"y":74.852,"z":0.802498771827673,"label":"Bosnia and Herzegovina"},{"x":9.27620234384137,"y":73.005,"z":1.01782733670414,"label":"Bulgaria"},{"x":9.59009256636376,"y":75.748,"z":0.797291423454926,"label":"Croatia"},{"x":10.0359756484283,"y":76.486,"z":1.20294275072851,"label":"Czech Republic"},{"x":10.4710266888215,"y":78.332,"z":0.879534385617832,"label":"Denmark"},{"x":10.4105185176833,"y":79.313,"z":0.860866128805,"label":"Finland"},{"x":10.3244984200597,"y":80.657,"z":2.93966092902038,"label":"France"},{"x":10.3788012589592,"y":79.406,"z":3.41428708408202,"label":"Germany"},{"x":10.2233371046795,"y":79.483,"z":1.23070313260359,"label":"Greece"},{"x":9.79862382679109,"y":73.338,"z":1.18680291433442,"label":"Hungary"},{"x":10.4962835715914,"y":81.757,"z":0.206674862466907,"label":"Iceland"},{"x":10.6133934271775,"y":78.885,"z":0.762441311979532,"label":"Ireland"},{"x":10.2601026841861,"y":80.546,"z":2.86813902290321,"label":"Italy"},{"x":9.13279994301534,"y":74.543,"z":0.311239984739139,"label":"Montenegro"},{"x":10.5131969627974,"y":79.762,"z":1.53109836218254,"label":"Netherlands"},{"x":10.8068387317159,"y":80.196,"z":0.80914621624058,"label":"Norway"},{"x":9.64146833273388,"y":75.563,"z":2.3343556721012,"label":"Poland"},{"x":9.92865067734509,"y":78.098,"z":1.22705064929108,"label":"Portugal"},{"x":9.28808588403822,"y":72.476,"z":1.77522315967865,"label":"Romania"},{"x":9.18876271106754,"y":74.002,"z":1.19831913702955,"label":"Serbia"},{"x":9.83511846948842,"y":74.663,"z":0.877874640913046,"label":"Slovak Republic"},{"x":10.1568986874684,"y":77.926,"z":0.533151030203283,"label":"Slovenia"},{"x":10.2688617772694,"y":80.941,"z":2.39212217019395,"label":"Spain"},{"x":10.4299822235863,"y":80.884,"z":1.13032632326457,"label":"Sweden"},{"x":10.5322673725097,"y":81.701,"z":1.03381134816048,"label":"Switzerland"},{"x":9.04290069472721,"y":71.777,"z":3.17283615345868,"label":"Turkey"},{"x":10.4104033814055,"y":79.425,"z":2.93224808715914,"label":"United Kingdom"}]},{"name":"Africa","type":"bubble","data":[{"x":8.73606643231968,"y":72.301,"z":2.17156289760774,"label":"Algeria"},{"x":8.47579421109669,"y":42.731,"z":1.32557078723067,"label":"Angola"},{"x":7.27329026764787,"y":56.728,"z":1.06904052722199,"label":"Benin"},{"x":9.43905650915199,"y":50.728,"z":0.481549167698642,"label":"Botswana"},{"x":7.10417120354855,"y":52.295,"z":1.42363728938329,"label":"Burkina Faso"},{"x":6.06394959424533,"y":49.58,"z":1.08950155607956,"label":"Burundi"},{"x":7.62173163818546,"y":50.43,"z":1.58224945507689,"label":"Cameroon"},{"x":6.55963866073166,"y":44.741,"z":0.786188552027412,"label":"Central African Republic"},{"x":7.44077110340364,"y":50.651,"z":1.20353433054997,"label":"Chad"},{"x":6.89380632226159,"y":65.152,"z":0.317143918736678,"label":"Comoros"},{"x":5.62600779392513,"y":46.462,"z":3.02324109407206,"label":"Congo, Dem. Rep."},{"x":8.19769230667367,"y":55.322,"z":0.733264159322009,"label":"Congo, Rep."},{"x":7.34261743644473,"y":48.328,"z":1.59636339062286,"label":"Cote d'Ivoire"},{"x":7.64131552262127,"y":54.791,"z":0.264995389011954,"label":"Djibouti"},{"x":8.62715568136809,"y":71.338,"z":3.36973441399394,"label":"Egypt"},{"x":9.40542099706823,"y":51.579,"z":0.279247184467566,"label":"Equatorial Guinea"},{"x":6.46360577069517,"y":58.04,"z":0.833150516720477,"label":"Eritrea"},{"x":6.537858417896,"y":52.947,"z":3.29001790219223,"label":"Ethiopia"},{"x":9.48846323946509,"y":56.735,"z":0.453675630174763,"label":"Gabon"},{"x":6.62373280402734,"y":59.448,"z":0.488726854468664,"label":"Gambia"},{"x":7.19113479118214,"y":60.022,"z":1.79886502679679,"label":"Ghana"},{"x":6.84869952514225,"y":56.007,"z":1.18630847442673,"label":"Guinea"},{"x":6.36170264447309,"y":46.388,"z":0.456345484702044,"label":"Guinea-Bissau"},{"x":7.28841477748267,"y":54.11,"z":2.24450651719107,"label":"Kenya"},{"x":7.35840497452866,"y":42.592,"z":0.533602462978624,"label":"Lesotho"},{"x":6.02709068611934,"y":45.678,"z":0.672198156795261,"label":"Liberia"},{"x":9.39744209222925,"y":73.952,"z":0.924147513054619,"label":"Libya"},{"x":6.95155216508122,"y":59.443,"z":1.64671440729044,"label":"Madagascar"},{"x":6.63246268578554,"y":48.303,"z":1.37309722883906,"label":"Malawi"},{"x":6.94945518274728,"y":54.467,"z":1.30466501397216,"label":"Mali"},{"x":7.49729124407724,"y":64.164,"z":0.680161424618727,"label":"Mauritania"},{"x":9.30173298996425,"y":72.801,"z":0.420670421034146,"label":"Mauritius"},{"x":8.24805157227629,"y":71.164,"z":2.18532911654426,"label":"Morocco"},{"x":6.71378892858953,"y":42.082,"z":1.68005414602402,"label":"Mozambique"},{"x":8.47867280221088,"y":52.906,"z":0.539197873758825,"label":"Namibia"},{"x":6.4291982009075,"y":56.867,"z":1.35064807662517,"label":"Niger"},{"x":7.60786680459535,"y":46.859,"z":4.37069811073216,"label":"Nigeria"},{"x":8.94508787311239,"y":76.442,"z":0.336016673067782,"label":"Reunion"},{"x":6.76051719324589,"y":46.242,"z":1.11960563648326,"label":"Rwanda"},{"x":7.37678036023091,"y":65.528,"z":0.168031701737334,"label":"Sao Tome and Principe"},{"x":7.4456932990551,"y":63.062,"z":1.31738196613847,"label":"Senegal"},{"x":6.75988240123838,"y":42.568,"z":0.932350632867567,"label":"Sierra Leone"},{"x":6.83102656462005,"y":48.159,"z":1.13580037286798,"label":"Somalia"},{"x":9.13450174396271,"y":49.339,"z":2.49487863191904,"label":"South Africa"},{"x":7.86418745193258,"y":58.556,"z":2.4460632694978,"label":"Sudan"},{"x":8.41482389603953,"y":39.613,"z":0.400369889809535,"label":"Swaziland"},{"x":7.00984441330229,"y":52.517,"z":2.32285499308174,"label":"Tanzania"},{"x":6.78329116129303,"y":58.42,"z":0.898113816731213,"label":"Togo"},{"x":8.8668528088945,"y":73.923,"z":1.20572756889526,"label":"Tunisia"},{"x":6.96260336256323,"y":51.542,"z":2.03144459462454,"label":"Uganda"},{"x":7.14772573491031,"y":42.384,"z":1.28907875183289,"label":"Zambia"},{"x":6.15211398866414,"y":43.487,"z":1.3197236288325,"label":"Zimbabwe"}]},{"name":"Americas","type":"bubble","data":[{"x":9.4555881852823,"y":75.32,"z":2.38779319748102,"label":"Argentina"},{"x":8.24856499124231,"y":65.554,"z":1.13582397603633,"label":"Bolivia"},{"x":9.11226446181318,"y":72.39,"z":5.18468974407784,"label":"Brazil"},{"x":10.5001027699934,"y":80.653,"z":2.17341635642759,"label":"Canada"},{"x":9.48582122511248,"y":78.553,"z":1.51783384455063,"label":"Chile"},{"x":8.85460504631505,"y":72.889,"z":2.50138329789187,"label":"Colombia"},{"x":9.17420129338591,"y":78.782,"z":0.764738487047695,"label":"Costa Rica"},{"x":9.09919682489076,"y":78.273,"z":1.27089466868936,"label":"Cuba"},{"x":8.70373495592662,"y":72.235,"z":1.14824074481036,"label":"Dominican Republic"},{"x":8.83539413800564,"y":74.994,"z":1.39500202073619,"label":"Ecuador"},{"x":8.65318342356569,"y":71.878,"z":0.990840562896197,"label":"El Salvador"},{"x":8.55372760797268,"y":70.259,"z":1.33368116807529,"label":"Guatemala"},{"x":7.09144020097126,"y":60.916,"z":1.09676894286646,"label":"Haiti"},{"x":8.17423258767285,"y":70.198,"z":1.02894892406582,"label":"Honduras"},{"x":8.89848585409696,"y":72.567,"z":0.627142904322953,"label":"Jamaica"},{"x":9.39079142713886,"y":76.195,"z":3.92148317985749,"label":"Mexico"},{"x":7.91910923835222,"y":72.899,"z":0.896046110522963,"label":"Nicaragua"},{"x":9.19107453545405,"y":75.537,"z":0.677254496270923,"label":"Panama"},{"x":8.33635177004121,"y":71.752,"z":0.971189145724766,"label":"Paraguay"},{"x":8.91043800981092,"y":71.421,"z":2.01411228165637,"label":"Peru"},{"x":9.86934678311223,"y":78.746,"z":0.746825537113401,"label":"Puerto Rico"},{"x":9.79859966072961,"y":69.819,"z":0.386625728994324,"label":"Trinidad and Tobago"},{"x":10.6678304153795,"y":78.242,"z":6.52706577788767,"label":"United States"},{"x":9.26969010994403,"y":76.384,"z":0.698370184987581,"label":"Uruguay"},{"x":9.34275413816388,"y":73.747,"z":1.920995782558,"label":"Venezuela"}]},{"name":"Oceania","type":"bubble","data":[{"x":10.4468394384606,"y":81.235,"z":1.70024837882516,"label":"Australia"},{"x":10.1340042199029,"y":80.204,"z":0.763061261140079,"label":"New Zealand"}]}],"dataLabels":{"enabled":false},"xaxis":{"type":"numeric","min":5,"max":11,"crosshairs":{"show":true,"stroke":{"dashArray":0}},"labels":{"style":{"colors":"#848484"},"formatter":"function(val) {return val.toFixed(2);}"},"tickAmount":8,"title":{"text":"GDP per capita (log-scale)"},"tooltip":{"enabled":false}},"yaxis":{"min":30,"max":90,"decimalsInFloat":0,"tooltip":{"enabled":true},"labels":{"style":{"colors":"#848484"}},"axisBorder":{"show":true},"axisTicks":{"show":true},"title":{"text":"life expectancy at birth (in years)"}},"grid":{"xaxis":{"lines":{"show":true}}},"legend":{"position":"right","offsetY":70},"tooltip":{"custom":"function({ series, seriesIndex, dataPointIndex, w }) {\nconsole.log(w); return (\n'<div>' +\n'<div class = \"apexcharts-tooltip-title\">' +\nw.config.series[seriesIndex].data[dataPointIndex].label\n+ '<\/div>' +\n'<div style = \"padding: 5px;\">' +\n'<div class = \"apexcharts-tooltip-y-group\">' +\n'<span class = \"apexcharts-tooltip-text-label\">' +\n'Population: ' +\n'<\/span>' +\n'<span class = \"apexcharts-tooltip-text-value\">' +\nMath.round(Math.pow(w.config.series[seriesIndex].data[dataPointIndex].z * 1500, 2) * Math.PI).\n toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") +\n'<\/span>' +\n'<\/br>' +\n'<span class = \"apexcharts-tooltip-text-label\">' +\n'GDP per capita: ' +\n'<\/span>' +\n'<span class = \"apexcharts-tooltip-text-value\">' +\nMath.round(Math.exp(w.config.series[seriesIndex].data[dataPointIndex].x)) +\n'<\/span>' +\n'<\/br>' +\n'<span class = \"apexcharts-tooltip-text-label\">' +\n'Life expectancy: ' +\n'<\/span>' +\n'<span class = \"apexcharts-tooltip-text-value\">' +\nw.config.series[seriesIndex].data[dataPointIndex].y +\n'<\/span>' +\n'<\/div>' +\n'<\/div>' +\n'<\/div>'\n);\n}"},"title":{"text":"Life expectancy, GDP and population","style":{"fontWeight":700,"fontSize":"22px"}},"subtitle":{"text":"gapminder dataset from {gapminder}","style":{"fontWeight":400,"fontSize":"16px","color":"#BDBDBD"}}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":5.62600779392513,"max":10.8068387317159}},"evals":["ax_opts.xaxis.labels.formatter","ax_opts.tooltip.custom"],"jsHooks":[]}</script><details><p><summary><span title="View full code">View full code</span></summary></p>
<div class="sourceCode" id="cb30"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/utils/data.html">data</a></span>(<span class="st">"gapminder"</span>, package = <span class="st">"gapminder"</span>)
<span class="kw">gapminder</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="kw">year</span> <span class="op">==</span> <span class="fl">2007</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(
gdpPercap = <span class="fu"><a href="https://rdrr.io/r/base/Log.html">log</a></span>(<span class="kw">gdpPercap</span>),
pop = <span class="fu"><a href="https://rdrr.io/r/base/MathFun.html">sqrt</a></span>(<span class="kw">pop</span> <span class="op">/</span> <span class="kw">pi</span>) <span class="op">/</span> <span class="fl">1500</span>
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/apex.html">apex</a></span>(mapping = <span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span>(<span class="kw">gdpPercap</span>, <span class="kw">lifeExp</span>, z = <span class="kw">pop</span>, group = <span class="kw">continent</span>, label = <span class="kw">country</span>), type = <span class="st">"scatter"</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_chart.html">ax_chart</a></span>(zoom = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
enabled = <span class="fl">TRUE</span>, type = <span class="st">"xy"</span>
)) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_yaxis.html">ax_yaxis</a></span>(
decimalsInFloat = <span class="fl">0</span>,
axisBorder = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(show = <span class="fl">TRUE</span>),
axisTicks = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(show = <span class="fl">TRUE</span>),
title = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(text = <span class="st">"life expectancy at birth (in years)"</span>)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_xaxis.html">ax_xaxis</a></span>(
tickAmount = <span class="fl">8</span>,
labels = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
formatter = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(<span class="st">"function(val) {return val.toFixed(2);}"</span>)
),
tooltip = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(enabled = <span class="fl">FALSE</span>),
title = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(text = <span class="st">"GDP per capita (log-scale)"</span>)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_grid.html">ax_grid</a></span>(xaxis = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(lines = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(show = <span class="fl">TRUE</span>))) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_legend.html">ax_legend</a></span>(position = <span class="st">"right"</span>, offsetY = <span class="fl">70</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_tooltip.html">ax_tooltip</a></span>(custom = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(<span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste</a></span>(
<span class="st">"function({ series, seriesIndex, dataPointIndex, w }) {"</span>,
<span class="st">"console.log(w); return ("</span>,
<span class="st">"'&lt;div&gt;' +"</span>,
<span class="st">"'&lt;div class = \"apexcharts-tooltip-title\"&gt;' +"</span>,
<span class="st">"w.config.series[seriesIndex].data[dataPointIndex].label"</span>,
<span class="st">"+ '&lt;/div&gt;' +"</span>,
<span class="st">"'&lt;div style = \"padding: 5px;\"&gt;' +"</span>,
<span class="st">"'&lt;div class = \"apexcharts-tooltip-y-group\"&gt;' +"</span>,
<span class="st">"'&lt;span class = \"apexcharts-tooltip-text-label\"&gt;' +"</span>,
<span class="st">"'Population: ' +"</span>,
<span class="st">"'&lt;/span&gt;' +"</span>,
<span class="st">"'&lt;span class = \"apexcharts-tooltip-text-value\"&gt;' +"</span>,
<span class="st">"Math.round(Math.pow(w.config.series[seriesIndex].data[dataPointIndex].z * 1500, 2) * Math.PI).
toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") +"</span>,
<span class="st">"'&lt;/span&gt;' +"</span>,
<span class="st">"'&lt;/br&gt;' +"</span>,
<span class="st">"'&lt;span class = \"apexcharts-tooltip-text-label\"&gt;' +"</span>,
<span class="st">"'GDP per capita: ' +"</span>,
<span class="st">"'&lt;/span&gt;' +"</span>,
<span class="st">"'&lt;span class = \"apexcharts-tooltip-text-value\"&gt;' +"</span>,
<span class="st">"Math.round(Math.exp(w.config.series[seriesIndex].data[dataPointIndex].x)) +"</span>,
<span class="st">"'&lt;/span&gt;' +"</span>,
<span class="st">"'&lt;/br&gt;' +"</span>,
<span class="st">"'&lt;span class = \"apexcharts-tooltip-text-label\"&gt;' +"</span>,
<span class="st">"'Life expectancy: ' +"</span>,
<span class="st">"'&lt;/span&gt;' +"</span>,
<span class="st">"'&lt;span class = \"apexcharts-tooltip-text-value\"&gt;' +"</span>,
<span class="st">"w.config.series[seriesIndex].data[dataPointIndex].y +"</span>,
<span class="st">"'&lt;/span&gt;' +"</span>,
<span class="st">"'&lt;/div&gt;' +"</span>,
<span class="st">"'&lt;/div&gt;' +"</span>,
<span class="st">"'&lt;/div&gt;'"</span>,
<span class="st">");"</span>,
<span class="st">"}"</span>, sep = <span class="st">"\n"</span>
))) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_labs.html">ax_labs</a></span>(
title = <span class="st">"Life expectancy, GDP and population"</span>,
subtitle = <span class="st">"gapminder dataset from {gapminder}"</span>
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_title.html">ax_title</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"22px"</span>)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_subtitle.html">ax_subtitle</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"16px"</span>, color = <span class="st">"#BDBDBD"</span>)
)
</pre></div>
</details><p><br><br></p>
</div>
<div id="heatmap" class="section level1">
<h1 class="hasAnchor">
<a href="#heatmap" class="anchor"></a>Heatmap</h1>
<p>This is an adaption of this fancy <a href="http://jkunst.com/highcharter/showcase.html">{highcharter} example</a>, based from this <a href="http://graphics.wsj.com/infectious-diseases-and-vaccines/">WSJ visualization</a>.</p>
<div class="sourceCode" id="cb31"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/utils/data.html">data</a></span>(<span class="st">"vaccines"</span>, package = <span class="st">"highcharter"</span>)
<span class="kw">heatmap</span> <span class="op">&lt;-</span> <span class="fu"><a href="../../reference/apex.html">apex</a></span>(
<span class="kw">vaccines</span>,
<span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span>(<span class="kw">year</span>, <span class="kw">state</span>, fill = <span class="kw">count</span>),
type = <span class="st">"heatmap"</span>,
height = <span class="st">"800px"</span>
)
</pre></div>
<p>Remove the animations (little slow otherwise) :</p>
<div class="sourceCode" id="cb32"><pre class="downlit">
<span class="kw">heatmap</span> <span class="op">&lt;-</span> <span class="kw">heatmap</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_chart.html">ax_chart</a></span>(animations = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(enabled = <span class="fl">FALSE</span>))
</pre></div>
<p>Remove values displayed in the heatmap :</p>
<div class="sourceCode" id="cb33"><pre class="downlit">
<span class="kw">heatmap</span> <span class="op">&lt;-</span> <span class="kw">heatmap</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_dataLabels.html">ax_dataLabels</a></span>(enabled = <span class="fl">FALSE</span>)
</pre></div>
<p>Remove space between squared of the heatmap :</p>
<div class="sourceCode" id="cb34"><pre class="downlit">
<span class="kw">heatmap</span> <span class="op">&lt;-</span> <span class="kw">heatmap</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_stroke.html">ax_stroke</a></span>(width = <span class="fl">0</span>)
</pre></div>
<p>Thats not possible to make a continuous scale in the legend (like with highcharter), so we use breakpoints :</p>
<div class="sourceCode" id="cb35"><pre class="downlit">
<span class="kw">heatmap</span> <span class="op">&lt;-</span> <span class="kw">heatmap</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_plotOptions.html">ax_plotOptions</a></span>(
heatmap = <span class="fu"><a href="../../reference/heatmap_opts.html">heatmap_opts</a></span>(
radius = <span class="fl">0</span>,
enableShades = <span class="fl">FALSE</span>,
colorScale = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
ranges = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
from = <span class="fl">0</span>,
to = <span class="fl">0.001</span>,
name = <span class="st">"Missing"</span>,
color = <span class="st">"#FFF"</span>
),
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
from = <span class="fl">0.001</span>,
to = <span class="fl">4</span>,
name = <span class="st">"low"</span>,
<span class="co"># color = "#000004"</span>
color = <span class="st">"#FDE725"</span>
),
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
from = <span class="fl">4</span>,
to = <span class="fl">70</span>,
name = <span class="st">"mid-low"</span>,
<span class="co"># color = "#781C6D",</span>
color = <span class="st">"#35B779"</span>
),
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
from = <span class="fl">70</span>,
to = <span class="fl">290</span>,
name = <span class="st">"mid-high"</span>,
<span class="co"># color = "#ED6925",</span>
color = <span class="st">"#31688E"</span>
),
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
from = <span class="fl">290</span>,
to = <span class="fl">3000</span>,
name = <span class="st">"high"</span>,
<span class="co"># color = "#FCFFA4",</span>
color = <span class="st">"#440154"</span>
)
)
)
)
)
</pre></div>
<p>Missing values are colored by default, above we set them to be displayed in white, and now we hide the corresponding legend :</p>
<div class="sourceCode" id="cb36"><pre class="downlit">
<span class="kw">heatmap</span> <span class="op">&lt;-</span> <span class="kw">heatmap</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_legend.html">ax_legend</a></span>(
formatter = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(
<span class="st">"function(seriesName, opts) {
if (seriesName == 'Missing') return null; else return seriesName;
}"</span>
),
offsetY = <span class="op">-</span><span class="fl">15</span>
)
</pre></div>
<p>Set size of the y-axis labels :</p>
<div class="sourceCode" id="cb37"><pre class="downlit">
<span class="kw">heatmap</span> <span class="op">&lt;-</span> <span class="kw">heatmap</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_yaxis.html">ax_yaxis</a></span>(
labels = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"8px"</span>)
)
)
</pre></div>
<p>Add a vertical line to identify the year when the vaccine was introduced :</p>
<div class="sourceCode" id="cb38"><pre class="downlit">
<span class="kw">heatmap</span> <span class="op">&lt;-</span> <span class="kw">heatmap</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_annotations.html">ax_annotations</a></span>(
xaxis = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
x = <span class="fl">1963</span>, x2 = <span class="fl">1963.1</span>,
strokeDashArray = <span class="fl">0</span>,
opacity = <span class="fl">1</span>,
borderColor = <span class="st">"firebrick"</span>,
fillColor = <span class="st">"firebrick"</span>,
label = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
borderColor = <span class="st">"firebrick"</span>,
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(color = <span class="st">"#FFF"</span>, background = <span class="st">"firebrick"</span>),
text = <span class="st">"Vaccine Introduced"</span>,
orientation = <span class="st">"horizontal"</span>,
position = <span class="st">"bottom"</span>,
offsetY = <span class="fl">0</span>
)
)
)
)
</pre></div>
<p>As usual, add title and subtitle and format them :</p>
<div class="sourceCode" id="cb39"><pre class="downlit">
<span class="kw">heatmap</span> <span class="op">&lt;-</span> <span class="kw">heatmap</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_labs.html">ax_labs</a></span>(
title = <span class="st">"Infectious Diseases and Vaccines"</span>,
subtitle = <span class="st">"vaccines dataset from {highcharter}"</span>
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_title.html">ax_title</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"22px"</span>)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_subtitle.html">ax_subtitle</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"16px"</span>, color = <span class="st">"#BDBDBD"</span>)
)
</pre></div>
<p>Final result looks like :</p>
<div class="sourceCode" id="cb40"><pre class="downlit">
<span class="kw">heatmap</span>
</pre></div>
<div id="htmlwidget-c0f4d074b744012769ad" style="width:100%;height:800px;" class="apexcharter html-widget"></div>
<script type="application/json" data-for="htmlwidget-c0f4d074b744012769ad">{"x":{"ax_opts":{"chart":{"type":"heatmap","animations":{"enabled":false}},"series":[{"name":"Alabama","data":[{"x":1928,"y":334.99},{"x":1929,"y":111.93},{"x":1930,"y":157},{"x":1931,"y":337.29},{"x":1932,"y":10.21},{"x":1933,"y":65.22},{"x":1934,"y":590.27},{"x":1935,"y":265.34},{"x":1936,"y":20.78},{"x":1937,"y":22.46},{"x":1938,"y":496.44},{"x":1939,"y":182.64},{"x":1940,"y":115.12},{"x":1941,"y":297.47},{"x":1942,"y":126.15},{"x":1943,"y":130.82},{"x":1944,"y":252.87},{"x":1945,"y":27.33},{"x":1946,"y":126.75},{"x":1947,"y":127.26},{"x":1948,"y":69.09},{"x":1949,"y":368.8},{"x":1950,"y":50.9},{"x":1951,"y":103.24},{"x":1952,"y":351.72},{"x":1953,"y":93.99},{"x":1954,"y":280.39},{"x":1955,"y":69.68},{"x":1956,"y":231.75},{"x":1957,"y":299.79},{"x":1958,"y":242.34},{"x":1959,"y":108.19},{"x":1960,"y":63.33},{"x":1961,"y":78.01},{"x":1962,"y":71.58},{"x":1963,"y":34.74},{"x":1964,"y":533.68},{"x":1965,"y":68.2},{"x":1966,"y":52.38},{"x":1967,"y":38.98},{"x":1968,"y":4.65},{"x":1969,"y":0.36},{"x":1970,"y":13.94},{"x":1971,"y":55.24},{"x":1972,"y":4.02},{"x":1973,"y":0.42},{"x":1974,"y":0.58},{"x":1975,"y":0.13},{"x":1976,"y":null},{"x":1977,"y":2.06},{"x":1978,"y":3.43},{"x":1979,"y":3.35},{"x":1980,"y":0.57},{"x":1981,"y":null},{"x":1982,"y":0.05},{"x":1983,"y":0.03},{"x":1984,"y":null},{"x":1985,"y":null},{"x":1986,"y":0.02},{"x":1987,"y":0.09},{"x":1988,"y":0.02},{"x":1989,"y":1.46},{"x":1990,"y":0.65},{"x":1991,"y":0.02},{"x":1992,"y":null},{"x":1993,"y":0.02},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":0.14},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":0.16},{"x":2003,"y":null}]},{"name":"Alaska","data":[{"x":1928,"y":null},{"x":1929,"y":null},{"x":1930,"y":null},{"x":1931,"y":null},{"x":1932,"y":null},{"x":1933,"y":null},{"x":1934,"y":null},{"x":1935,"y":null},{"x":1936,"y":null},{"x":1937,"y":null},{"x":1938,"y":null},{"x":1939,"y":null},{"x":1940,"y":null},{"x":1941,"y":null},{"x":1942,"y":null},{"x":1943,"y":null},{"x":1944,"y":null},{"x":1945,"y":null},{"x":1946,"y":null},{"x":1947,"y":null},{"x":1948,"y":null},{"x":1949,"y":null},{"x":1950,"y":null},{"x":1951,"y":null},{"x":1952,"y":null},{"x":1953,"y":null},{"x":1954,"y":691.67},{"x":1955,"y":241.87},{"x":1956,"y":1120.98},{"x":1957,"y":414.7},{"x":1958,"y":562.06},{"x":1959,"y":816.55},{"x":1960,"y":635.79},{"x":1961,"y":420.96},{"x":1962,"y":571.54},{"x":1963,"y":722.27},{"x":1964,"y":439.89},{"x":1965,"y":79.38},{"x":1966,"y":236.57},{"x":1967,"y":53.27},{"x":1968,"y":3.86},{"x":1969,"y":6.77},{"x":1970,"y":33.61},{"x":1971,"y":19.42},{"x":1972,"y":3.94},{"x":1973,"y":1.47},{"x":1974,"y":0.27},{"x":1975,"y":null},{"x":1976,"y":2.73},{"x":1977,"y":15.07},{"x":1978,"y":0.5},{"x":1979,"y":4.48},{"x":1980,"y":1.44},{"x":1981,"y":null},{"x":1982,"y":0.2},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":null},{"x":1986,"y":null},{"x":1987,"y":null},{"x":1988,"y":0.18},{"x":1989,"y":null},{"x":1990,"y":4.86},{"x":1991,"y":0.18},{"x":1992,"y":0.68},{"x":1993,"y":null},{"x":1994,"y":2.67},{"x":1995,"y":null},{"x":1996,"y":11.16},{"x":1997,"y":0.16},{"x":1998,"y":2.58},{"x":1999,"y":null},{"x":2000,"y":0.16},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Arizona","data":[{"x":1928,"y":200.75},{"x":1929,"y":54.88},{"x":1930,"y":466.31},{"x":1931,"y":497.69},{"x":1932,"y":20.11},{"x":1933,"y":296.01},{"x":1934,"y":238.81},{"x":1935,"y":135.02},{"x":1936,"y":525.5},{"x":1937,"y":837.3},{"x":1938,"y":149.34},{"x":1939,"y":144.02},{"x":1940,"y":339.06},{"x":1941,"y":615.29},{"x":1942,"y":740.83},{"x":1943,"y":172.44},{"x":1944,"y":736.71},{"x":1945,"y":93.74},{"x":1946,"y":498.69},{"x":1947,"y":224.49},{"x":1948,"y":623.38},{"x":1949,"y":531.46},{"x":1950,"y":315.95},{"x":1951,"y":1351.49},{"x":1952,"y":424.59},{"x":1953,"y":557.91},{"x":1954,"y":531.51},{"x":1955,"y":1024.03},{"x":1956,"y":644.32},{"x":1957,"y":700.97},{"x":1958,"y":825.18},{"x":1959,"y":719.02},{"x":1960,"y":325.91},{"x":1961,"y":559.22},{"x":1962,"y":431.74},{"x":1963,"y":583.67},{"x":1964,"y":405.54},{"x":1965,"y":100.6},{"x":1966,"y":336.9},{"x":1967,"y":62.08},{"x":1968,"y":14.61},{"x":1969,"y":31.21},{"x":1970,"y":53.05},{"x":1971,"y":25.39},{"x":1972,"y":40.83},{"x":1973,"y":1.12},{"x":1974,"y":0.89},{"x":1975,"y":3.53},{"x":1976,"y":10},{"x":1977,"y":8.71},{"x":1978,"y":2.52},{"x":1979,"y":3.25},{"x":1980,"y":11.63},{"x":1981,"y":0.36},{"x":1982,"y":0.53},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":7.49},{"x":1986,"y":7.45},{"x":1987,"y":1},{"x":1988,"y":0.08},{"x":1989,"y":3.96},{"x":1990,"y":7.72},{"x":1991,"y":9.04},{"x":1992,"y":null},{"x":1993,"y":0.06},{"x":1994,"y":0.2},{"x":1995,"y":0.27},{"x":1996,"y":0.17},{"x":1997,"y":0.18},{"x":1998,"y":0.2},{"x":1999,"y":0.02},{"x":2000,"y":null},{"x":2001,"y":0.02},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Arkansas","data":[{"x":1928,"y":481.77},{"x":1929,"y":67.22},{"x":1930,"y":53.44},{"x":1931,"y":45.91},{"x":1932,"y":5.33},{"x":1933,"y":293.32},{"x":1934,"y":384.57},{"x":1935,"y":80.33},{"x":1936,"y":5.66},{"x":1937,"y":16.98},{"x":1938,"y":356.73},{"x":1939,"y":123.51},{"x":1940,"y":72},{"x":1941,"y":273.89},{"x":1942,"y":232.7},{"x":1943,"y":162.6},{"x":1944,"y":207.51},{"x":1945,"y":69.5},{"x":1946,"y":168.47},{"x":1947,"y":130.61},{"x":1948,"y":208.3},{"x":1949,"y":667.72},{"x":1950,"y":91.12},{"x":1951,"y":401.09},{"x":1952,"y":188.55},{"x":1953,"y":727.41},{"x":1954,"y":151.03},{"x":1955,"y":173.54},{"x":1956,"y":506.86},{"x":1957,"y":78.41},{"x":1958,"y":173.95},{"x":1959,"y":46.49},{"x":1960,"y":89.24},{"x":1961,"y":93.26},{"x":1962,"y":77.61},{"x":1963,"y":77.5},{"x":1964,"y":58.28},{"x":1965,"y":63.08},{"x":1966,"y":72.49},{"x":1967,"y":66.76},{"x":1968,"y":0.15},{"x":1969,"y":1.51},{"x":1970,"y":1.66},{"x":1971,"y":21.91},{"x":1972,"y":0.65},{"x":1973,"y":3.71},{"x":1974,"y":0.66},{"x":1975,"y":0.1},{"x":1976,"y":0.91},{"x":1977,"y":2.04},{"x":1978,"y":0.96},{"x":1979,"y":0.47},{"x":1980,"y":0.76},{"x":1981,"y":0.59},{"x":1982,"y":null},{"x":1983,"y":0.04},{"x":1984,"y":0.38},{"x":1985,"y":null},{"x":1986,"y":12.21},{"x":1987,"y":null},{"x":1988,"y":null},{"x":1989,"y":0.21},{"x":1990,"y":1.74},{"x":1991,"y":null},{"x":1992,"y":null},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":0.08},{"x":1996,"y":null},{"x":1997,"y":0.12},{"x":1998,"y":null},{"x":1999,"y":0.16},{"x":2000,"y":0.04},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"California","data":[{"x":1928,"y":69.22},{"x":1929,"y":72.8},{"x":1930,"y":760.24},{"x":1931,"y":477.48},{"x":1932,"y":214.08},{"x":1933,"y":445.28},{"x":1934,"y":423.26},{"x":1935,"y":466.38},{"x":1936,"y":773.54},{"x":1937,"y":78.26},{"x":1938,"y":278.32},{"x":1939,"y":939.48},{"x":1940,"y":376.44},{"x":1941,"y":174.42},{"x":1942,"y":1222.01},{"x":1943,"y":340.06},{"x":1944,"y":599.97},{"x":1945,"y":339.44},{"x":1946,"y":575.16},{"x":1947,"y":74.98},{"x":1948,"y":487.91},{"x":1949,"y":320.82},{"x":1950,"y":137.92},{"x":1951,"y":548.36},{"x":1952,"y":335.25},{"x":1953,"y":438.91},{"x":1954,"y":473.05},{"x":1955,"y":513.46},{"x":1956,"y":235.21},{"x":1957,"y":353.35},{"x":1958,"y":235.72},{"x":1959,"y":251.82},{"x":1960,"y":140.03},{"x":1961,"y":223.42},{"x":1962,"y":164.86},{"x":1963,"y":113.36},{"x":1964,"y":179.9},{"x":1965,"y":74.6},{"x":1966,"y":80.59},{"x":1967,"y":27.45},{"x":1968,"y":8.49},{"x":1969,"y":4.57},{"x":1970,"y":9.55},{"x":1971,"y":13.88},{"x":1972,"y":15.43},{"x":1973,"y":3.82},{"x":1974,"y":5.14},{"x":1975,"y":23.78},{"x":1976,"y":10.41},{"x":1977,"y":34.75},{"x":1978,"y":2.81},{"x":1979,"y":4.08},{"x":1980,"y":3.65},{"x":1981,"y":1.4},{"x":1982,"y":3.16},{"x":1983,"y":0.59},{"x":1984,"y":1.2},{"x":1985,"y":0.92},{"x":1986,"y":1.52},{"x":1987,"y":2.68},{"x":1988,"y":2.48},{"x":1989,"y":7.34},{"x":1990,"y":31.99},{"x":1991,"y":6.49},{"x":1992,"y":0.19},{"x":1993,"y":0.18},{"x":1994,"y":0.19},{"x":1995,"y":0.09},{"x":1996,"y":0.11},{"x":1997,"y":0.09},{"x":1998,"y":null},{"x":1999,"y":0.06},{"x":2000,"y":0.03},{"x":2001,"y":0.11},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Colorado","data":[{"x":1928,"y":206.98},{"x":1929,"y":74.24},{"x":1930,"y":1132.76},{"x":1931,"y":453.27},{"x":1932,"y":222.9},{"x":1933,"y":27.69},{"x":1934,"y":1204.25},{"x":1935,"y":1186.07},{"x":1936,"y":54.74},{"x":1937,"y":93},{"x":1938,"y":823.71},{"x":1939,"y":525.21},{"x":1940,"y":231.8},{"x":1941,"y":661.75},{"x":1942,"y":505.49},{"x":1943,"y":976.97},{"x":1944,"y":556.49},{"x":1945,"y":95.91},{"x":1946,"y":992.74},{"x":1947,"y":142.93},{"x":1948,"y":723.28},{"x":1949,"y":557.61},{"x":1950,"y":395.37},{"x":1951,"y":934.02},{"x":1952,"y":386.92},{"x":1953,"y":684},{"x":1954,"y":127.66},{"x":1955,"y":317.08},{"x":1956,"y":873.22},{"x":1957,"y":173.47},{"x":1958,"y":566.11},{"x":1959,"y":411.5},{"x":1960,"y":384.73},{"x":1961,"y":210.35},{"x":1962,"y":474},{"x":1963,"y":325.28},{"x":1964,"y":164.43},{"x":1965,"y":302.7},{"x":1966,"y":72},{"x":1967,"y":79.64},{"x":1968,"y":23.54},{"x":1969,"y":6.43},{"x":1970,"y":10.41},{"x":1971,"y":37.17},{"x":1972,"y":20.88},{"x":1973,"y":6.55},{"x":1974,"y":6.13},{"x":1975,"y":44.44},{"x":1976,"y":16.67},{"x":1977,"y":15.7},{"x":1978,"y":1.8},{"x":1979,"y":2.48},{"x":1980,"y":0.77},{"x":1981,"y":0.25},{"x":1982,"y":0.22},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":0.27},{"x":1986,"y":0.15},{"x":1987,"y":0.27},{"x":1988,"y":3.53},{"x":1989,"y":3.02},{"x":1990,"y":4.17},{"x":1991,"y":0.33},{"x":1992,"y":0.64},{"x":1993,"y":null},{"x":1994,"y":0.54},{"x":1995,"y":0.68},{"x":1996,"y":0.21},{"x":1997,"y":0.72},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":0.06},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Connecticut","data":[{"x":1928,"y":634.95},{"x":1929,"y":614.82},{"x":1930,"y":112.23},{"x":1931,"y":790.46},{"x":1932,"y":348.27},{"x":1933,"y":330.66},{"x":1934,"y":282.35},{"x":1935,"y":1449.49},{"x":1936,"y":228.97},{"x":1937,"y":606.76},{"x":1938,"y":107.56},{"x":1939,"y":937.54},{"x":1940,"y":376.52},{"x":1941,"y":364.57},{"x":1942,"y":587.88},{"x":1943,"y":550.38},{"x":1944,"y":493.5},{"x":1945,"y":170.2},{"x":1946,"y":397.91},{"x":1947,"y":814.92},{"x":1948,"y":140.62},{"x":1949,"y":935.63},{"x":1950,"y":197.45},{"x":1951,"y":227.43},{"x":1952,"y":1179.01},{"x":1953,"y":99.99},{"x":1954,"y":223.47},{"x":1955,"y":1256.63},{"x":1956,"y":116.46},{"x":1957,"y":409.99},{"x":1958,"y":645.65},{"x":1959,"y":516.46},{"x":1960,"y":434.62},{"x":1961,"y":261.76},{"x":1962,"y":672.06},{"x":1963,"y":214.81},{"x":1964,"y":189.03},{"x":1965,"y":322.89},{"x":1966,"y":32.51},{"x":1967,"y":3.57},{"x":1968,"y":23.82},{"x":1969,"y":21.39},{"x":1970,"y":3.82},{"x":1971,"y":38.91},{"x":1972,"y":50.08},{"x":1973,"y":59.17},{"x":1974,"y":5.6},{"x":1975,"y":4.16},{"x":1976,"y":7.64},{"x":1977,"y":25.02},{"x":1978,"y":17.04},{"x":1979,"y":0.12},{"x":1980,"y":0.85},{"x":1981,"y":0.27},{"x":1982,"y":0.24},{"x":1983,"y":null},{"x":1984,"y":0.31},{"x":1985,"y":0.18},{"x":1986,"y":0.27},{"x":1987,"y":0.66},{"x":1988,"y":0.51},{"x":1989,"y":6.53},{"x":1990,"y":5.7},{"x":1991,"y":0.69},{"x":1992,"y":0.06},{"x":1993,"y":0.18},{"x":1994,"y":0.12},{"x":1995,"y":0.03},{"x":1996,"y":0.03},{"x":1997,"y":null},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Delaware","data":[{"x":1928,"y":256.02},{"x":1929,"y":239.82},{"x":1930,"y":109.25},{"x":1931,"y":1003.28},{"x":1932,"y":15.98},{"x":1933,"y":82.68},{"x":1934,"y":1225.2},{"x":1935,"y":412.7},{"x":1936,"y":555.96},{"x":1937,"y":707.1},{"x":1938,"y":236.02},{"x":1939,"y":94.63},{"x":1940,"y":36.04},{"x":1941,"y":1268.35},{"x":1942,"y":90.16},{"x":1943,"y":564.55},{"x":1944,"y":138.4},{"x":1945,"y":96.86},{"x":1946,"y":198.98},{"x":1947,"y":19.41},{"x":1948,"y":333.13},{"x":1949,"y":234.53},{"x":1950,"y":194.7},{"x":1951,"y":208.42},{"x":1952,"y":119.34},{"x":1953,"y":115.88},{"x":1954,"y":527.67},{"x":1955,"y":26.98},{"x":1956,"y":212.31},{"x":1957,"y":78.13},{"x":1958,"y":118.9},{"x":1959,"y":139.7},{"x":1960,"y":212.92},{"x":1961,"y":368.35},{"x":1962,"y":129.42},{"x":1963,"y":248.69},{"x":1964,"y":79.26},{"x":1965,"y":102.38},{"x":1966,"y":51.14},{"x":1967,"y":10.64},{"x":1968,"y":4.51},{"x":1969,"y":93.73},{"x":1970,"y":47.46},{"x":1971,"y":7.27},{"x":1972,"y":9.66},{"x":1973,"y":1.71},{"x":1974,"y":2.72},{"x":1975,"y":5.94},{"x":1976,"y":18.8},{"x":1977,"y":1.18},{"x":1978,"y":1.87},{"x":1979,"y":0.17},{"x":1980,"y":0.68},{"x":1981,"y":null},{"x":1982,"y":null},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":null},{"x":1986,"y":0.16},{"x":1987,"y":3.09},{"x":1988,"y":null},{"x":1989,"y":5.4},{"x":1990,"y":1.35},{"x":1991,"y":2.81},{"x":1992,"y":0.42},{"x":1993,"y":0.28},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":0.13},{"x":1997,"y":null},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"District Of Columbia","data":[{"x":1928,"y":535.63},{"x":1929,"y":94.2},{"x":1930,"y":182.1},{"x":1931,"y":832.99},{"x":1932,"y":53.14},{"x":1933,"y":100.8},{"x":1934,"y":1137.49},{"x":1935,"y":152.73},{"x":1936,"y":335.59},{"x":1937,"y":333.27},{"x":1938,"y":115.59},{"x":1939,"y":497.42},{"x":1940,"y":126.99},{"x":1941,"y":488.19},{"x":1942,"y":190.76},{"x":1943,"y":234.27},{"x":1944,"y":310.09},{"x":1945,"y":39.59},{"x":1946,"y":465.92},{"x":1947,"y":60.15},{"x":1948,"y":305.05},{"x":1949,"y":278.56},{"x":1950,"y":213.51},{"x":1951,"y":185.16},{"x":1952,"y":286.17},{"x":1953,"y":44.05},{"x":1954,"y":383.3},{"x":1955,"y":57.69},{"x":1956,"y":210.28},{"x":1957,"y":114.82},{"x":1958,"y":187.57},{"x":1959,"y":52.17},{"x":1960,"y":158.16},{"x":1961,"y":47.09},{"x":1962,"y":89.2},{"x":1963,"y":27.76},{"x":1964,"y":43.14},{"x":1965,"y":19.76},{"x":1966,"y":49.3},{"x":1967,"y":3.46},{"x":1968,"y":0.78},{"x":1969,"y":5.89},{"x":1970,"y":46},{"x":1971,"y":2.12},{"x":1972,"y":0.27},{"x":1973,"y":1.4},{"x":1974,"y":0.14},{"x":1975,"y":0.28},{"x":1976,"y":1.94},{"x":1977,"y":2.1},{"x":1978,"y":0.3},{"x":1979,"y":0.16},{"x":1980,"y":0.79},{"x":1981,"y":0.32},{"x":1982,"y":0.16},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":4.39},{"x":1986,"y":null},{"x":1987,"y":null},{"x":1988,"y":null},{"x":1989,"y":6.74},{"x":1990,"y":3.66},{"x":1991,"y":null},{"x":1992,"y":0.33},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":0.35},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Florida","data":[{"x":1928,"y":119.58},{"x":1929,"y":78.01},{"x":1930,"y":356.59},{"x":1931,"y":260.79},{"x":1932,"y":13.63},{"x":1933,"y":63.93},{"x":1934,"y":505.65},{"x":1935,"y":72.77},{"x":1936,"y":18.22},{"x":1937,"y":23.08},{"x":1938,"y":517.83},{"x":1939,"y":157.53},{"x":1940,"y":114.19},{"x":1941,"y":459.76},{"x":1942,"y":189.61},{"x":1943,"y":68.57},{"x":1944,"y":189.74},{"x":1945,"y":39.63},{"x":1946,"y":116.89},{"x":1947,"y":53.1},{"x":1948,"y":152.39},{"x":1949,"y":144.03},{"x":1950,"y":83.43},{"x":1951,"y":76.21},{"x":1952,"y":109.99},{"x":1953,"y":38.5},{"x":1954,"y":312.27},{"x":1955,"y":38.04},{"x":1956,"y":127.23},{"x":1957,"y":120.36},{"x":1958,"y":266.67},{"x":1959,"y":74.68},{"x":1960,"y":74.46},{"x":1961,"y":127.69},{"x":1962,"y":76.09},{"x":1963,"y":66.69},{"x":1964,"y":121.55},{"x":1965,"y":62.29},{"x":1966,"y":64.38},{"x":1967,"y":28.92},{"x":1968,"y":8.94},{"x":1969,"y":9.27},{"x":1970,"y":20.19},{"x":1971,"y":30.83},{"x":1972,"y":17.64},{"x":1973,"y":4.7},{"x":1974,"y":2.7},{"x":1975,"y":0.94},{"x":1976,"y":3.78},{"x":1977,"y":3.3},{"x":1978,"y":11.6},{"x":1979,"y":6.2},{"x":1980,"y":4.04},{"x":1981,"y":2.89},{"x":1982,"y":2.01},{"x":1983,"y":1.48},{"x":1984,"y":0.16},{"x":1985,"y":0.99},{"x":1986,"y":3.38},{"x":1987,"y":0.72},{"x":1988,"y":1.32},{"x":1989,"y":1.6},{"x":1990,"y":2.87},{"x":1991,"y":2.21},{"x":1992,"y":0.3},{"x":1993,"y":0.2},{"x":1994,"y":0.16},{"x":1995,"y":0.06},{"x":1996,"y":null},{"x":1997,"y":0.06},{"x":1998,"y":0.01},{"x":1999,"y":0.01},{"x":2000,"y":0.02},{"x":2001,"y":null},{"x":2002,"y":0.01},{"x":2003,"y":null}]},{"name":"Georgia","data":[{"x":1928,"y":159.73},{"x":1929,"y":40.63},{"x":1930,"y":153.21},{"x":1931,"y":104.39},{"x":1932,"y":34.36},{"x":1933,"y":156.88},{"x":1934,"y":774.78},{"x":1935,"y":1.05},{"x":1936,"y":0.27},{"x":1937,"y":null},{"x":1938,"y":299.92},{"x":1939,"y":115.95},{"x":1940,"y":93.84},{"x":1941,"y":294.12},{"x":1942,"y":168.74},{"x":1943,"y":126.45},{"x":1944,"y":171.51},{"x":1945,"y":27.53},{"x":1946,"y":117.11},{"x":1947,"y":102.39},{"x":1948,"y":37.8},{"x":1949,"y":288.7},{"x":1950,"y":62.42},{"x":1951,"y":213.03},{"x":1952,"y":225.42},{"x":1953,"y":86.49},{"x":1954,"y":188.04},{"x":1955,"y":68.18},{"x":1956,"y":128.9},{"x":1957,"y":155.66},{"x":1958,"y":175.18},{"x":1959,"y":11.54},{"x":1960,"y":5.53},{"x":1961,"y":10.24},{"x":1962,"y":10.19},{"x":1963,"y":4.78},{"x":1964,"y":4.92},{"x":1965,"y":15.1},{"x":1966,"y":5.59},{"x":1967,"y":0.96},{"x":1968,"y":0.08},{"x":1969,"y":0.04},{"x":1970,"y":0.36},{"x":1971,"y":23.59},{"x":1972,"y":3.56},{"x":1973,"y":1.02},{"x":1974,"y":0.06},{"x":1975,"y":0.78},{"x":1976,"y":0.1},{"x":1977,"y":14.41},{"x":1978,"y":1.06},{"x":1979,"y":10.14},{"x":1980,"y":15.19},{"x":1981,"y":1.95},{"x":1982,"y":null},{"x":1983,"y":0.14},{"x":1984,"y":0.06},{"x":1985,"y":0.13},{"x":1986,"y":1.49},{"x":1987,"y":0.15},{"x":1988,"y":null},{"x":1989,"y":0.27},{"x":1990,"y":5.5},{"x":1991,"y":0.23},{"x":1992,"y":0.04},{"x":1993,"y":0.01},{"x":1994,"y":0.03},{"x":1995,"y":0.06},{"x":1996,"y":0.01},{"x":1997,"y":null},{"x":1998,"y":0.01},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":0.01},{"x":2002,"y":0.01},{"x":2003,"y":null}]},{"name":"Hawaii","data":[{"x":1928,"y":null},{"x":1929,"y":null},{"x":1930,"y":null},{"x":1931,"y":null},{"x":1932,"y":null},{"x":1933,"y":null},{"x":1934,"y":null},{"x":1935,"y":null},{"x":1936,"y":null},{"x":1937,"y":null},{"x":1938,"y":null},{"x":1939,"y":null},{"x":1940,"y":null},{"x":1941,"y":null},{"x":1942,"y":null},{"x":1943,"y":null},{"x":1944,"y":null},{"x":1945,"y":null},{"x":1946,"y":null},{"x":1947,"y":null},{"x":1948,"y":null},{"x":1949,"y":null},{"x":1950,"y":13.22},{"x":1951,"y":955.24},{"x":1952,"y":null},{"x":1953,"y":null},{"x":1954,"y":99.86},{"x":1955,"y":1186.44},{"x":1956,"y":922.02},{"x":1957,"y":866.24},{"x":1958,"y":95.08},{"x":1959,"y":592.6},{"x":1960,"y":829},{"x":1961,"y":29.62},{"x":1962,"y":387.29},{"x":1963,"y":521.83},{"x":1964,"y":123.18},{"x":1965,"y":575.8},{"x":1966,"y":20.36},{"x":1967,"y":24.46},{"x":1968,"y":5.05},{"x":1969,"y":7.02},{"x":1970,"y":23.86},{"x":1971,"y":59.03},{"x":1972,"y":11.24},{"x":1973,"y":3.52},{"x":1974,"y":7.1},{"x":1975,"y":7.17},{"x":1976,"y":1.2},{"x":1977,"y":4.73},{"x":1978,"y":2.17},{"x":1979,"y":7.95},{"x":1980,"y":0.9},{"x":1981,"y":0.8},{"x":1982,"y":0.5},{"x":1983,"y":0.1},{"x":1984,"y":16.64},{"x":1985,"y":2.33},{"x":1986,"y":2.78},{"x":1987,"y":0.18},{"x":1988,"y":1.81},{"x":1989,"y":2.79},{"x":1990,"y":3.69},{"x":1991,"y":1.95},{"x":1992,"y":4.24},{"x":1993,"y":1.3},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":2.81},{"x":1997,"y":0.49},{"x":1998,"y":null},{"x":1999,"y":0.08},{"x":2000,"y":0.16},{"x":2001,"y":0.57},{"x":2002,"y":0.08},{"x":2003,"y":null}]},{"name":"Idaho","data":[{"x":1928,"y":19.59},{"x":1929,"y":160.37},{"x":1930,"y":196.66},{"x":1931,"y":25.97},{"x":1932,"y":8.76},{"x":1933,"y":193.59},{"x":1934,"y":252.43},{"x":1935,"y":182.33},{"x":1936,"y":262.62},{"x":1937,"y":243.15},{"x":1938,"y":425.67},{"x":1939,"y":694.15},{"x":1940,"y":337.53},{"x":1941,"y":102.03},{"x":1942,"y":395.08},{"x":1943,"y":650.9},{"x":1944,"y":182.34},{"x":1945,"y":259.93},{"x":1946,"y":433.6},{"x":1947,"y":51.13},{"x":1948,"y":275.2},{"x":1949,"y":511.03},{"x":1950,"y":324.05},{"x":1951,"y":358.07},{"x":1952,"y":196.07},{"x":1953,"y":324.34},{"x":1954,"y":734.17},{"x":1955,"y":113.76},{"x":1956,"y":317.56},{"x":1957,"y":486.9},{"x":1958,"y":591.94},{"x":1959,"y":247.2},{"x":1960,"y":421.92},{"x":1961,"y":281.75},{"x":1962,"y":234.12},{"x":1963,"y":572.48},{"x":1964,"y":336.19},{"x":1965,"y":454.66},{"x":1966,"y":246.93},{"x":1967,"y":60.05},{"x":1968,"y":3},{"x":1969,"y":12.74},{"x":1970,"y":13.32},{"x":1971,"y":35.9},{"x":1972,"y":14.09},{"x":1973,"y":31.71},{"x":1974,"y":6.48},{"x":1975,"y":2.35},{"x":1976,"y":224.33},{"x":1977,"y":18.56},{"x":1978,"y":0.43},{"x":1979,"y":2.34},{"x":1980,"y":null},{"x":1981,"y":0.2},{"x":1982,"y":null},{"x":1983,"y":0.1},{"x":1984,"y":null},{"x":1985,"y":6.25},{"x":1986,"y":0.1},{"x":1987,"y":null},{"x":1988,"y":null},{"x":1989,"y":0.8},{"x":1990,"y":2.19},{"x":1991,"y":42.15},{"x":1992,"y":null},{"x":1993,"y":null},{"x":1994,"y":0.18},{"x":1995,"y":0.33},{"x":1996,"y":0.16},{"x":1997,"y":6.59},{"x":1998,"y":0.08},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":0.16},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Illinois","data":[{"x":1928,"y":98.24},{"x":1929,"y":506.18},{"x":1930,"y":216.07},{"x":1931,"y":516.97},{"x":1932,"y":208.31},{"x":1933,"y":155.65},{"x":1934,"y":574.84},{"x":1935,"y":746.81},{"x":1936,"y":15.43},{"x":1937,"y":146.95},{"x":1938,"y":1145.16},{"x":1939,"y":100.12},{"x":1940,"y":84.14},{"x":1941,"y":613.14},{"x":1942,"y":132.69},{"x":1943,"y":328.45},{"x":1944,"y":239.79},{"x":1945,"y":103.25},{"x":1946,"y":298.12},{"x":1947,"y":91.45},{"x":1948,"y":426.99},{"x":1949,"y":65.92},{"x":1950,"y":200.35},{"x":1951,"y":187.66},{"x":1952,"y":294.52},{"x":1953,"y":173.71},{"x":1954,"y":358.74},{"x":1955,"y":144.65},{"x":1956,"y":441.99},{"x":1957,"y":100.27},{"x":1958,"y":233.09},{"x":1959,"y":96.16},{"x":1960,"y":224.66},{"x":1961,"y":159},{"x":1962,"y":163.37},{"x":1963,"y":98.55},{"x":1964,"y":149.33},{"x":1965,"y":42.68},{"x":1966,"y":106.31},{"x":1967,"y":11.93},{"x":1968,"y":13.52},{"x":1969,"y":10.16},{"x":1970,"y":29.38},{"x":1971,"y":29.04},{"x":1972,"y":40.22},{"x":1973,"y":19.48},{"x":1974,"y":18.73},{"x":1975,"y":16.49},{"x":1976,"y":17.86},{"x":1977,"y":16.56},{"x":1978,"y":6.98},{"x":1979,"y":11.6},{"x":1980,"y":2.97},{"x":1981,"y":0.26},{"x":1982,"y":0.24},{"x":1983,"y":1.72},{"x":1984,"y":1.36},{"x":1985,"y":2.43},{"x":1986,"y":3.67},{"x":1987,"y":1.7},{"x":1988,"y":0.47},{"x":1989,"y":22.32},{"x":1990,"y":9.05},{"x":1991,"y":0.05},{"x":1992,"y":0.09},{"x":1993,"y":0.04},{"x":1994,"y":0.15},{"x":1995,"y":0.04},{"x":1996,"y":0.02},{"x":1997,"y":0.08},{"x":1998,"y":0.01},{"x":1999,"y":null},{"x":2000,"y":0.04},{"x":2001,"y":0.01},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Indiana","data":[{"x":1928,"y":263.67},{"x":1929,"y":322.1},{"x":1930,"y":120.73},{"x":1931,"y":541.21},{"x":1932,"y":88.78},{"x":1933,"y":108.02},{"x":1934,"y":631.03},{"x":1935,"y":299.12},{"x":1936,"y":21.15},{"x":1937,"y":210.12},{"x":1938,"y":523.18},{"x":1939,"y":59.79},{"x":1940,"y":16.65},{"x":1941,"y":381.63},{"x":1942,"y":94.99},{"x":1943,"y":263},{"x":1944,"y":149.11},{"x":1945,"y":33.51},{"x":1946,"y":293.05},{"x":1947,"y":60.93},{"x":1948,"y":366.54},{"x":1949,"y":100.14},{"x":1950,"y":169.41},{"x":1951,"y":102},{"x":1952,"y":179.11},{"x":1953,"y":162.58},{"x":1954,"y":517.12},{"x":1955,"y":86.36},{"x":1956,"y":368.17},{"x":1957,"y":180.31},{"x":1958,"y":396.55},{"x":1959,"y":99.64},{"x":1960,"y":223.08},{"x":1961,"y":124.69},{"x":1962,"y":161.79},{"x":1963,"y":122.36},{"x":1964,"y":458.81},{"x":1965,"y":48.06},{"x":1966,"y":116.34},{"x":1967,"y":13.46},{"x":1968,"y":15.55},{"x":1969,"y":10.51},{"x":1970,"y":5.5},{"x":1971,"y":58.23},{"x":1972,"y":23.8},{"x":1973,"y":13.27},{"x":1974,"y":4.86},{"x":1975,"y":9.67},{"x":1976,"y":79.97},{"x":1977,"y":71.15},{"x":1978,"y":3.95},{"x":1979,"y":3.67},{"x":1980,"y":2.01},{"x":1981,"y":0.34},{"x":1982,"y":0.06},{"x":1983,"y":6.78},{"x":1984,"y":0.04},{"x":1985,"y":0.06},{"x":1986,"y":0.7},{"x":1987,"y":null},{"x":1988,"y":1.04},{"x":1989,"y":2.02},{"x":1990,"y":4.49},{"x":1991,"y":0.09},{"x":1992,"y":0.22},{"x":1993,"y":0.02},{"x":1994,"y":0.02},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":null},{"x":1998,"y":0.03},{"x":1999,"y":0.02},{"x":2000,"y":null},{"x":2001,"y":0.03},{"x":2002,"y":0.02},{"x":2003,"y":null}]},{"name":"Iowa","data":[{"x":1928,"y":28.63},{"x":1929,"y":82.95},{"x":1930,"y":395.59},{"x":1931,"y":34.25},{"x":1932,"y":6.32},{"x":1933,"y":33.01},{"x":1934,"y":346.39},{"x":1935,"y":865.65},{"x":1936,"y":8},{"x":1937,"y":10.76},{"x":1938,"y":223.17},{"x":1939,"y":209.13},{"x":1940,"y":212.6},{"x":1941,"y":197.87},{"x":1942,"y":254.79},{"x":1943,"y":242.8},{"x":1944,"y":201.38},{"x":1945,"y":61.4},{"x":1946,"y":160.44},{"x":1947,"y":177.89},{"x":1948,"y":352.26},{"x":1949,"y":87.03},{"x":1950,"y":399.49},{"x":1951,"y":103.78},{"x":1952,"y":120.84},{"x":1953,"y":413.78},{"x":1954,"y":477.14},{"x":1955,"y":286.64},{"x":1956,"y":307.41},{"x":1957,"y":330.75},{"x":1958,"y":463.82},{"x":1959,"y":420.25},{"x":1960,"y":64},{"x":1961,"y":192.53},{"x":1962,"y":393.63},{"x":1963,"y":280.07},{"x":1964,"y":819.82},{"x":1965,"y":339.54},{"x":1966,"y":197.39},{"x":1967,"y":29.6},{"x":1968,"y":6.58},{"x":1969,"y":9.98},{"x":1970,"y":31.42},{"x":1971,"y":94.79},{"x":1972,"y":33.27},{"x":1973,"y":10.12},{"x":1974,"y":4.6},{"x":1975,"y":24.11},{"x":1976,"y":1.4},{"x":1977,"y":123.72},{"x":1978,"y":2.96},{"x":1979,"y":0.53},{"x":1980,"y":0.06},{"x":1981,"y":0.03},{"x":1982,"y":null},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":null},{"x":1986,"y":5.1},{"x":1987,"y":null},{"x":1988,"y":null},{"x":1989,"y":0.45},{"x":1990,"y":0.96},{"x":1991,"y":0.59},{"x":1992,"y":null},{"x":1993,"y":null},{"x":1994,"y":0.25},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":0.28},{"x":1998,"y":0.03},{"x":1999,"y":null},{"x":2000,"y":0.06},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Kansas","data":[{"x":1928,"y":136.92},{"x":1929,"y":555.44},{"x":1930,"y":666.71},{"x":1931,"y":93.47},{"x":1932,"y":326.64},{"x":1933,"y":335.08},{"x":1934,"y":538.84},{"x":1935,"y":1399.01},{"x":1936,"y":23.17},{"x":1937,"y":42.11},{"x":1938,"y":583.06},{"x":1939,"y":158.21},{"x":1940,"y":450.3},{"x":1941,"y":764.47},{"x":1942,"y":535.23},{"x":1943,"y":547.84},{"x":1944,"y":551.62},{"x":1945,"y":95.98},{"x":1946,"y":658.17},{"x":1947,"y":48.12},{"x":1948,"y":58.31},{"x":1949,"y":882.31},{"x":1950,"y":93.17},{"x":1951,"y":572.19},{"x":1952,"y":326.07},{"x":1953,"y":750.87},{"x":1954,"y":66.41},{"x":1955,"y":145.56},{"x":1956,"y":200.78},{"x":1957,"y":0.62},{"x":1958,"y":3.32},{"x":1959,"y":null},{"x":1960,"y":null},{"x":1961,"y":null},{"x":1962,"y":null},{"x":1963,"y":null},{"x":1964,"y":null},{"x":1965,"y":null},{"x":1966,"y":null},{"x":1967,"y":4.44},{"x":1968,"y":0.96},{"x":1969,"y":0.38},{"x":1970,"y":3.35},{"x":1971,"y":62.42},{"x":1972,"y":1.72},{"x":1973,"y":1.19},{"x":1974,"y":8.25},{"x":1975,"y":93.3},{"x":1976,"y":32.17},{"x":1977,"y":61.23},{"x":1978,"y":4.5},{"x":1979,"y":3.14},{"x":1980,"y":3.11},{"x":1981,"y":0.04},{"x":1982,"y":1.82},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":0.04},{"x":1986,"y":4.04},{"x":1987,"y":null},{"x":1988,"y":0.04},{"x":1989,"y":4.75},{"x":1990,"y":9.46},{"x":1991,"y":0.36},{"x":1992,"y":0.08},{"x":1993,"y":null},{"x":1994,"y":0.04},{"x":1995,"y":0.04},{"x":1996,"y":0.04},{"x":1997,"y":null},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":0.08},{"x":2001,"y":0.04},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Kentucky","data":[{"x":1928,"y":216.26},{"x":1929,"y":43.17},{"x":1930,"y":70.15},{"x":1931,"y":181.04},{"x":1932,"y":72.99},{"x":1933,"y":57.86},{"x":1934,"y":422.55},{"x":1935,"y":533.77},{"x":1936,"y":79.66},{"x":1937,"y":245.75},{"x":1938,"y":393.49},{"x":1939,"y":79.78},{"x":1940,"y":97.62},{"x":1941,"y":610.5},{"x":1942,"y":84.08},{"x":1943,"y":383.79},{"x":1944,"y":86.5},{"x":1945,"y":61.13},{"x":1946,"y":269.63},{"x":1947,"y":30.12},{"x":1948,"y":127.97},{"x":1949,"y":294.61},{"x":1950,"y":162.65},{"x":1951,"y":290.96},{"x":1952,"y":362.97},{"x":1953,"y":134.51},{"x":1954,"y":1026},{"x":1955,"y":76.09},{"x":1956,"y":610.29},{"x":1957,"y":557.76},{"x":1958,"y":619.64},{"x":1959,"y":221.65},{"x":1960,"y":352.98},{"x":1961,"y":368.68},{"x":1962,"y":202.29},{"x":1963,"y":284.88},{"x":1964,"y":481.84},{"x":1965,"y":121.06},{"x":1966,"y":154.21},{"x":1967,"y":46.83},{"x":1968,"y":4.37},{"x":1969,"y":2.21},{"x":1970,"y":32.39},{"x":1971,"y":111.46},{"x":1972,"y":14.43},{"x":1973,"y":12.38},{"x":1974,"y":5.52},{"x":1975,"y":4.55},{"x":1976,"y":21.88},{"x":1977,"y":33.04},{"x":1978,"y":3.35},{"x":1979,"y":1.63},{"x":1980,"y":1.75},{"x":1981,"y":0.03},{"x":1982,"y":0.06},{"x":1983,"y":null},{"x":1984,"y":0.03},{"x":1985,"y":0.05},{"x":1986,"y":0.08},{"x":1987,"y":null},{"x":1988,"y":0.95},{"x":1989,"y":1.17},{"x":1990,"y":1.14},{"x":1991,"y":0.69},{"x":1992,"y":7.46},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":null},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":0.05},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Louisiana","data":[{"x":1928,"y":260.33},{"x":1929,"y":88.79},{"x":1930,"y":86.29},{"x":1931,"y":11.47},{"x":1932,"y":67.44},{"x":1933,"y":42.77},{"x":1934,"y":220.96},{"x":1935,"y":117.22},{"x":1936,"y":57.67},{"x":1937,"y":20.71},{"x":1938,"y":44.77},{"x":1939,"y":157.03},{"x":1940,"y":47.78},{"x":1941,"y":35.01},{"x":1942,"y":123.74},{"x":1943,"y":106.44},{"x":1944,"y":104},{"x":1945,"y":41.15},{"x":1946,"y":126.32},{"x":1947,"y":49.96},{"x":1948,"y":57.63},{"x":1949,"y":51.62},{"x":1950,"y":28.57},{"x":1951,"y":78.73},{"x":1952,"y":23.97},{"x":1953,"y":155.89},{"x":1954,"y":104.96},{"x":1955,"y":5.66},{"x":1956,"y":69.64},{"x":1957,"y":34.64},{"x":1958,"y":9.05},{"x":1959,"y":2.08},{"x":1960,"y":7.46},{"x":1961,"y":1.23},{"x":1962,"y":6.9},{"x":1963,"y":4.26},{"x":1964,"y":3.44},{"x":1965,"y":3.85},{"x":1966,"y":3.02},{"x":1967,"y":4.46},{"x":1968,"y":0.79},{"x":1969,"y":3.46},{"x":1970,"y":8.34},{"x":1971,"y":42.19},{"x":1972,"y":3.26},{"x":1973,"y":2.37},{"x":1974,"y":0.38},{"x":1975,"y":0.09},{"x":1976,"y":7.76},{"x":1977,"y":2.2},{"x":1978,"y":21.25},{"x":1979,"y":6.2},{"x":1980,"y":0.43},{"x":1981,"y":0.1},{"x":1982,"y":0.34},{"x":1983,"y":0.09},{"x":1984,"y":0.18},{"x":1985,"y":0.95},{"x":1986,"y":0.08},{"x":1987,"y":null},{"x":1988,"y":null},{"x":1989,"y":2.79},{"x":1990,"y":null},{"x":1991,"y":null},{"x":1992,"y":null},{"x":1993,"y":0.02},{"x":1994,"y":0.02},{"x":1995,"y":0.42},{"x":1996,"y":null},{"x":1997,"y":null},{"x":1998,"y":0.02},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Maine","data":[{"x":1928,"y":401.96},{"x":1929,"y":719.17},{"x":1930,"y":198.88},{"x":1931,"y":434.35},{"x":1932,"y":1086.28},{"x":1933,"y":13.39},{"x":1934,"y":78.02},{"x":1935,"y":857.76},{"x":1936,"y":891.89},{"x":1937,"y":134.35},{"x":1938,"y":509.67},{"x":1939,"y":271.09},{"x":1940,"y":837.74},{"x":1941,"y":557.7},{"x":1942,"y":540.61},{"x":1943,"y":297.99},{"x":1944,"y":611.07},{"x":1945,"y":61.29},{"x":1946,"y":578},{"x":1947,"y":504.58},{"x":1948,"y":335.01},{"x":1949,"y":1108.87},{"x":1950,"y":106.15},{"x":1951,"y":193.05},{"x":1952,"y":987.72},{"x":1953,"y":181.55},{"x":1954,"y":626.75},{"x":1955,"y":710.48},{"x":1956,"y":115.39},{"x":1957,"y":478.88},{"x":1958,"y":462.59},{"x":1959,"y":270.41},{"x":1960,"y":413.05},{"x":1961,"y":279.08},{"x":1962,"y":718.01},{"x":1963,"y":48.49},{"x":1964,"y":373.91},{"x":1965,"y":295.75},{"x":1966,"y":29.7},{"x":1967,"y":24.63},{"x":1968,"y":3.51},{"x":1969,"y":0.8},{"x":1970,"y":41.48},{"x":1971,"y":120.27},{"x":1972,"y":20.98},{"x":1973,"y":5.32},{"x":1974,"y":3.44},{"x":1975,"y":1.44},{"x":1976,"y":0.9},{"x":1977,"y":15.91},{"x":1978,"y":117.78},{"x":1979,"y":1.89},{"x":1980,"y":4.22},{"x":1981,"y":0.45},{"x":1982,"y":null},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":null},{"x":1986,"y":1.26},{"x":1987,"y":0.25},{"x":1988,"y":0.66},{"x":1989,"y":null},{"x":1990,"y":0.32},{"x":1991,"y":0.56},{"x":1992,"y":0.24},{"x":1993,"y":0.16},{"x":1994,"y":0.24},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":0.32},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Maryland","data":[{"x":1928,"y":1089.39},{"x":1929,"y":126.04},{"x":1930,"y":73.89},{"x":1931,"y":1264.85},{"x":1932,"y":65.17},{"x":1933,"y":41.18},{"x":1934,"y":1575.91},{"x":1935,"y":133.17},{"x":1936,"y":405.28},{"x":1937,"y":698.17},{"x":1938,"y":159.06},{"x":1939,"y":852.92},{"x":1940,"y":233.84},{"x":1941,"y":384.33},{"x":1942,"y":535.19},{"x":1943,"y":196.78},{"x":1944,"y":613.78},{"x":1945,"y":87.4},{"x":1946,"y":488.43},{"x":1947,"y":50.88},{"x":1948,"y":435.37},{"x":1949,"y":740.27},{"x":1950,"y":61.72},{"x":1951,"y":269.07},{"x":1952,"y":348.04},{"x":1953,"y":79.46},{"x":1954,"y":433.86},{"x":1955,"y":83.51},{"x":1956,"y":310.79},{"x":1957,"y":79.68},{"x":1958,"y":210.83},{"x":1959,"y":76.08},{"x":1960,"y":104.48},{"x":1961,"y":130.28},{"x":1962,"y":96.62},{"x":1963,"y":60.08},{"x":1964,"y":89.51},{"x":1965,"y":35.52},{"x":1966,"y":57.77},{"x":1967,"y":4.86},{"x":1968,"y":2.75},{"x":1969,"y":2.6},{"x":1970,"y":34.61},{"x":1971,"y":13.6},{"x":1972,"y":0.27},{"x":1973,"y":0.32},{"x":1974,"y":0.57},{"x":1975,"y":1.54},{"x":1976,"y":19.9},{"x":1977,"y":8.48},{"x":1978,"y":1.23},{"x":1979,"y":0.38},{"x":1980,"y":1.98},{"x":1981,"y":0.11},{"x":1982,"y":0.1},{"x":1983,"y":0.17},{"x":1984,"y":0.3},{"x":1985,"y":2.53},{"x":1986,"y":0.76},{"x":1987,"y":0.22},{"x":1988,"y":0.3},{"x":1989,"y":2.48},{"x":1990,"y":4.24},{"x":1991,"y":3.66},{"x":1992,"y":0.22},{"x":1993,"y":0.02},{"x":1994,"y":0.1},{"x":1995,"y":null},{"x":1996,"y":0.08},{"x":1997,"y":0.5},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":0.06},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Massachusetts","data":[{"x":1928,"y":981.06},{"x":1929,"y":351.42},{"x":1930,"y":630.29},{"x":1931,"y":386.78},{"x":1932,"y":463.19},{"x":1933,"y":351.86},{"x":1934,"y":1039.49},{"x":1935,"y":286.73},{"x":1936,"y":613.81},{"x":1937,"y":478.32},{"x":1938,"y":229.97},{"x":1939,"y":546.19},{"x":1940,"y":498.72},{"x":1941,"y":474.01},{"x":1942,"y":564.89},{"x":1943,"y":752.17},{"x":1944,"y":433.38},{"x":1945,"y":186.66},{"x":1946,"y":798.36},{"x":1947,"y":252.7},{"x":1948,"y":675},{"x":1949,"y":556.88},{"x":1950,"y":264.72},{"x":1951,"y":311.54},{"x":1952,"y":940.07},{"x":1953,"y":68.28},{"x":1954,"y":475.05},{"x":1955,"y":957.5},{"x":1956,"y":72},{"x":1957,"y":222.05},{"x":1958,"y":714.96},{"x":1959,"y":123.22},{"x":1960,"y":420.58},{"x":1961,"y":416.44},{"x":1962,"y":511.33},{"x":1963,"y":84.1},{"x":1964,"y":135.92},{"x":1965,"y":354.49},{"x":1966,"y":15.02},{"x":1967,"y":7.47},{"x":1968,"y":9.84},{"x":1969,"y":6.59},{"x":1970,"y":15.75},{"x":1971,"y":8.07},{"x":1972,"y":21.96},{"x":1973,"y":69.12},{"x":1974,"y":7.08},{"x":1975,"y":2.69},{"x":1976,"y":0.74},{"x":1977,"y":12.3},{"x":1978,"y":5.45},{"x":1979,"y":0.49},{"x":1980,"y":0.98},{"x":1981,"y":1.05},{"x":1982,"y":0.1},{"x":1983,"y":0.15},{"x":1984,"y":1.46},{"x":1985,"y":1.37},{"x":1986,"y":0.63},{"x":1987,"y":1.09},{"x":1988,"y":0.09},{"x":1989,"y":1.79},{"x":1990,"y":0.54},{"x":1991,"y":0.72},{"x":1992,"y":0.35},{"x":1993,"y":0.31},{"x":1994,"y":0.12},{"x":1995,"y":0.08},{"x":1996,"y":0.2},{"x":1997,"y":0.88},{"x":1998,"y":0.02},{"x":1999,"y":0.04},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Michigan","data":[{"x":1928,"y":547.55},{"x":1929,"y":376.46},{"x":1930,"y":583.62},{"x":1931,"y":133.48},{"x":1932,"y":881.09},{"x":1933,"y":462.14},{"x":1934,"y":132.48},{"x":1935,"y":1600.88},{"x":1936,"y":47.72},{"x":1937,"y":115.59},{"x":1938,"y":1505.5},{"x":1939,"y":328.17},{"x":1940,"y":299.7},{"x":1941,"y":1119.5},{"x":1942,"y":168.35},{"x":1943,"y":765.18},{"x":1944,"y":466.94},{"x":1945,"y":121.24},{"x":1946,"y":627.93},{"x":1947,"y":148.06},{"x":1948,"y":561.07},{"x":1949,"y":312.1},{"x":1950,"y":575.29},{"x":1951,"y":221.85},{"x":1952,"y":407.49},{"x":1953,"y":322.98},{"x":1954,"y":568.61},{"x":1955,"y":309.13},{"x":1956,"y":540.14},{"x":1957,"y":234.85},{"x":1958,"y":530.38},{"x":1959,"y":147.69},{"x":1960,"y":451.59},{"x":1961,"y":349.41},{"x":1962,"y":318.95},{"x":1963,"y":516.65},{"x":1964,"y":354.48},{"x":1965,"y":336.98},{"x":1966,"y":176.04},{"x":1967,"y":13.3},{"x":1968,"y":4.03},{"x":1969,"y":4.46},{"x":1970,"y":20.28},{"x":1971,"y":28.89},{"x":1972,"y":25.72},{"x":1973,"y":46.65},{"x":1974,"y":25.06},{"x":1975,"y":35.27},{"x":1976,"y":65.64},{"x":1977,"y":13.5},{"x":1978,"y":82.22},{"x":1979,"y":9.43},{"x":1980,"y":3.02},{"x":1981,"y":0.35},{"x":1982,"y":0.6},{"x":1983,"y":0.03},{"x":1984,"y":3.3},{"x":1985,"y":0.75},{"x":1986,"y":1.16},{"x":1987,"y":0.3},{"x":1988,"y":0.32},{"x":1989,"y":4.23},{"x":1990,"y":4.04},{"x":1991,"y":0.36},{"x":1992,"y":0.14},{"x":1993,"y":0.07},{"x":1994,"y":0.15},{"x":1995,"y":0.04},{"x":1996,"y":0.02},{"x":1997,"y":0.08},{"x":1998,"y":0.09},{"x":1999,"y":null},{"x":2000,"y":0.02},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Minnesota","data":[{"x":1928,"y":79.13},{"x":1929,"y":492.36},{"x":1930,"y":218.99},{"x":1931,"y":123.53},{"x":1932,"y":95.11},{"x":1933,"y":752.33},{"x":1934,"y":313.6},{"x":1935,"y":1062},{"x":1936,"y":283.03},{"x":1937,"y":25.12},{"x":1938,"y":256.2},{"x":1939,"y":655.68},{"x":1940,"y":300.31},{"x":1941,"y":35.34},{"x":1942,"y":567.73},{"x":1943,"y":398.01},{"x":1944,"y":770.53},{"x":1945,"y":62.96},{"x":1946,"y":44.79},{"x":1947,"y":319.35},{"x":1948,"y":286.3},{"x":1949,"y":114.47},{"x":1950,"y":125.16},{"x":1951,"y":93.36},{"x":1952,"y":96.98},{"x":1953,"y":136.22},{"x":1954,"y":92.93},{"x":1955,"y":225.27},{"x":1956,"y":40.74},{"x":1957,"y":229.33},{"x":1958,"y":37.83},{"x":1959,"y":80.06},{"x":1960,"y":126.3},{"x":1961,"y":20.6},{"x":1962,"y":47.43},{"x":1963,"y":76.78},{"x":1964,"y":9.73},{"x":1965,"y":26.46},{"x":1966,"y":46.56},{"x":1967,"y":3.76},{"x":1968,"y":0.52},{"x":1969,"y":0.75},{"x":1970,"y":1.29},{"x":1971,"y":2.06},{"x":1972,"y":0.73},{"x":1973,"y":0.65},{"x":1974,"y":2.21},{"x":1975,"y":5.83},{"x":1976,"y":10.83},{"x":1977,"y":68.06},{"x":1978,"y":2.09},{"x":1979,"y":29.85},{"x":1980,"y":26.87},{"x":1981,"y":0.17},{"x":1982,"y":null},{"x":1983,"y":null},{"x":1984,"y":1.08},{"x":1985,"y":null},{"x":1986,"y":0.84},{"x":1987,"y":0.65},{"x":1988,"y":0.48},{"x":1989,"y":0.16},{"x":1990,"y":9.21},{"x":1991,"y":0.63},{"x":1992,"y":0.2},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":0.37},{"x":1997,"y":0.35},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":0.02},{"x":2001,"y":0.04},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Mississippi","data":[{"x":1928,"y":null},{"x":1929,"y":null},{"x":1930,"y":null},{"x":1931,"y":null},{"x":1932,"y":null},{"x":1933,"y":null},{"x":1934,"y":null},{"x":1935,"y":null},{"x":1936,"y":null},{"x":1937,"y":null},{"x":1938,"y":null},{"x":1939,"y":null},{"x":1940,"y":null},{"x":1941,"y":null},{"x":1942,"y":null},{"x":1943,"y":null},{"x":1944,"y":null},{"x":1945,"y":null},{"x":1946,"y":null},{"x":1947,"y":14.96},{"x":1948,"y":58.26},{"x":1949,"y":106.74},{"x":1950,"y":99.49},{"x":1951,"y":91.25},{"x":1952,"y":64.62},{"x":1953,"y":115.46},{"x":1954,"y":145.94},{"x":1955,"y":72.75},{"x":1956,"y":107.81},{"x":1957,"y":61.45},{"x":1958,"y":67.5},{"x":1959,"y":66.43},{"x":1960,"y":76.35},{"x":1961,"y":68.9},{"x":1962,"y":119.04},{"x":1963,"y":29.85},{"x":1964,"y":261.46},{"x":1965,"y":51.15},{"x":1966,"y":56.99},{"x":1967,"y":30.34},{"x":1968,"y":10.91},{"x":1969,"y":1.1},{"x":1970,"y":6.07},{"x":1971,"y":66.8},{"x":1972,"y":9.05},{"x":1973,"y":2.71},{"x":1974,"y":0.61},{"x":1975,"y":1.47},{"x":1976,"y":0.73},{"x":1977,"y":2.08},{"x":1978,"y":31.21},{"x":1979,"y":1.08},{"x":1980,"y":3.91},{"x":1981,"y":null},{"x":1982,"y":0.16},{"x":1983,"y":0.08},{"x":1984,"y":null},{"x":1985,"y":0.04},{"x":1986,"y":0.4},{"x":1987,"y":0.16},{"x":1988,"y":1.27},{"x":1989,"y":0.04},{"x":1990,"y":0.5},{"x":1991,"y":null},{"x":1992,"y":0.04},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":0.14},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Missouri","data":[{"x":1928,"y":198.63},{"x":1929,"y":183.46},{"x":1930,"y":149.81},{"x":1931,"y":369.77},{"x":1932,"y":43.16},{"x":1933,"y":152.96},{"x":1934,"y":539.48},{"x":1935,"y":345.19},{"x":1936,"y":17.37},{"x":1937,"y":186.45},{"x":1938,"y":525.47},{"x":1939,"y":76.61},{"x":1940,"y":15.55},{"x":1941,"y":175.17},{"x":1942,"y":178.71},{"x":1943,"y":196.08},{"x":1944,"y":155.96},{"x":1945,"y":30.22},{"x":1946,"y":166.93},{"x":1947,"y":33.55},{"x":1948,"y":150.17},{"x":1949,"y":203.8},{"x":1950,"y":58.02},{"x":1951,"y":188.53},{"x":1952,"y":60.99},{"x":1953,"y":218.84},{"x":1954,"y":37.88},{"x":1955,"y":96.52},{"x":1956,"y":124.88},{"x":1957,"y":102.2},{"x":1958,"y":82.41},{"x":1959,"y":84.71},{"x":1960,"y":17.35},{"x":1961,"y":102.09},{"x":1962,"y":31.73},{"x":1963,"y":64.05},{"x":1964,"y":24.26},{"x":1965,"y":60.2},{"x":1966,"y":12.54},{"x":1967,"y":7.47},{"x":1968,"y":0.69},{"x":1969,"y":1.57},{"x":1970,"y":16.45},{"x":1971,"y":42.81},{"x":1972,"y":3.7},{"x":1973,"y":1.15},{"x":1974,"y":5.49},{"x":1975,"y":5.41},{"x":1976,"y":4.8},{"x":1977,"y":18.57},{"x":1978,"y":3.53},{"x":1979,"y":9.72},{"x":1980,"y":1},{"x":1981,"y":0.02},{"x":1982,"y":0.04},{"x":1983,"y":0.04},{"x":1984,"y":0.12},{"x":1985,"y":0.02},{"x":1986,"y":0.62},{"x":1987,"y":3.76},{"x":1988,"y":0.41},{"x":1989,"y":9.97},{"x":1990,"y":1.04},{"x":1991,"y":null},{"x":1992,"y":0.02},{"x":1993,"y":null},{"x":1994,"y":0.81},{"x":1995,"y":null},{"x":1996,"y":0.04},{"x":1997,"y":0.06},{"x":1998,"y":null},{"x":1999,"y":0.02},{"x":2000,"y":null},{"x":2001,"y":0.02},{"x":2002,"y":0.02},{"x":2003,"y":null}]},{"name":"Montana","data":[{"x":1928,"y":139.86},{"x":1929,"y":817.76},{"x":1930,"y":117.52},{"x":1931,"y":284.85},{"x":1932,"y":1007.97},{"x":1933,"y":419.57},{"x":1934,"y":355.92},{"x":1935,"y":1422.57},{"x":1936,"y":81.57},{"x":1937,"y":111.71},{"x":1938,"y":1119.76},{"x":1939,"y":1973.32},{"x":1940,"y":476.48},{"x":1941,"y":161.21},{"x":1942,"y":588.48},{"x":1943,"y":1122.06},{"x":1944,"y":720.79},{"x":1945,"y":175.29},{"x":1946,"y":422.65},{"x":1947,"y":843.36},{"x":1948,"y":341.6},{"x":1949,"y":676.12},{"x":1950,"y":300.15},{"x":1951,"y":416.62},{"x":1952,"y":643.92},{"x":1953,"y":505.27},{"x":1954,"y":749.98},{"x":1955,"y":449.82},{"x":1956,"y":1016.61},{"x":1957,"y":528.64},{"x":1958,"y":1065.44},{"x":1959,"y":625.59},{"x":1960,"y":313.99},{"x":1961,"y":326.15},{"x":1962,"y":1181.36},{"x":1963,"y":482.41},{"x":1964,"y":579.59},{"x":1965,"y":556.37},{"x":1966,"y":272.69},{"x":1967,"y":48.96},{"x":1968,"y":9.69},{"x":1969,"y":17.13},{"x":1970,"y":16.01},{"x":1971,"y":112.98},{"x":1972,"y":2.35},{"x":1973,"y":48.63},{"x":1974,"y":46.2},{"x":1975,"y":6.98},{"x":1976,"y":65.89},{"x":1977,"y":119.65},{"x":1978,"y":13.86},{"x":1979,"y":7.87},{"x":1980,"y":0.26},{"x":1981,"y":null},{"x":1982,"y":null},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":20.52},{"x":1986,"y":0.24},{"x":1987,"y":17.11},{"x":1988,"y":9.66},{"x":1989,"y":1.63},{"x":1990,"y":null},{"x":1991,"y":null},{"x":1992,"y":null},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":null},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Nebraska","data":[{"x":1928,"y":78.95},{"x":1929,"y":303.03},{"x":1930,"y":745.32},{"x":1931,"y":24.91},{"x":1932,"y":31.61},{"x":1933,"y":117.35},{"x":1934,"y":331.03},{"x":1935,"y":639.7},{"x":1936,"y":86.34},{"x":1937,"y":34.46},{"x":1938,"y":209.06},{"x":1939,"y":276.01},{"x":1940,"y":129.04},{"x":1941,"y":34.6},{"x":1942,"y":428.55},{"x":1943,"y":401.02},{"x":1944,"y":186.13},{"x":1945,"y":71.57},{"x":1946,"y":395.65},{"x":1947,"y":37.4},{"x":1948,"y":263.28},{"x":1949,"y":207.99},{"x":1950,"y":275.32},{"x":1951,"y":41.75},{"x":1952,"y":214.03},{"x":1953,"y":183.75},{"x":1954,"y":191.6},{"x":1955,"y":12.07},{"x":1956,"y":178.58},{"x":1957,"y":16.79},{"x":1958,"y":108.79},{"x":1959,"y":29.32},{"x":1960,"y":14.81},{"x":1961,"y":44.19},{"x":1962,"y":8.13},{"x":1963,"y":15.86},{"x":1964,"y":54.63},{"x":1965,"y":31.99},{"x":1966,"y":11.64},{"x":1967,"y":36.53},{"x":1968,"y":4.59},{"x":1969,"y":44.87},{"x":1970,"y":52.32},{"x":1971,"y":4.88},{"x":1972,"y":1.61},{"x":1973,"y":0.37},{"x":1974,"y":6.08},{"x":1975,"y":25.54},{"x":1976,"y":3.52},{"x":1977,"y":13.69},{"x":1978,"y":0.51},{"x":1979,"y":4.26},{"x":1980,"y":4.93},{"x":1981,"y":0.25},{"x":1982,"y":0.19},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":null},{"x":1986,"y":null},{"x":1987,"y":null},{"x":1988,"y":null},{"x":1989,"y":6.65},{"x":1990,"y":5},{"x":1991,"y":null},{"x":1992,"y":null},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":0.06},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Nevada","data":[{"x":1928,"y":null},{"x":1929,"y":null},{"x":1930,"y":null},{"x":1931,"y":null},{"x":1932,"y":null},{"x":1933,"y":null},{"x":1934,"y":null},{"x":1935,"y":null},{"x":1936,"y":null},{"x":1937,"y":null},{"x":1938,"y":null},{"x":1939,"y":null},{"x":1940,"y":null},{"x":1941,"y":275.84},{"x":1942,"y":811.69},{"x":1943,"y":397.32},{"x":1944,"y":244.43},{"x":1945,"y":71.8},{"x":1946,"y":125.9},{"x":1947,"y":18.45},{"x":1948,"y":38.12},{"x":1949,"y":60.53},{"x":1950,"y":67.9},{"x":1951,"y":171.48},{"x":1952,"y":285.31},{"x":1953,"y":102.3},{"x":1954,"y":182.19},{"x":1955,"y":165.37},{"x":1956,"y":55.2},{"x":1957,"y":592.31},{"x":1958,"y":73.6},{"x":1959,"y":220.09},{"x":1960,"y":262.89},{"x":1961,"y":197.74},{"x":1962,"y":191.47},{"x":1963,"y":67.74},{"x":1964,"y":233.77},{"x":1965,"y":50.71},{"x":1966,"y":14.34},{"x":1967,"y":59.9},{"x":1968,"y":1.74},{"x":1969,"y":0.21},{"x":1970,"y":4.03},{"x":1971,"y":1.28},{"x":1972,"y":0.18},{"x":1973,"y":0.17},{"x":1974,"y":26.76},{"x":1975,"y":4.3},{"x":1976,"y":12.4},{"x":1977,"y":10.87},{"x":1978,"y":2.6},{"x":1979,"y":2.61},{"x":1980,"y":1.43},{"x":1981,"y":1.58},{"x":1982,"y":null},{"x":1983,"y":0.22},{"x":1984,"y":null},{"x":1985,"y":null},{"x":1986,"y":0.3},{"x":1987,"y":0.19},{"x":1988,"y":null},{"x":1989,"y":0.99},{"x":1990,"y":17.71},{"x":1991,"y":1.47},{"x":1992,"y":0.07},{"x":1993,"y":0.07},{"x":1994,"y":null},{"x":1995,"y":0.06},{"x":1996,"y":0.24},{"x":1997,"y":0.06},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":0.35},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"New Hampshire","data":[{"x":1928,"y":272.15},{"x":1929,"y":344.53},{"x":1930,"y":126.38},{"x":1931,"y":299.15},{"x":1932,"y":151.26},{"x":1933,"y":218.48},{"x":1934,"y":846.7},{"x":1935,"y":55.13},{"x":1936,"y":185.39},{"x":1937,"y":393.13},{"x":1938,"y":341.34},{"x":1939,"y":133.99},{"x":1940,"y":147.66},{"x":1941,"y":201.98},{"x":1942,"y":167.14},{"x":1943,"y":211.18},{"x":1944,"y":126.01},{"x":1945,"y":33.9},{"x":1946,"y":226.71},{"x":1947,"y":61.04},{"x":1948,"y":77.54},{"x":1949,"y":230.6},{"x":1950,"y":34.4},{"x":1951,"y":196.44},{"x":1952,"y":447.27},{"x":1953,"y":50.71},{"x":1954,"y":168.21},{"x":1955,"y":831.44},{"x":1956,"y":35.34},{"x":1957,"y":69.01},{"x":1958,"y":368.01},{"x":1959,"y":76.52},{"x":1960,"y":186.36},{"x":1961,"y":234.64},{"x":1962,"y":163.62},{"x":1963,"y":6.44},{"x":1964,"y":134.65},{"x":1965,"y":55.03},{"x":1966,"y":11.59},{"x":1967,"y":3.86},{"x":1968,"y":21.01},{"x":1969,"y":27.1},{"x":1970,"y":8.4},{"x":1971,"y":26.65},{"x":1972,"y":98.96},{"x":1973,"y":90.34},{"x":1974,"y":20.26},{"x":1975,"y":2.39},{"x":1976,"y":1.13},{"x":1977,"y":29.05},{"x":1978,"y":7.15},{"x":1979,"y":3.18},{"x":1980,"y":26.69},{"x":1981,"y":0.98},{"x":1982,"y":0.5},{"x":1983,"y":null},{"x":1984,"y":3.3},{"x":1985,"y":null},{"x":1986,"y":2.62},{"x":1987,"y":16.24},{"x":1988,"y":10.23},{"x":1989,"y":1.44},{"x":1990,"y":null},{"x":1991,"y":null},{"x":1992,"y":1.44},{"x":1993,"y":0.18},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":1.93},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":0.24},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"New Jersey","data":[{"x":1928,"y":797.14},{"x":1929,"y":181.86},{"x":1930,"y":602.87},{"x":1931,"y":494.19},{"x":1932,"y":373.96},{"x":1933,"y":726.94},{"x":1934,"y":359.92},{"x":1935,"y":792.91},{"x":1936,"y":215.06},{"x":1937,"y":1108.94},{"x":1938,"y":716.98},{"x":1939,"y":104.83},{"x":1940,"y":301.99},{"x":1941,"y":1044.54},{"x":1942,"y":322.1},{"x":1943,"y":927.14},{"x":1944,"y":658.66},{"x":1945,"y":78.87},{"x":1946,"y":1151.75},{"x":1947,"y":250.71},{"x":1948,"y":715.45},{"x":1949,"y":705.08},{"x":1950,"y":601.68},{"x":1951,"y":395.01},{"x":1952,"y":1282.7},{"x":1953,"y":81.21},{"x":1954,"y":445.79},{"x":1955,"y":937.1},{"x":1956,"y":340.37},{"x":1957,"y":458.1},{"x":1958,"y":429.08},{"x":1959,"y":502.21},{"x":1960,"y":175.27},{"x":1961,"y":293.59},{"x":1962,"y":510.19},{"x":1963,"y":160.62},{"x":1964,"y":176.38},{"x":1965,"y":61.18},{"x":1966,"y":29.39},{"x":1967,"y":8.8},{"x":1968,"y":9.74},{"x":1969,"y":13.46},{"x":1970,"y":23.46},{"x":1971,"y":17.39},{"x":1972,"y":5.64},{"x":1973,"y":10.1},{"x":1974,"y":75.03},{"x":1975,"y":6.48},{"x":1976,"y":8.56},{"x":1977,"y":2.67},{"x":1978,"y":1.01},{"x":1979,"y":0.66},{"x":1980,"y":8.92},{"x":1981,"y":0.77},{"x":1982,"y":0.08},{"x":1983,"y":0.36},{"x":1984,"y":0.07},{"x":1985,"y":0.31},{"x":1986,"y":11.6},{"x":1987,"y":0.5},{"x":1988,"y":4.25},{"x":1989,"y":5.28},{"x":1990,"y":2.47},{"x":1991,"y":13.05},{"x":1992,"y":0.4},{"x":1993,"y":0.06},{"x":1994,"y":1.68},{"x":1995,"y":0.04},{"x":1996,"y":null},{"x":1997,"y":0.02},{"x":1998,"y":0.08},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":0.01},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"New Mexico","data":[{"x":1928,"y":663.41},{"x":1929,"y":54.78},{"x":1930,"y":529.23},{"x":1931,"y":324.57},{"x":1932,"y":271.9},{"x":1933,"y":148.8},{"x":1934,"y":731.9},{"x":1935,"y":147.97},{"x":1936,"y":234.94},{"x":1937,"y":487.27},{"x":1938,"y":628.89},{"x":1939,"y":316.1},{"x":1940,"y":216.63},{"x":1941,"y":778.1},{"x":1942,"y":315.64},{"x":1943,"y":105.71},{"x":1944,"y":303.73},{"x":1945,"y":67.9},{"x":1946,"y":215.41},{"x":1947,"y":226.78},{"x":1948,"y":174.64},{"x":1949,"y":671.44},{"x":1950,"y":136.02},{"x":1951,"y":297.51},{"x":1952,"y":210.63},{"x":1953,"y":662.89},{"x":1954,"y":355.99},{"x":1955,"y":621.75},{"x":1956,"y":495.32},{"x":1957,"y":747.33},{"x":1958,"y":912.17},{"x":1959,"y":484.03},{"x":1960,"y":6.81},{"x":1961,"y":2.07},{"x":1962,"y":null},{"x":1963,"y":null},{"x":1964,"y":111.15},{"x":1965,"y":68.59},{"x":1966,"y":126.32},{"x":1967,"y":61.2},{"x":1968,"y":17.64},{"x":1969,"y":28.3},{"x":1970,"y":28.59},{"x":1971,"y":37.27},{"x":1972,"y":12.07},{"x":1973,"y":14.03},{"x":1974,"y":5.35},{"x":1975,"y":9.07},{"x":1976,"y":1.3},{"x":1977,"y":1.92},{"x":1978,"y":null},{"x":1979,"y":3.15},{"x":1980,"y":0.99},{"x":1981,"y":1.1},{"x":1982,"y":null},{"x":1983,"y":null},{"x":1984,"y":5.09},{"x":1985,"y":0.28},{"x":1986,"y":2.6},{"x":1987,"y":10.55},{"x":1988,"y":null},{"x":1989,"y":1.4},{"x":1990,"y":6.66},{"x":1991,"y":4.92},{"x":1992,"y":0.06},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":1.82},{"x":1996,"y":0.96},{"x":1997,"y":0.4},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"New York","data":[{"x":1928,"y":649.97},{"x":1929,"y":249.09},{"x":1930,"y":315.39},{"x":1931,"y":423.22},{"x":1932,"y":465.06},{"x":1933,"y":549},{"x":1934,"y":258.13},{"x":1935,"y":516.43},{"x":1936,"y":477.48},{"x":1937,"y":202.81},{"x":1938,"y":518.84},{"x":1939,"y":331.36},{"x":1940,"y":212.23},{"x":1941,"y":789.51},{"x":1942,"y":191.24},{"x":1943,"y":478.18},{"x":1944,"y":334.85},{"x":1945,"y":52.41},{"x":1946,"y":600.82},{"x":1947,"y":108},{"x":1948,"y":330.91},{"x":1949,"y":353.09},{"x":1950,"y":201.33},{"x":1951,"y":240.63},{"x":1952,"y":500.59},{"x":1953,"y":74.14},{"x":1954,"y":548.37},{"x":1955,"y":241.44},{"x":1956,"y":308.53},{"x":1957,"y":233.63},{"x":1958,"y":364.15},{"x":1959,"y":140.21},{"x":1960,"y":277.27},{"x":1961,"y":207.29},{"x":1962,"y":273},{"x":1963,"y":107.71},{"x":1964,"y":156.92},{"x":1965,"y":52.37},{"x":1966,"y":61.06},{"x":1967,"y":6.68},{"x":1968,"y":21.07},{"x":1969,"y":30.48},{"x":1970,"y":8.57},{"x":1971,"y":23.92},{"x":1972,"y":3.61},{"x":1973,"y":9.79},{"x":1974,"y":7.83},{"x":1975,"y":6.83},{"x":1976,"y":17.38},{"x":1977,"y":26.19},{"x":1978,"y":10.44},{"x":1979,"y":8.94},{"x":1980,"y":11.01},{"x":1981,"y":1.97},{"x":1982,"y":1.09},{"x":1983,"y":0.21},{"x":1984,"y":0.84},{"x":1985,"y":0.92},{"x":1986,"y":5.31},{"x":1987,"y":2.47},{"x":1988,"y":0.54},{"x":1989,"y":1.63},{"x":1990,"y":4.48},{"x":1991,"y":7.8},{"x":1992,"y":0.62},{"x":1993,"y":null},{"x":1994,"y":0.34},{"x":1995,"y":0.02},{"x":1996,"y":null},{"x":1997,"y":0.14},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":0.02},{"x":2001,"y":null},{"x":2002,"y":0.01},{"x":2003,"y":null}]},{"name":"North Carolina","data":[{"x":1928,"y":1823.69},{"x":1929,"y":38.49},{"x":1930,"y":41.17},{"x":1931,"y":480.48},{"x":1932,"y":423.04},{"x":1933,"y":495.59},{"x":1934,"y":1685.34},{"x":1935,"y":323.87},{"x":1936,"y":40.3},{"x":1937,"y":226.07},{"x":1938,"y":1383.37},{"x":1939,"y":664.5},{"x":1940,"y":210.27},{"x":1941,"y":658.4},{"x":1942,"y":564.86},{"x":1943,"y":165.96},{"x":1944,"y":671.48},{"x":1945,"y":72.5},{"x":1946,"y":225.16},{"x":1947,"y":127.63},{"x":1948,"y":26.97},{"x":1949,"y":442.46},{"x":1950,"y":118.87},{"x":1951,"y":81.37},{"x":1952,"y":93.5},{"x":1953,"y":115.47},{"x":1954,"y":229.32},{"x":1955,"y":29.68},{"x":1956,"y":178.8},{"x":1957,"y":43.64},{"x":1958,"y":93.73},{"x":1959,"y":73.12},{"x":1960,"y":27.06},{"x":1961,"y":110.7},{"x":1962,"y":19.27},{"x":1963,"y":30.53},{"x":1964,"y":26.32},{"x":1965,"y":8.59},{"x":1966,"y":15.88},{"x":1967,"y":19.03},{"x":1968,"y":6.48},{"x":1969,"y":7.46},{"x":1970,"y":19.47},{"x":1971,"y":35.89},{"x":1972,"y":0.71},{"x":1973,"y":0.12},{"x":1974,"y":0.12},{"x":1975,"y":0.06},{"x":1976,"y":0.35},{"x":1977,"y":0.93},{"x":1978,"y":2.15},{"x":1979,"y":1.97},{"x":1980,"y":2.21},{"x":1981,"y":0.1},{"x":1982,"y":0.04},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":0.14},{"x":1986,"y":0.07},{"x":1987,"y":0.23},{"x":1988,"y":0.03},{"x":1989,"y":2.99},{"x":1990,"y":0.71},{"x":1991,"y":0.64},{"x":1992,"y":0.36},{"x":1993,"y":null},{"x":1994,"y":0.04},{"x":1995,"y":null},{"x":1996,"y":0.05},{"x":1997,"y":0.02},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"North Dakota","data":[{"x":1928,"y":55.73},{"x":1929,"y":339.19},{"x":1930,"y":117},{"x":1931,"y":142.06},{"x":1932,"y":318.07},{"x":1933,"y":373.64},{"x":1934,"y":657.63},{"x":1935,"y":290.45},{"x":1936,"y":16.52},{"x":1937,"y":8.4},{"x":1938,"y":863.45},{"x":1939,"y":843.21},{"x":1940,"y":149.05},{"x":1941,"y":223.2},{"x":1942,"y":274.08},{"x":1943,"y":798.53},{"x":1944,"y":644.36},{"x":1945,"y":64.11},{"x":1946,"y":40.84},{"x":1947,"y":236.08},{"x":1948,"y":214.45},{"x":1949,"y":245.95},{"x":1950,"y":63.62},{"x":1951,"y":426.98},{"x":1952,"y":432.14},{"x":1953,"y":254.43},{"x":1954,"y":454.18},{"x":1955,"y":407.81},{"x":1956,"y":362.47},{"x":1957,"y":629.25},{"x":1958,"y":714.58},{"x":1959,"y":899.54},{"x":1960,"y":390.56},{"x":1961,"y":439},{"x":1962,"y":583.22},{"x":1963,"y":677.98},{"x":1964,"y":813.23},{"x":1965,"y":623.26},{"x":1966,"y":212.64},{"x":1967,"y":143.16},{"x":1968,"y":22.83},{"x":1969,"y":13.03},{"x":1970,"y":51.25},{"x":1971,"y":36.17},{"x":1972,"y":9.49},{"x":1973,"y":11.22},{"x":1974,"y":5.82},{"x":1975,"y":131.87},{"x":1976,"y":0.46},{"x":1977,"y":4.74},{"x":1978,"y":27.44},{"x":1979,"y":2.6},{"x":1980,"y":null},{"x":1981,"y":null},{"x":1982,"y":null},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":0.15},{"x":1986,"y":3.17},{"x":1987,"y":null},{"x":1988,"y":null},{"x":1989,"y":null},{"x":1990,"y":null},{"x":1991,"y":null},{"x":1992,"y":null},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":0.15},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Ohio","data":[{"x":1928,"y":355.92},{"x":1929,"y":561.14},{"x":1930,"y":277.6},{"x":1931,"y":291.32},{"x":1932,"y":539.34},{"x":1933,"y":233.67},{"x":1934,"y":410.5},{"x":1935,"y":544.79},{"x":1936,"y":136.53},{"x":1937,"y":366.37},{"x":1938,"y":694.27},{"x":1939,"y":74},{"x":1940,"y":22.4},{"x":1941,"y":1132.77},{"x":1942,"y":127.08},{"x":1943,"y":276.41},{"x":1944,"y":557.93},{"x":1945,"y":49.82},{"x":1946,"y":200.43},{"x":1947,"y":239.45},{"x":1948,"y":282.32},{"x":1949,"y":268.29},{"x":1950,"y":161.84},{"x":1951,"y":295.76},{"x":1952,"y":248},{"x":1953,"y":314.96},{"x":1954,"y":322.29},{"x":1955,"y":170.31},{"x":1956,"y":477.29},{"x":1957,"y":86.94},{"x":1958,"y":312.78},{"x":1959,"y":124.39},{"x":1960,"y":191.15},{"x":1961,"y":208.73},{"x":1962,"y":118.46},{"x":1963,"y":146.63},{"x":1964,"y":191.15},{"x":1965,"y":90.96},{"x":1966,"y":63.04},{"x":1967,"y":11.74},{"x":1968,"y":3.25},{"x":1969,"y":5.38},{"x":1970,"y":37.7},{"x":1971,"y":37.07},{"x":1972,"y":2.82},{"x":1973,"y":3.77},{"x":1974,"y":27.44},{"x":1975,"y":1.1},{"x":1976,"y":6.76},{"x":1977,"y":17.29},{"x":1978,"y":4.67},{"x":1979,"y":3.02},{"x":1980,"y":3.54},{"x":1981,"y":0.2},{"x":1982,"y":0.03},{"x":1983,"y":0.83},{"x":1984,"y":0.1},{"x":1985,"y":null},{"x":1986,"y":null},{"x":1987,"y":0.01},{"x":1988,"y":0.88},{"x":1989,"y":25.09},{"x":1990,"y":5.22},{"x":1991,"y":0.11},{"x":1992,"y":0.05},{"x":1993,"y":0.11},{"x":1994,"y":0.04},{"x":1995,"y":0.02},{"x":1996,"y":0.06},{"x":1997,"y":0.3},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":0.03},{"x":2001,"y":0.01},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Oklahoma","data":[{"x":1928,"y":268.71},{"x":1929,"y":46.19},{"x":1930,"y":164.93},{"x":1931,"y":32.17},{"x":1932,"y":43.17},{"x":1933,"y":101.87},{"x":1934,"y":378.08},{"x":1935,"y":102.91},{"x":1936,"y":15.22},{"x":1937,"y":45.62},{"x":1938,"y":116.62},{"x":1939,"y":194.44},{"x":1940,"y":60.4},{"x":1941,"y":88.78},{"x":1942,"y":260.92},{"x":1943,"y":76.06},{"x":1944,"y":166.8},{"x":1945,"y":51.13},{"x":1946,"y":188.97},{"x":1947,"y":10.79},{"x":1948,"y":66.02},{"x":1949,"y":354.07},{"x":1950,"y":27.43},{"x":1951,"y":359.94},{"x":1952,"y":92.03},{"x":1953,"y":173.09},{"x":1954,"y":152.18},{"x":1955,"y":132.27},{"x":1956,"y":440.45},{"x":1957,"y":66.1},{"x":1958,"y":317.88},{"x":1959,"y":29.15},{"x":1960,"y":51.72},{"x":1961,"y":25.07},{"x":1962,"y":86.46},{"x":1963,"y":14.17},{"x":1964,"y":42.41},{"x":1965,"y":9.97},{"x":1966,"y":25.25},{"x":1967,"y":32.35},{"x":1968,"y":4.96},{"x":1969,"y":5.63},{"x":1970,"y":30.63},{"x":1971,"y":25.06},{"x":1972,"y":0.5},{"x":1973,"y":2.46},{"x":1974,"y":1.1},{"x":1975,"y":9.64},{"x":1976,"y":9.99},{"x":1977,"y":1.72},{"x":1978,"y":0.91},{"x":1979,"y":0.85},{"x":1980,"y":22.66},{"x":1981,"y":0.24},{"x":1982,"y":0.99},{"x":1983,"y":0.03},{"x":1984,"y":0.27},{"x":1985,"y":null},{"x":1986,"y":0.99},{"x":1987,"y":0.12},{"x":1988,"y":0.25},{"x":1989,"y":4.03},{"x":1990,"y":5.6},{"x":1991,"y":null},{"x":1992,"y":0.25},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":null},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Oregon","data":[{"x":1928,"y":223.09},{"x":1929,"y":492.32},{"x":1930,"y":276.36},{"x":1931,"y":242.56},{"x":1932,"y":514.2},{"x":1933,"y":230.37},{"x":1934,"y":193.5},{"x":1935,"y":705.43},{"x":1936,"y":919.15},{"x":1937,"y":38.19},{"x":1938,"y":121.89},{"x":1939,"y":219.8},{"x":1940,"y":671.12},{"x":1941,"y":607.51},{"x":1942,"y":499.14},{"x":1943,"y":693.95},{"x":1944,"y":239.87},{"x":1945,"y":156.32},{"x":1946,"y":453.37},{"x":1947,"y":71.91},{"x":1948,"y":367.6},{"x":1949,"y":684.38},{"x":1950,"y":49.38},{"x":1951,"y":617.84},{"x":1952,"y":209.73},{"x":1953,"y":558.14},{"x":1954,"y":244.37},{"x":1955,"y":295.16},{"x":1956,"y":135.02},{"x":1957,"y":879.25},{"x":1958,"y":529.02},{"x":1959,"y":447.57},{"x":1960,"y":624.94},{"x":1961,"y":322.05},{"x":1962,"y":766.23},{"x":1963,"y":258.3},{"x":1964,"y":453.01},{"x":1965,"y":181.74},{"x":1966,"y":126.91},{"x":1967,"y":86.72},{"x":1968,"y":30.7},{"x":1969,"y":9.83},{"x":1970,"y":21.15},{"x":1971,"y":15.97},{"x":1972,"y":8.95},{"x":1973,"y":19.52},{"x":1974,"y":1.03},{"x":1975,"y":8.43},{"x":1976,"y":7.12},{"x":1977,"y":12.77},{"x":1978,"y":20.58},{"x":1979,"y":2.78},{"x":1980,"y":0.08},{"x":1981,"y":0.2},{"x":1982,"y":0.72},{"x":1983,"y":0.4},{"x":1984,"y":null},{"x":1985,"y":0.19},{"x":1986,"y":0.26},{"x":1987,"y":3.01},{"x":1988,"y":1.3},{"x":1989,"y":1.45},{"x":1990,"y":1.35},{"x":1991,"y":2.78},{"x":1992,"y":0.29},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":0.09},{"x":1996,"y":0.33},{"x":1997,"y":0.09},{"x":1998,"y":null},{"x":1999,"y":0.15},{"x":2000,"y":null},{"x":2001,"y":0.18},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Pennsylvania","data":[{"x":1928,"y":583.95},{"x":1929,"y":489.56},{"x":1930,"y":356.56},{"x":1931,"y":821.6},{"x":1932,"y":470.69},{"x":1933,"y":336.38},{"x":1934,"y":848.11},{"x":1935,"y":917.36},{"x":1936,"y":243.53},{"x":1937,"y":390.89},{"x":1938,"y":1329.75},{"x":1939,"y":186.57},{"x":1940,"y":148.62},{"x":1941,"y":1011.32},{"x":1942,"y":380.42},{"x":1943,"y":563.08},{"x":1944,"y":256.56},{"x":1945,"y":127.31},{"x":1946,"y":611.47},{"x":1947,"y":113.41},{"x":1948,"y":306.69},{"x":1949,"y":483.96},{"x":1950,"y":165.44},{"x":1951,"y":299.86},{"x":1952,"y":358.5},{"x":1953,"y":146.18},{"x":1954,"y":351.84},{"x":1955,"y":170.43},{"x":1956,"y":397.95},{"x":1957,"y":117.09},{"x":1958,"y":307.18},{"x":1959,"y":247.52},{"x":1960,"y":59.7},{"x":1961,"y":226.11},{"x":1962,"y":83.08},{"x":1963,"y":106.13},{"x":1964,"y":101.85},{"x":1965,"y":57.21},{"x":1966,"y":47.16},{"x":1967,"y":6.81},{"x":1968,"y":2.54},{"x":1969,"y":10.66},{"x":1970,"y":17.65},{"x":1971,"y":15.63},{"x":1972,"y":0.61},{"x":1973,"y":3.44},{"x":1974,"y":7.74},{"x":1975,"y":4.78},{"x":1976,"y":28.5},{"x":1977,"y":27.09},{"x":1978,"y":2.81},{"x":1979,"y":0.57},{"x":1980,"y":9.49},{"x":1981,"y":4.33},{"x":1982,"y":0.07},{"x":1983,"y":null},{"x":1984,"y":0.04},{"x":1985,"y":0.33},{"x":1986,"y":0.25},{"x":1987,"y":0.26},{"x":1988,"y":4.4},{"x":1989,"y":2},{"x":1990,"y":3.77},{"x":1991,"y":11.72},{"x":1992,"y":0.08},{"x":1993,"y":null},{"x":1994,"y":0.07},{"x":1995,"y":0.01},{"x":1996,"y":0.1},{"x":1997,"y":0.13},{"x":1998,"y":0.03},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":0.05},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Rhode Island","data":[{"x":1928,"y":735.32},{"x":1929,"y":270.62},{"x":1930,"y":39.23},{"x":1931,"y":665.05},{"x":1932,"y":1472.69},{"x":1933,"y":9.36},{"x":1934,"y":65.79},{"x":1935,"y":994.05},{"x":1936,"y":368.69},{"x":1937,"y":679.22},{"x":1938,"y":35.95},{"x":1939,"y":416.85},{"x":1940,"y":467.72},{"x":1941,"y":57.67},{"x":1942,"y":609.25},{"x":1943,"y":296.39},{"x":1944,"y":535.99},{"x":1945,"y":55.54},{"x":1946,"y":160.61},{"x":1947,"y":507.34},{"x":1948,"y":48.43},{"x":1949,"y":561.61},{"x":1950,"y":30.68},{"x":1951,"y":113.3},{"x":1952,"y":665.78},{"x":1953,"y":61.97},{"x":1954,"y":223.67},{"x":1955,"y":657.21},{"x":1956,"y":22.43},{"x":1957,"y":72.67},{"x":1958,"y":496.84},{"x":1959,"y":35.92},{"x":1960,"y":227.84},{"x":1961,"y":766.11},{"x":1962,"y":378.97},{"x":1963,"y":139.6},{"x":1964,"y":279.32},{"x":1965,"y":444.82},{"x":1966,"y":9.75},{"x":1967,"y":6.82},{"x":1968,"y":7.28},{"x":1969,"y":2.9},{"x":1970,"y":11.4},{"x":1971,"y":24.72},{"x":1972,"y":52.25},{"x":1973,"y":68.09},{"x":1974,"y":6.58},{"x":1975,"y":0.54},{"x":1976,"y":2.23},{"x":1977,"y":6.76},{"x":1978,"y":0.85},{"x":1979,"y":10.88},{"x":1980,"y":0.2},{"x":1981,"y":null},{"x":1982,"y":null},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":null},{"x":1986,"y":0.2},{"x":1987,"y":0.2},{"x":1988,"y":null},{"x":1989,"y":3.9},{"x":1990,"y":2.99},{"x":1991,"y":0.4},{"x":1992,"y":2.28},{"x":1993,"y":0.1},{"x":1994,"y":0.7},{"x":1995,"y":0.49},{"x":1996,"y":null},{"x":1997,"y":0.49},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"South Carolina","data":[{"x":1928,"y":1138.49},{"x":1929,"y":12.2},{"x":1930,"y":14.45},{"x":1931,"y":189.95},{"x":1932,"y":182.58},{"x":1933,"y":360.64},{"x":1934,"y":637.61},{"x":1935,"y":46.26},{"x":1936,"y":48.24},{"x":1937,"y":99.18},{"x":1938,"y":373.4},{"x":1939,"y":60.34},{"x":1940,"y":32.32},{"x":1941,"y":481.97},{"x":1942,"y":218.23},{"x":1943,"y":153.66},{"x":1944,"y":363.6},{"x":1945,"y":78.91},{"x":1946,"y":358.19},{"x":1947,"y":161.86},{"x":1948,"y":120.65},{"x":1949,"y":453.08},{"x":1950,"y":90.62},{"x":1951,"y":34.31},{"x":1952,"y":81.69},{"x":1953,"y":89.38},{"x":1954,"y":254.91},{"x":1955,"y":53.33},{"x":1956,"y":384.74},{"x":1957,"y":248.22},{"x":1958,"y":472.18},{"x":1959,"y":82.91},{"x":1960,"y":53.68},{"x":1961,"y":136.63},{"x":1962,"y":38.4},{"x":1963,"y":95.75},{"x":1964,"y":161.62},{"x":1965,"y":50.55},{"x":1966,"y":26.31},{"x":1967,"y":20.44},{"x":1968,"y":1.52},{"x":1969,"y":5.34},{"x":1970,"y":24.01},{"x":1971,"y":32.77},{"x":1972,"y":7.63},{"x":1973,"y":2.86},{"x":1974,"y":1.96},{"x":1975,"y":0.57},{"x":1976,"y":0.15},{"x":1977,"y":3.28},{"x":1978,"y":6.44},{"x":1979,"y":3.35},{"x":1980,"y":5.02},{"x":1981,"y":null},{"x":1982,"y":null},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":0.03},{"x":1986,"y":7.54},{"x":1987,"y":0.06},{"x":1988,"y":null},{"x":1989,"y":0.52},{"x":1990,"y":0.12},{"x":1991,"y":0.37},{"x":1992,"y":0.8},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":0.05},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"South Dakota","data":[{"x":1928,"y":160.16},{"x":1929,"y":167.77},{"x":1930,"y":346.31},{"x":1931,"y":212.36},{"x":1932,"y":96.37},{"x":1933,"y":299.08},{"x":1934,"y":1373.94},{"x":1935,"y":167.25},{"x":1936,"y":33.6},{"x":1937,"y":9.84},{"x":1938,"y":212.46},{"x":1939,"y":1173.78},{"x":1940,"y":253.83},{"x":1941,"y":61.34},{"x":1942,"y":143.09},{"x":1943,"y":507.31},{"x":1944,"y":258.73},{"x":1945,"y":100.63},{"x":1946,"y":189.69},{"x":1947,"y":218.3},{"x":1948,"y":140.26},{"x":1949,"y":157.39},{"x":1950,"y":102.59},{"x":1951,"y":106.72},{"x":1952,"y":115.26},{"x":1953,"y":68.81},{"x":1954,"y":123.53},{"x":1955,"y":63.59},{"x":1956,"y":86.75},{"x":1957,"y":81.49},{"x":1958,"y":18.41},{"x":1959,"y":129.12},{"x":1960,"y":17.59},{"x":1961,"y":21.72},{"x":1962,"y":64.25},{"x":1963,"y":12.53},{"x":1964,"y":9.86},{"x":1965,"y":16.73},{"x":1966,"y":5.87},{"x":1967,"y":8.67},{"x":1968,"y":0.6},{"x":1969,"y":7.64},{"x":1970,"y":15.79},{"x":1971,"y":31.34},{"x":1972,"y":1.78},{"x":1973,"y":0.44},{"x":1974,"y":4.12},{"x":1975,"y":51.88},{"x":1976,"y":0.74},{"x":1977,"y":10.62},{"x":1978,"y":null},{"x":1979,"y":0.28},{"x":1980,"y":null},{"x":1981,"y":null},{"x":1982,"y":null},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":null},{"x":1986,"y":null},{"x":1987,"y":null},{"x":1988,"y":null},{"x":1989,"y":null},{"x":1990,"y":2.29},{"x":1991,"y":null},{"x":1992,"y":null},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":1.2},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Tennessee","data":[{"x":1928,"y":315.43},{"x":1929,"y":33.04},{"x":1930,"y":179.91},{"x":1931,"y":134.79},{"x":1932,"y":68.99},{"x":1933,"y":133.48},{"x":1934,"y":647.85},{"x":1935,"y":51.31},{"x":1936,"y":50.18},{"x":1937,"y":106.41},{"x":1938,"y":403.65},{"x":1939,"y":108.43},{"x":1940,"y":95.17},{"x":1941,"y":278.13},{"x":1942,"y":106.34},{"x":1943,"y":194.95},{"x":1944,"y":184.38},{"x":1945,"y":65.8},{"x":1946,"y":150.47},{"x":1947,"y":61},{"x":1948,"y":127.54},{"x":1949,"y":252.76},{"x":1950,"y":104.1},{"x":1951,"y":80.64},{"x":1952,"y":200.48},{"x":1953,"y":84.73},{"x":1954,"y":416.4},{"x":1955,"y":172.07},{"x":1956,"y":617},{"x":1957,"y":455.99},{"x":1958,"y":793.55},{"x":1959,"y":275.98},{"x":1960,"y":535.9},{"x":1961,"y":403.1},{"x":1962,"y":666.32},{"x":1963,"y":183.55},{"x":1964,"y":629.43},{"x":1965,"y":238.12},{"x":1966,"y":332.74},{"x":1967,"y":53.62},{"x":1968,"y":1.73},{"x":1969,"y":0.53},{"x":1970,"y":13.53},{"x":1971,"y":24.69},{"x":1972,"y":4.66},{"x":1973,"y":3.9},{"x":1974,"y":1.29},{"x":1975,"y":4.09},{"x":1976,"y":4.8},{"x":1977,"y":15.75},{"x":1978,"y":22.26},{"x":1979,"y":1.73},{"x":1980,"y":3.83},{"x":1981,"y":0.08},{"x":1982,"y":0.12},{"x":1983,"y":0.02},{"x":1984,"y":null},{"x":1985,"y":null},{"x":1986,"y":1.2},{"x":1987,"y":null},{"x":1988,"y":0.02},{"x":1989,"y":2.85},{"x":1990,"y":1.93},{"x":1991,"y":0.2},{"x":1992,"y":null},{"x":1993,"y":null},{"x":1994,"y":0.53},{"x":1995,"y":null},{"x":1996,"y":0.04},{"x":1997,"y":0.05},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Texas","data":[{"x":1928,"y":97.35},{"x":1929,"y":71.28},{"x":1930,"y":73.12},{"x":1931,"y":39.56},{"x":1932,"y":76.58},{"x":1933,"y":361.4},{"x":1934,"y":490.66},{"x":1935,"y":64.07},{"x":1936,"y":125.58},{"x":1937,"y":235.14},{"x":1938,"y":95.34},{"x":1939,"y":115.98},{"x":1940,"y":249.88},{"x":1941,"y":308.34},{"x":1942,"y":517.23},{"x":1943,"y":233.42},{"x":1944,"y":542.2},{"x":1945,"y":188.86},{"x":1946,"y":410.13},{"x":1947,"y":109.48},{"x":1948,"y":583.88},{"x":1949,"y":749.48},{"x":1950,"y":175.65},{"x":1951,"y":808.78},{"x":1952,"y":283.26},{"x":1953,"y":885.82},{"x":1954,"y":906.12},{"x":1955,"y":455.73},{"x":1956,"y":755.24},{"x":1957,"y":471.87},{"x":1958,"y":889.53},{"x":1959,"y":360.65},{"x":1960,"y":516.19},{"x":1961,"y":164.07},{"x":1962,"y":665.61},{"x":1963,"y":164.36},{"x":1964,"y":383.18},{"x":1965,"y":284.32},{"x":1966,"y":239.95},{"x":1967,"y":125.32},{"x":1968,"y":47.58},{"x":1969,"y":44.87},{"x":1970,"y":72.35},{"x":1971,"y":77.41},{"x":1972,"y":13.17},{"x":1973,"y":4.06},{"x":1974,"y":1.43},{"x":1975,"y":2.23},{"x":1976,"y":2.04},{"x":1977,"y":13.99},{"x":1978,"y":7.54},{"x":1979,"y":4.54},{"x":1980,"y":1.34},{"x":1981,"y":6.03},{"x":1982,"y":1.15},{"x":1983,"y":0.24},{"x":1984,"y":3.33},{"x":1985,"y":2.56},{"x":1986,"y":2.27},{"x":1987,"y":2.51},{"x":1988,"y":0.09},{"x":1989,"y":18.43},{"x":1990,"y":22.86},{"x":1991,"y":1.23},{"x":1992,"y":5.67},{"x":1993,"y":0.06},{"x":1994,"y":0.1},{"x":1995,"y":0.09},{"x":1996,"y":0.18},{"x":1997,"y":0.07},{"x":1998,"y":null},{"x":1999,"y":0.01},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Utah","data":[{"x":1928,"y":16.83},{"x":1929,"y":68.9},{"x":1930,"y":1044.79},{"x":1931,"y":29.72},{"x":1932,"y":13.91},{"x":1933,"y":402.1},{"x":1934,"y":2184.87},{"x":1935,"y":50.16},{"x":1936,"y":117.89},{"x":1937,"y":396.79},{"x":1938,"y":1808.86},{"x":1939,"y":1002.23},{"x":1940,"y":1363.22},{"x":1941,"y":281.09},{"x":1942,"y":2589.06},{"x":1943,"y":1211.27},{"x":1944,"y":200.67},{"x":1945,"y":746.1},{"x":1946,"y":1244.57},{"x":1947,"y":99.24},{"x":1948,"y":910.94},{"x":1949,"y":526.54},{"x":1950,"y":879.2},{"x":1951,"y":331.4},{"x":1952,"y":652.51},{"x":1953,"y":775.41},{"x":1954,"y":1043.86},{"x":1955,"y":101.05},{"x":1956,"y":284.17},{"x":1957,"y":1749.89},{"x":1958,"y":458.83},{"x":1959,"y":670.89},{"x":1960,"y":551.77},{"x":1961,"y":179.6},{"x":1962,"y":430.57},{"x":1963,"y":316.23},{"x":1964,"y":260.75},{"x":1965,"y":444.86},{"x":1966,"y":68.2},{"x":1967,"y":37.81},{"x":1968,"y":2.04},{"x":1969,"y":1.09},{"x":1970,"y":3.52},{"x":1971,"y":30.04},{"x":1972,"y":13.71},{"x":1973,"y":10.74},{"x":1974,"y":1.21},{"x":1975,"y":27.85},{"x":1976,"y":166.51},{"x":1977,"y":1.75},{"x":1978,"y":3.24},{"x":1979,"y":1.52},{"x":1980,"y":2.98},{"x":1981,"y":null},{"x":1982,"y":0.19},{"x":1983,"y":0.61},{"x":1984,"y":1.69},{"x":1985,"y":null},{"x":1986,"y":0.78},{"x":1987,"y":null},{"x":1988,"y":null},{"x":1989,"y":6.9},{"x":1990,"y":8.5},{"x":1991,"y":12.36},{"x":1992,"y":null},{"x":1993,"y":null},{"x":1994,"y":7.8},{"x":1995,"y":null},{"x":1996,"y":5.77},{"x":1997,"y":0.05},{"x":1998,"y":null},{"x":1999,"y":0.1},{"x":2000,"y":0.13},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Vermont","data":[{"x":1928,"y":334.8},{"x":1929,"y":105.31},{"x":1930,"y":236.69},{"x":1931,"y":318.4},{"x":1932,"y":1146.08},{"x":1933,"y":312.58},{"x":1934,"y":380.66},{"x":1935,"y":389.3},{"x":1936,"y":2974.79},{"x":1937,"y":289.31},{"x":1938,"y":1652.64},{"x":1939,"y":1029.19},{"x":1940,"y":241.07},{"x":1941,"y":384.64},{"x":1942,"y":1071.29},{"x":1943,"y":2323.73},{"x":1944,"y":751.46},{"x":1945,"y":179.96},{"x":1946,"y":858.63},{"x":1947,"y":1348.83},{"x":1948,"y":407.12},{"x":1949,"y":1711.37},{"x":1950,"y":157.47},{"x":1951,"y":1130.93},{"x":1952,"y":1397.32},{"x":1953,"y":148.93},{"x":1954,"y":760.21},{"x":1955,"y":1894.94},{"x":1956,"y":340.86},{"x":1957,"y":761.46},{"x":1958,"y":549.2},{"x":1959,"y":525.59},{"x":1960,"y":893.32},{"x":1961,"y":295.88},{"x":1962,"y":518.32},{"x":1963,"y":405.8},{"x":1964,"y":596.77},{"x":1965,"y":360.66},{"x":1966,"y":79.16},{"x":1967,"y":9.96},{"x":1968,"y":1.85},{"x":1969,"y":0.69},{"x":1970,"y":1.98},{"x":1971,"y":26.6},{"x":1972,"y":17.07},{"x":1973,"y":25.57},{"x":1974,"y":11.88},{"x":1975,"y":15.28},{"x":1976,"y":34.37},{"x":1977,"y":47.16},{"x":1978,"y":10.52},{"x":1979,"y":23.31},{"x":1980,"y":41.88},{"x":1981,"y":0.38},{"x":1982,"y":0.38},{"x":1983,"y":null},{"x":1984,"y":0.76},{"x":1985,"y":null},{"x":1986,"y":null},{"x":1987,"y":3.99},{"x":1988,"y":null},{"x":1989,"y":0.18},{"x":1990,"y":null},{"x":1991,"y":0.71},{"x":1992,"y":null},{"x":1993,"y":5.36},{"x":1994,"y":0.17},{"x":1995,"y":null},{"x":1996,"y":0.17},{"x":1997,"y":9.88},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":0.16},{"x":2001,"y":0.16},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Virginia","data":[{"x":1928,"y":null},{"x":1929,"y":null},{"x":1930,"y":null},{"x":1931,"y":null},{"x":1932,"y":53.4},{"x":1933,"y":351.88},{"x":1934,"y":1158.76},{"x":1935,"y":727.35},{"x":1936,"y":127.83},{"x":1937,"y":337.39},{"x":1938,"y":475.81},{"x":1939,"y":394.24},{"x":1940,"y":203.84},{"x":1941,"y":1035.28},{"x":1942,"y":177.59},{"x":1943,"y":341.34},{"x":1944,"y":475.42},{"x":1945,"y":64.45},{"x":1946,"y":385.83},{"x":1947,"y":242.18},{"x":1948,"y":191.3},{"x":1949,"y":649.31},{"x":1950,"y":85.42},{"x":1951,"y":408.71},{"x":1952,"y":376.52},{"x":1953,"y":138.96},{"x":1954,"y":673.56},{"x":1955,"y":120.1},{"x":1956,"y":634.53},{"x":1957,"y":128.67},{"x":1958,"y":550.15},{"x":1959,"y":349.29},{"x":1960,"y":185.6},{"x":1961,"y":285.95},{"x":1962,"y":231.09},{"x":1963,"y":172.45},{"x":1964,"y":274.81},{"x":1965,"y":93.32},{"x":1966,"y":50.58},{"x":1967,"y":51.99},{"x":1968,"y":9.49},{"x":1969,"y":20.26},{"x":1970,"y":51.91},{"x":1971,"y":32.37},{"x":1972,"y":1.54},{"x":1973,"y":8.74},{"x":1974,"y":0.86},{"x":1975,"y":0.85},{"x":1976,"y":16.49},{"x":1977,"y":50.79},{"x":1978,"y":49.89},{"x":1979,"y":6.01},{"x":1980,"y":6.57},{"x":1981,"y":0.24},{"x":1982,"y":0.15},{"x":1983,"y":0.37},{"x":1984,"y":0.07},{"x":1985,"y":0.47},{"x":1986,"y":0.85},{"x":1987,"y":0.02},{"x":1988,"y":3.48},{"x":1989,"y":0.42},{"x":1990,"y":1.22},{"x":1991,"y":0.36},{"x":1992,"y":0.25},{"x":1993,"y":null},{"x":1994,"y":0.04},{"x":1995,"y":null},{"x":1996,"y":0.01},{"x":1997,"y":0.03},{"x":1998,"y":null},{"x":1999,"y":0.25},{"x":2000,"y":0.03},{"x":2001,"y":0.01},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Washington","data":[{"x":1928,"y":344.82},{"x":1929,"y":248.6},{"x":1930,"y":631.64},{"x":1931,"y":197.43},{"x":1932,"y":631.93},{"x":1933,"y":155.84},{"x":1934,"y":473.84},{"x":1935,"y":525.47},{"x":1936,"y":463.74},{"x":1937,"y":103.34},{"x":1938,"y":112.23},{"x":1939,"y":1158.16},{"x":1940,"y":919.59},{"x":1941,"y":118.23},{"x":1942,"y":645.64},{"x":1943,"y":765.07},{"x":1944,"y":264.04},{"x":1945,"y":291.68},{"x":1946,"y":513.61},{"x":1947,"y":63.82},{"x":1948,"y":482.29},{"x":1949,"y":551.2},{"x":1950,"y":142.61},{"x":1951,"y":733.32},{"x":1952,"y":243.78},{"x":1953,"y":473.15},{"x":1954,"y":857.47},{"x":1955,"y":425.03},{"x":1956,"y":481.3},{"x":1957,"y":614.37},{"x":1958,"y":384.18},{"x":1959,"y":512.47},{"x":1960,"y":456.2},{"x":1961,"y":301.32},{"x":1962,"y":704.07},{"x":1963,"y":166.94},{"x":1964,"y":674.69},{"x":1965,"y":255.7},{"x":1966,"y":166.67},{"x":1967,"y":178.9},{"x":1968,"y":18.25},{"x":1969,"y":1.68},{"x":1970,"y":19.71},{"x":1971,"y":33.15},{"x":1972,"y":28.37},{"x":1973,"y":25.03},{"x":1974,"y":2.22},{"x":1975,"y":8.14},{"x":1976,"y":10.26},{"x":1977,"y":12.41},{"x":1978,"y":10.62},{"x":1979,"y":25.15},{"x":1980,"y":4.05},{"x":1981,"y":0.1},{"x":1982,"y":0.85},{"x":1983,"y":0.7},{"x":1984,"y":3.91},{"x":1985,"y":1.99},{"x":1986,"y":4.71},{"x":1987,"y":1.01},{"x":1988,"y":0.15},{"x":1989,"y":1.06},{"x":1990,"y":6.71},{"x":1991,"y":1.53},{"x":1992,"y":null},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":0.39},{"x":1996,"y":0.92},{"x":1997,"y":0.27},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"West Virginia","data":[{"x":1928,"y":195.98},{"x":1929,"y":380.14},{"x":1930,"y":157.7},{"x":1931,"y":291.38},{"x":1932,"y":599.65},{"x":1933,"y":303.34},{"x":1934,"y":231.8},{"x":1935,"y":605.9},{"x":1936,"y":63.26},{"x":1937,"y":110.04},{"x":1938,"y":595.16},{"x":1939,"y":99.07},{"x":1940,"y":29.79},{"x":1941,"y":592.24},{"x":1942,"y":303.79},{"x":1943,"y":133.75},{"x":1944,"y":497.22},{"x":1945,"y":79.64},{"x":1946,"y":140.56},{"x":1947,"y":143.62},{"x":1948,"y":295.53},{"x":1949,"y":188.45},{"x":1950,"y":293.19},{"x":1951,"y":227.24},{"x":1952,"y":270},{"x":1953,"y":309.56},{"x":1954,"y":512.01},{"x":1955,"y":204.22},{"x":1956,"y":587.09},{"x":1957,"y":185.11},{"x":1958,"y":657.2},{"x":1959,"y":406.39},{"x":1960,"y":190.39},{"x":1961,"y":429.01},{"x":1962,"y":551.12},{"x":1963,"y":696.29},{"x":1964,"y":518.7},{"x":1965,"y":832.69},{"x":1966,"y":313.45},{"x":1967,"y":84.57},{"x":1968,"y":20.5},{"x":1969,"y":13.82},{"x":1970,"y":19.73},{"x":1971,"y":31.99},{"x":1972,"y":15.51},{"x":1973,"y":12.58},{"x":1974,"y":12.68},{"x":1975,"y":11.73},{"x":1976,"y":11.01},{"x":1977,"y":13.87},{"x":1978,"y":45.55},{"x":1979,"y":4.54},{"x":1980,"y":1.75},{"x":1981,"y":0.6},{"x":1982,"y":0.1},{"x":1983,"y":0.05},{"x":1984,"y":null},{"x":1985,"y":2.51},{"x":1986,"y":0.11},{"x":1987,"y":null},{"x":1988,"y":0.33},{"x":1989,"y":2.95},{"x":1990,"y":0.33},{"x":1991,"y":null},{"x":1992,"y":null},{"x":1993,"y":null},{"x":1994,"y":1.98},{"x":1995,"y":null},{"x":1996,"y":null},{"x":1997,"y":0.05},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Wisconsin","data":[{"x":1928,"y":124.61},{"x":1929,"y":1016.54},{"x":1930,"y":748.58},{"x":1931,"y":506.57},{"x":1932,"y":935.31},{"x":1933,"y":317.48},{"x":1934,"y":1332.84},{"x":1935,"y":1415.38},{"x":1936,"y":126.57},{"x":1937,"y":66.55},{"x":1938,"y":2348.05},{"x":1939,"y":768.04},{"x":1940,"y":636.45},{"x":1941,"y":993.07},{"x":1942,"y":781.79},{"x":1943,"y":1290.54},{"x":1944,"y":1407.91},{"x":1945,"y":165.52},{"x":1946,"y":1333.6},{"x":1947,"y":383.14},{"x":1948,"y":926.15},{"x":1949,"y":1171.07},{"x":1950,"y":546.71},{"x":1951,"y":958.07},{"x":1952,"y":1140.83},{"x":1953,"y":1166.84},{"x":1954,"y":289.57},{"x":1955,"y":1389.05},{"x":1956,"y":715.74},{"x":1957,"y":980.76},{"x":1958,"y":1665.37},{"x":1959,"y":384.77},{"x":1960,"y":1090.16},{"x":1961,"y":932.93},{"x":1962,"y":365.34},{"x":1963,"y":1413.07},{"x":1964,"y":370.35},{"x":1965,"y":482.22},{"x":1966,"y":736.07},{"x":1967,"y":49.53},{"x":1968,"y":31.89},{"x":1969,"y":15.33},{"x":1970,"y":31.02},{"x":1971,"y":87.53},{"x":1972,"y":76.34},{"x":1973,"y":29.97},{"x":1974,"y":13.9},{"x":1975,"y":32.03},{"x":1976,"y":88.54},{"x":1977,"y":45.35},{"x":1978,"y":33.27},{"x":1979,"y":13.76},{"x":1980,"y":31.29},{"x":1981,"y":0.12},{"x":1982,"y":0.02},{"x":1983,"y":null},{"x":1984,"y":0.65},{"x":1985,"y":1.2},{"x":1986,"y":5.85},{"x":1987,"y":3.02},{"x":1988,"y":null},{"x":1989,"y":6.44},{"x":1990,"y":13.39},{"x":1991,"y":0.14},{"x":1992,"y":null},{"x":1993,"y":null},{"x":1994,"y":0.04},{"x":1995,"y":null},{"x":1996,"y":0.02},{"x":1997,"y":null},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]},{"name":"Wyoming","data":[{"x":1928,"y":227},{"x":1929,"y":312.16},{"x":1930,"y":341.55},{"x":1931,"y":60.69},{"x":1932,"y":242.1},{"x":1933,"y":249.06},{"x":1934,"y":967.44},{"x":1935,"y":935.42},{"x":1936,"y":57.52},{"x":1937,"y":69.91},{"x":1938,"y":360.59},{"x":1939,"y":1392.34},{"x":1940,"y":393.6},{"x":1941,"y":381.73},{"x":1942,"y":635.27},{"x":1943,"y":1088.61},{"x":1944,"y":728.08},{"x":1945,"y":157.58},{"x":1946,"y":397.59},{"x":1947,"y":170.19},{"x":1948,"y":805.41},{"x":1949,"y":201.42},{"x":1950,"y":209.99},{"x":1951,"y":753.58},{"x":1952,"y":231.75},{"x":1953,"y":497.54},{"x":1954,"y":391.79},{"x":1955,"y":180.83},{"x":1956,"y":640.69},{"x":1957,"y":69.46},{"x":1958,"y":433.31},{"x":1959,"y":281.2},{"x":1960,"y":209.63},{"x":1961,"y":143.65},{"x":1962,"y":142.93},{"x":1963,"y":97.92},{"x":1964,"y":84.29},{"x":1965,"y":226.15},{"x":1966,"y":72.79},{"x":1967,"y":64.27},{"x":1968,"y":17},{"x":1969,"y":2.43},{"x":1970,"y":3.23},{"x":1971,"y":24.49},{"x":1972,"y":14.4},{"x":1973,"y":19.68},{"x":1974,"y":4.46},{"x":1975,"y":0.75},{"x":1976,"y":0.97},{"x":1977,"y":5.77},{"x":1978,"y":null},{"x":1979,"y":0.43},{"x":1980,"y":null},{"x":1981,"y":0.2},{"x":1982,"y":null},{"x":1983,"y":null},{"x":1984,"y":null},{"x":1985,"y":1.01},{"x":1986,"y":null},{"x":1987,"y":null},{"x":1988,"y":null},{"x":1989,"y":null},{"x":1990,"y":null},{"x":1991,"y":0.65},{"x":1992,"y":0.21},{"x":1993,"y":null},{"x":1994,"y":null},{"x":1995,"y":null},{"x":1996,"y":0.2},{"x":1997,"y":0.61},{"x":1998,"y":null},{"x":1999,"y":null},{"x":2000,"y":null},{"x":2001,"y":null},{"x":2002,"y":null},{"x":2003,"y":null}]}],"yaxis":{"labels":{"style":{"colors":"#848484","fontSize":"8px"}}},"xaxis":{"labels":{"style":{"colors":"#848484"}}},"dataLabels":{"enabled":false},"stroke":{"width":0},"plotOptions":{"heatmap":{"radius":0,"enableShades":false,"colorScale":{"ranges":[{"from":0,"to":0.001,"name":"Missing","color":"#FFF"},{"from":0.001,"to":4,"name":"low","color":"#FDE725"},{"from":4,"to":70,"name":"mid-low","color":"#35B779"},{"from":70,"to":290,"name":"mid-high","color":"#31688E"},{"from":290,"to":3000,"name":"high","color":"#440154"}]}}},"legend":{"offsetY":-15,"formatter":"function(seriesName, opts) {\n if (seriesName == 'Missing') return null; else return seriesName;\n }"},"annotations":{"xaxis":[{"x":1963,"x2":1963.1,"strokeDashArray":0,"opacity":1,"borderColor":"firebrick","fillColor":"firebrick","label":{"borderColor":"firebrick","style":{"color":"#FFF","background":"firebrick"},"text":"Vaccine Introduced","orientation":"horizontal","position":"bottom","offsetY":0}}]},"title":{"text":"Infectious Diseases and Vaccines","style":{"fontWeight":700,"fontSize":"22px"}},"subtitle":{"text":"vaccines dataset from {highcharter}","style":{"fontWeight":400,"fontSize":"16px","color":"#BDBDBD"}}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":1928,"max":2003}},"evals":["ax_opts.legend.formatter"],"jsHooks":[]}</script><details><p><summary><span title="View full code">View full code</span></summary></p>
<div class="sourceCode" id="cb41"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/utils/data.html">data</a></span>(<span class="st">"vaccines"</span>, package = <span class="st">"highcharter"</span>)
<span class="fu"><a href="../../reference/apex.html">apex</a></span>(<span class="kw">vaccines</span>, <span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span>(<span class="kw">year</span>, <span class="kw">state</span>, fill = <span class="kw">count</span>), type = <span class="st">"heatmap"</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_chart.html">ax_chart</a></span>(animations = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(enabled = <span class="fl">FALSE</span>)) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_dataLabels.html">ax_dataLabels</a></span>(enabled = <span class="fl">FALSE</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_stroke.html">ax_stroke</a></span>(width = <span class="fl">0</span>) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_plotOptions.html">ax_plotOptions</a></span>(
heatmap = <span class="fu"><a href="../../reference/heatmap_opts.html">heatmap_opts</a></span>(
radius = <span class="fl">0</span>,
enableShades = <span class="fl">FALSE</span>,
colorScale = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
ranges = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
from = <span class="fl">0</span>,
to = <span class="fl">0.001</span>,
name = <span class="st">"Missing"</span>,
color = <span class="st">"#FFF"</span>
),
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
from = <span class="fl">0.001</span>,
to = <span class="fl">4</span>,
name = <span class="st">"low"</span>,
<span class="co"># color = "#000004"</span>
color = <span class="st">"#FDE725"</span>
),
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
from = <span class="fl">4</span>,
to = <span class="fl">70</span>,
name = <span class="st">"mid-low"</span>,
<span class="co"># color = "#781C6D",</span>
color = <span class="st">"#35B779"</span>
),
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
from = <span class="fl">70</span>,
to = <span class="fl">290</span>,
name = <span class="st">"mid-high"</span>,
<span class="co"># color = "#ED6925",</span>
color = <span class="st">"#31688E"</span>
),
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
from = <span class="fl">290</span>,
to = <span class="fl">3000</span>,
name = <span class="st">"high"</span>,
<span class="co"># color = "#FCFFA4",</span>
color = <span class="st">"#440154"</span>
)
)
)
)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_legend.html">ax_legend</a></span>(
formatter = <span class="fu"><a href="../../reference/apexcharter-exports.html">JS</a></span>(
<span class="st">"function(seriesName, opts) {
if (seriesName == 'Missing') return null; else return seriesName;
}"</span>
),
offsetY = <span class="op">-</span><span class="fl">15</span>
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_yaxis.html">ax_yaxis</a></span>(
labels = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"8px"</span>),
offsetY = <span class="op">-</span><span class="fl">20</span>
)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_annotations.html">ax_annotations</a></span>(
xaxis = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
x = <span class="fl">1963</span>, x2 = <span class="fl">1963.1</span>,
strokeDashArray = <span class="fl">0</span>,
opacity = <span class="fl">1</span>,
borderColor = <span class="st">"firebrick"</span>,
fillColor = <span class="st">"firebrick"</span>,
label = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(
borderColor = <span class="st">"firebrick"</span>,
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(color = <span class="st">"#FFF"</span>, background = <span class="st">"firebrick"</span>),
text = <span class="st">"Vaccine Introduced"</span>,
orientation = <span class="st">"horizontal"</span>,
position = <span class="st">"bottom"</span>,
offsetY = <span class="fl">0</span>
)
)
)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_labs.html">ax_labs</a></span>(
title = <span class="st">"Infectious Diseases and Vaccines"</span>,
subtitle = <span class="st">"vaccines dataset from {highcharter}"</span>
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_title.html">ax_title</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"22px"</span>)
) <span class="op">%&gt;%</span>
<span class="fu"><a href="../../reference/ax_subtitle.html">ax_subtitle</a></span>(
style = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(fontSize = <span class="st">"16px"</span>, color = <span class="st">"#BDBDBD"</span>)
)
</pre></div>
</details>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<div id="tocnav">
<h2 class="hasAnchor">
<a href="#tocnav" class="anchor"></a>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#bar-chart">Bar chart</a></li>
<li><a href="#lines">Lines</a></li>
<li><a href="#scatter-plot">Scatter plot</a></li>
<li><a href="#heatmap">Heatmap</a></li>
</ul>
</div>
</div>
</div>
<footer><div class="copyright">
<p>Developed by <a href="https://twitter.com/_pvictorr"><img src="https://pbs.twimg.com/profile_images/844237339404722177/E1U61aM8_normal.jpg"> Victor Perrier</a>, <a href="https://twitter.com/_mfaan"><img src="https://pbs.twimg.com/profile_images/912313931326218240/o1-wvA18_normal.jpg"> Fanny Meyer</a>.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.0.</p>
</div>
</footer>
</div>
<div id="particles"></div>
<script>
window.onload = function() {
var config = {"particles":{"number":{"value":90,"density":{"enable":true,"value_area":1200}},"color":{"value":"#112446"},"shape":{"type":"circle","stroke":{"width":0,"color":"#000000"},"polygon":{"nb_sides":5},"image":{"src":"img/github.svg","width":100,"height":100}},"opacity":{"value":0.8,"random":false,"anim":{"enable":false,"speed":1,"opacity_min":0.1,"sync":false}},"size":{"value":3,"random":true,"anim":{"enable":false,"speed":40,"size_min":0.1,"sync":false}},"line_linked":{"enable":true,"distance":150,"color":"#112446","opacity":0.6,"width":1},"move":{"enable":true,"speed":5,"direction":"none","random":false,"straight":false,"out_mode":"out","bounce":false,"attract":{"enable":false,"rotateX":600,"rotateY":1200}}},"interactivity":{"detect_on":"canvas","events":{"onhover":{"enable":true,"mode":"repulse"},"onclick":{"enable":true,"mode":"push"},"resize":true}},"modes":{"grab":{"distance":400,"line_linked":{"opacity":1}},"bubble":{"distance":400,"size":40,"duration":2,"opacity":8,"speed":3},"repulse":{"distance":200,"duration":0.4},"push":{"particles_nb":4},"remove":{"particles_nb":2}},"retina_detect":true} ;
particlesJS("particles", config);
};
</script>
</body>
</html>