<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Highcharter on R Views</title>
    <link>https://rviews.rstudio.com/tags/highcharter/</link>
    <description>Recent content in Highcharter on R Views</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 12 Feb 2019 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://rviews.rstudio.com/tags/highcharter/" rel="self" type="application/rss+xml" />
    
    
    
    
    <item>
      <title>A Look Back on 2018: Part 2</title>
      <link>https://rviews.rstudio.com/2019/02/12/a-look-back-on-2018-part-2/</link>
      <pubDate>Tue, 12 Feb 2019 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2019/02/12/a-look-back-on-2018-part-2/</guid>
      <description>
        
&lt;script src=&#34;/rmarkdown-libs/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/jquery/jquery.min.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/proj4js/proj4.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;/rmarkdown-libs/highcharts/css/motion.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/highcharts.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/highcharts-3d.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/highcharts-more.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/stock.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/heatmap.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/treemap.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/annotations.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/boost.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/data.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/drag-panes.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/drilldown.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/funnel.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/item-series.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/offline-exporting.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/overlapping-datalabels.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/parallel-coordinates.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/sankey.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/solid-gauge.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/streamgraph.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/sunburst.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/vector.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/wordcloud.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/xrange.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/exporting.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/export-data.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/maps/modules/map.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/grouped-categories.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/motion.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/multicolor_series.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/custom/reset.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/custom/symbols-extra.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/custom/text-symbols.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highchart-binding/highchart.js&#34;&gt;&lt;/script&gt;


&lt;p&gt;Welcome to the second installment of Reproducible Finance 2019!&lt;/p&gt;
&lt;p&gt;In the &lt;a href=&#34;http://www.reproduciblefinance.com/2019/01/14/looking-back-on-last-year/&#34;&gt;previous post&lt;/a&gt;, we looked back on the daily returns for several market sectors in 2018. Today, we’ll continue that theme and look at some summary statistics for 2018, and then extend out to previous years and different ways of visualizing our data. There’s not much heavy computation or even modeling today, but the goal is to lay some foundational code that we could use for different years or buckets of stocks, and to create some exploratory visualizations.&lt;/p&gt;
&lt;p&gt;First, let’s load up our packages for the day.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;library(tidyverse)
library(tidyquant)
library(riingo)
library(highcharter)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next let’s grab our prices and returns for market sectors. We covered this in detail in the &lt;a href=&#34;http://www.reproduciblefinance.com/2019/01/14/looking-back-on-last-year/&#34;&gt;previous post&lt;/a&gt; and I won’t walk through it again, but here is the full code.&lt;/p&gt;
&lt;p&gt;Note one change: last time, we imported data and calculated returns for just 2018. Today, I’ll set the start date to &lt;code&gt;start_date = &amp;quot;2007-12-29&amp;quot;&lt;/code&gt; and import data for the 10 years from 2008 - 2018. That’s because, in addition to looking at summary statistics in just 2018, we will also look at some stats on a yearly basis from 2008 - 2018.&lt;/p&gt;
&lt;p&gt;Here’s the code to import prices and calculate daily returns for our sector ETFs.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;etf_ticker_sector &amp;lt;- tibble(
  ticker = c(&amp;quot;XLY&amp;quot;, &amp;quot;XLP&amp;quot;, &amp;quot;XLE&amp;quot;,   
          &amp;quot;XLF&amp;quot;, &amp;quot;XLV&amp;quot;, &amp;quot;XLI&amp;quot;, &amp;quot;XLB&amp;quot;, 
          &amp;quot;XLK&amp;quot;, &amp;quot;XLU&amp;quot;, &amp;quot;XLRE&amp;quot;, 
          &amp;quot;SPY&amp;quot;),   
  sector = c(&amp;quot;Consumer Discretionary&amp;quot;, &amp;quot;Consumer Staples&amp;quot;, &amp;quot;Energy&amp;quot;, 
          &amp;quot;Financials&amp;quot;, &amp;quot;Health Care&amp;quot;, &amp;quot;Industrials&amp;quot;, &amp;quot;Materials&amp;quot;, 
          &amp;quot;Information Technology&amp;quot;, &amp;quot;Utilities&amp;quot;, &amp;quot;Real Estate&amp;quot;,
          &amp;quot;Market&amp;quot;)
)



#riingo_set_token(&amp;quot;your API key here&amp;quot;)

sector_returns_2008_2018 &amp;lt;- 
  etf_ticker_sector %&amp;gt;%
  pull(ticker) %&amp;gt;% 
  riingo_prices(., 
                start_date = &amp;quot;2007-12-29&amp;quot;,
                end_date = &amp;quot;2018-12-31&amp;quot;) %&amp;gt;%
  mutate(date = ymd(date)) %&amp;gt;%
  left_join(etf_ticker_sector, by = &amp;quot;ticker&amp;quot;) %&amp;gt;%
  select(sector, date, adjClose) %&amp;gt;%
  group_by(sector) %&amp;gt;% 
  mutate(daily_return = log(adjClose) - log(lag(adjClose))) %&amp;gt;% 
  na.omit() &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Let’s take a quick peek at the first observation for each sector by using &lt;code&gt;slice(1)&lt;/code&gt;, which will respect our &lt;code&gt;group_by()&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018 %&amp;gt;% 
  group_by(sector) %&amp;gt;% 
  slice(1)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 11 x 4
# Groups:   sector [11]
   sector                 date       adjClose daily_return
   &amp;lt;chr&amp;gt;                  &amp;lt;date&amp;gt;        &amp;lt;dbl&amp;gt;        &amp;lt;dbl&amp;gt;
 1 Consumer Discretionary 2008-01-02     27.3     -0.0154 
 2 Consumer Staples       2008-01-02     21.1     -0.0143 
 3 Energy                 2008-01-02     62.5      0.00189
 4 Financials             2008-01-02     18.6     -0.0199 
 5 Health Care            2008-01-02     28.8     -0.0105 
 6 Industrials            2008-01-02     30.4     -0.0167 
 7 Information Technology 2008-01-02     21.8     -0.0205 
 8 Market                 2008-01-02    115.      -0.00879
 9 Materials              2008-01-02     32.2     -0.00964
10 Real Estate            2015-10-09     26.7     -0.00166
11 Utilities              2008-01-02     27.8     -0.00569&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This looks good, but I’d like to confirm that we successfully imported prices and calculated returns for each year and for each sector, meaning I want &lt;code&gt;group_by(year, sector)&lt;/code&gt; and then &lt;code&gt;slice(1)&lt;/code&gt;. Problem is: there’s not currently a column called &lt;code&gt;year&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We can fix that by separating the date column into &lt;code&gt;year&lt;/code&gt; and &lt;code&gt;month&lt;/code&gt; with the incredibly useful &lt;code&gt;separate()&lt;/code&gt; function. We will run &lt;code&gt;separate(date, c(&amp;quot;year&amp;quot;, &amp;quot;month&amp;quot;), sep = &amp;quot;-&amp;quot;, remove = FALSE)&lt;/code&gt;. I use &lt;code&gt;remove = FALSE&lt;/code&gt; because I want to keep the &lt;code&gt;date&lt;/code&gt; column.&lt;/p&gt;
&lt;p&gt;It’s not necessary, but for ease of viewing in this post, I’ll peek at just sectors that contain the word “Consumer”, by calling &lt;code&gt;filter(sector, str_detect(&amp;quot;Consumer&amp;quot;))&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018 %&amp;gt;%
  separate(date, c(&amp;quot;year&amp;quot;, &amp;quot;month&amp;quot;), sep = &amp;quot;-&amp;quot;, remove = FALSE) %&amp;gt;% 
  group_by(year, sector) %&amp;gt;% 
  slice(1) %&amp;gt;% 
  filter(str_detect(sector, &amp;quot;Consumer&amp;quot;))&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 22 x 6
# Groups:   year, sector [22]
   sector                 date       year  month adjClose daily_return
   &amp;lt;chr&amp;gt;                  &amp;lt;date&amp;gt;     &amp;lt;chr&amp;gt; &amp;lt;chr&amp;gt;    &amp;lt;dbl&amp;gt;        &amp;lt;dbl&amp;gt;
 1 Consumer Discretionary 2008-01-02 2008  01        27.3    -0.0154  
 2 Consumer Staples       2008-01-02 2008  01        21.1    -0.0143  
 3 Consumer Discretionary 2009-01-02 2009  01        19.5     0.0489  
 4 Consumer Staples       2009-01-02 2009  01        18.5     0.0141  
 5 Consumer Discretionary 2010-01-04 2010  01        26.3     0.00770 
 6 Consumer Staples       2010-01-04 2010  01        20.9     0.00753 
 7 Consumer Discretionary 2011-01-03 2011  01        33.7     0.0117  
 8 Consumer Staples       2011-01-03 2011  01        23.6     0.00136 
 9 Consumer Discretionary 2012-01-03 2012  01        35.6     0.00842 
10 Consumer Staples       2012-01-03 2012  01        26.9    -0.000924
# … with 12 more rows&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;OK, we’ve confirmed that we have prices and returns for our sectors for each year. Those new &lt;code&gt;month&lt;/code&gt; and &lt;code&gt;year&lt;/code&gt; columns will come in handy later, so let’s go ahead and save them.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon &amp;lt;-
  sector_returns_2008_2018 %&amp;gt;%
  separate(date, c(&amp;quot;year&amp;quot;, &amp;quot;month&amp;quot;), sep = &amp;quot;-&amp;quot;, remove = FALSE) %&amp;gt;% 
  group_by(year, sector)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We’re going to look back on several summary statistics for 2018 first: mean daily return, standard deviation, skewness, and kurtosis of daily returns. We will use the &lt;code&gt;summarise()&lt;/code&gt; function and then &lt;code&gt;filter(year == &amp;quot;2018&amp;quot;)&lt;/code&gt; to get our stats for just 2018.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon %&amp;gt;%
  summarise(avg = mean(daily_return),
            stddev = sd(daily_return),
            skew = skewness(daily_return),
            kurt = kurtosis(daily_return)) %&amp;gt;%
  filter(year == &amp;quot;2018&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 11 x 6
# Groups:   year [1]
   year  sector                        avg  stddev   skew  kurt
   &amp;lt;chr&amp;gt; &amp;lt;chr&amp;gt;                       &amp;lt;dbl&amp;gt;   &amp;lt;dbl&amp;gt;  &amp;lt;dbl&amp;gt; &amp;lt;dbl&amp;gt;
 1 2018  Consumer Discretionary  0.0000629 0.0122  -0.199 2.61 
 2 2018  Consumer Staples       -0.000335  0.00915 -0.664 1.54 
 3 2018  Energy                 -0.000801  0.0140  -0.294 1.58 
 4 2018  Financials             -0.000557  0.0124  -0.675 2.47 
 5 2018  Health Care             0.000243  0.0111  -0.604 2.31 
 6 2018  Industrials            -0.000566  0.0120  -0.717 2.08 
 7 2018  Information Technology -0.0000667 0.0147  -0.336 1.82 
 8 2018  Market                 -0.000186  0.0108  -0.479 3.18 
 9 2018  Materials              -0.000641  0.0121  -0.210 0.861
10 2018  Real Estate            -0.0000957 0.0103  -0.548 1.41 
11 2018  Utilities               0.000153  0.00956 -0.621 1.82 &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We can build off that code flow to select just the years 2014 and 2015 with &lt;code&gt;filter(year %in% c(&amp;quot;2014&amp;quot;, &amp;quot;2015&amp;quot;)&lt;/code&gt; and, say, the energy sector with &lt;code&gt;str_detect(sector, &amp;quot;Energy&amp;quot;)&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon %&amp;gt;%
  summarise(avg = mean(daily_return),
            stddev = sd(daily_return),
            skew = skewness(daily_return),
            kurt = kurtosis(daily_return)) %&amp;gt;%
  filter(year %in% c(&amp;quot;2014&amp;quot;, &amp;quot;2015&amp;quot;) &amp;amp;
        str_detect(sector, &amp;quot;Energy&amp;quot;))&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 2 x 6
# Groups:   year [2]
  year  sector       avg stddev    skew  kurt
  &amp;lt;chr&amp;gt; &amp;lt;chr&amp;gt;      &amp;lt;dbl&amp;gt;  &amp;lt;dbl&amp;gt;   &amp;lt;dbl&amp;gt; &amp;lt;dbl&amp;gt;
1 2014  Energy -0.000361 0.0117 -0.891  4.43 
2 2015  Energy -0.000959 0.0157  0.0157 0.813&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Think about how that code flow might be useful in a Shiny application, where we let the end user choose a sector, a year, and possibly which summary stats to calculate and display.&lt;/p&gt;
&lt;p&gt;Now let’s do some visualizing.&lt;/p&gt;
&lt;p&gt;We’ll start with a column chart, where the height is equal to the sector skewness for the chosen year.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon %&amp;gt;% 
  summarise(avg = mean(daily_return),
            stddev = sd(daily_return),
            skew = skewness(daily_return),
            kurt = kurtosis(daily_return)) %&amp;gt;%
 filter(year == &amp;quot;2018&amp;quot;) %&amp;gt;% 
  ggplot(aes(x = sector, y = skew, fill = sector)) +
  geom_col(width = .3) +
  ylim(-1,1) +
  theme(axis.text.x = element_text(angle = 90, vjust = 1, hjust=1))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-02-06-a-look-back-on-2018-part-2_files/figure-html/unnamed-chunk-8-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Here’s the same exact data, except we’ll use a scatter plot where the height of each point is the skewness.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon %&amp;gt;% 
  summarise(avg = mean(daily_return),
            stddev = sd(daily_return),
            skew = skewness(daily_return),
            kurt = kurtosis(daily_return)) %&amp;gt;%
 filter(year == &amp;quot;2018&amp;quot;) %&amp;gt;% 
  ggplot(aes(x = sector, y = skew, color = sector)) +
  geom_point(size = .8) +
  ylim(-1, 1) +
  theme(axis.text.x = element_text(angle = 90, vjust = 1, hjust=1))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-02-06-a-look-back-on-2018-part-2_files/figure-html/unnamed-chunk-9-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;For both of the charts above, we could change our &lt;code&gt;filter(year == ...)&lt;/code&gt; to choose a different year and build a new chart, but instead let’s comment out the year filter altogether, meaning we will chart all years, and then call &lt;code&gt;facet_wrap(~year)&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon %&amp;gt;% 
  summarise(avg = mean(daily_return),
            stddev = sd(daily_return),
            skew = skewness(daily_return),
            kurt = kurtosis(daily_return)) %&amp;gt;%
 # filter(year == &amp;quot;2018&amp;quot;) %&amp;gt;% 
  ggplot(aes(x = sector, y = skew, fill = sector)) +
  geom_col(width = .5) +
  ylim(-1, 1) +
  theme(axis.text.x = element_text(angle = 90, vjust = 1, hjust=1)) +
  facet_wrap(~year)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-02-06-a-look-back-on-2018-part-2_files/figure-html/unnamed-chunk-10-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;This post was originally going to be focused on standard deviation, and not skewness, but there was recently an &lt;a href=&#34;https://blog.thinknewfound.com/2019/02/no-pain-no-premium/&#34;&gt;excellent piece&lt;/a&gt; on the Think New Found blog that discusses skewness and its importance as a risk measure. Definitely worth a read for the risk-return obsessed amongst us. For an R code reference, we covered skewness extensively in this &lt;a href=&#34;https://rviews.rstudio.com/2017/12/13/introduction-to-skewness/&#34;&gt;previous blog post&lt;/a&gt;, and there’s bare code for the calculations on the Reproducible Finance site &lt;a href=&#34;http://www.reproduciblefinance.com/code/skewness/&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Those ggplots are nice, but let’s take a quick look at how we might do this with &lt;code&gt;highcharter&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon %&amp;gt;% 
  summarise(avg = mean(daily_return),
            stddev = sd(daily_return),
            skew = skewness(daily_return),
            kurt = kurtosis(daily_return)) %&amp;gt;%
 filter(year == &amp;quot;2018&amp;quot;) %&amp;gt;% 
 hchart(., 
       type = &amp;#39;column&amp;#39;, 
       hcaes(y = skew,
             x = sector,
             group = sector)) %&amp;gt;% 
  hc_title(text = &amp;quot;2018 Sector Skew&amp;quot;) %&amp;gt;%
  hc_subtitle(text = &amp;quot;by sector&amp;quot;) %&amp;gt;% 
  hc_xAxis(title = list(text = &amp;quot;&amp;quot;)) %&amp;gt;%
  hc_tooltip(headerFormat = &amp;quot;&amp;quot;,
             pointFormat = &amp;quot;skewness: {point.y: .4f}% &amp;lt;br&amp;gt;
                            mean return: {point.avg: .4f}&amp;quot;) %&amp;gt;% 
  hc_yAxis(labels = list(format = &amp;quot;{value}%&amp;quot;)) %&amp;gt;% 
  hc_add_theme(hc_theme_flat()) %&amp;gt;%
  hc_exporting(enabled = TRUE) %&amp;gt;% 
  hc_legend(enabled = FALSE)&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-1&#34; style=&#34;width:100%;height:500px;&#34; class=&#34;highchart html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-1&#34;&gt;{&#34;x&#34;:{&#34;hc_opts&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;2018 Sector Skew&#34;},&#34;yAxis&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;skew&#34;},&#34;type&#34;:&#34;linear&#34;,&#34;labels&#34;:{&#34;format&#34;:&#34;{value}%&#34;}},&#34;credits&#34;:{&#34;enabled&#34;:false},&#34;exporting&#34;:{&#34;enabled&#34;:true},&#34;plotOptions&#34;:{&#34;series&#34;:{&#34;label&#34;:{&#34;enabled&#34;:false},&#34;turboThreshold&#34;:0,&#34;showInLegend&#34;:true},&#34;treemap&#34;:{&#34;layoutAlgorithm&#34;:&#34;squarified&#34;},&#34;scatter&#34;:{&#34;marker&#34;:{&#34;symbol&#34;:&#34;circle&#34;}}},&#34;series&#34;:[{&#34;name&#34;:&#34;Consumer Discretionary&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Consumer Discretionary&#34;,&#34;avg&#34;:6.29212024387683e-05,&#34;stddev&#34;:0.0121861445829787,&#34;skew&#34;:-0.19944429120813,&#34;kurt&#34;:2.60792743137546,&#34;y&#34;:-0.19944429120813,&#34;name&#34;:&#34;Consumer Discretionary&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Consumer Staples&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Consumer Staples&#34;,&#34;avg&#34;:-0.000335354442936463,&#34;stddev&#34;:0.00914691288490999,&#34;skew&#34;:-0.663911209508658,&#34;kurt&#34;:1.53966192765663,&#34;y&#34;:-0.663911209508658,&#34;name&#34;:&#34;Consumer Staples&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Energy&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Energy&#34;,&#34;avg&#34;:-0.00080068717401515,&#34;stddev&#34;:0.0140431552521789,&#34;skew&#34;:-0.293792546325906,&#34;kurt&#34;:1.58286282271065,&#34;y&#34;:-0.293792546325906,&#34;name&#34;:&#34;Energy&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Financials&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Financials&#34;,&#34;avg&#34;:-0.000556801288397995,&#34;stddev&#34;:0.0123573811788945,&#34;skew&#34;:-0.674658259310695,&#34;kurt&#34;:2.47308484717972,&#34;y&#34;:-0.674658259310695,&#34;name&#34;:&#34;Financials&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Health Care&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Health Care&#34;,&#34;avg&#34;:0.000242798452412498,&#34;stddev&#34;:0.0110593533992154,&#34;skew&#34;:-0.603718531887702,&#34;kurt&#34;:2.30880571887281,&#34;y&#34;:-0.603718531887702,&#34;name&#34;:&#34;Health Care&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Industrials&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Industrials&#34;,&#34;avg&#34;:-0.000565863327991203,&#34;stddev&#34;:0.0120301635082814,&#34;skew&#34;:-0.716625623353101,&#34;kurt&#34;:2.07901897858249,&#34;y&#34;:-0.716625623353101,&#34;name&#34;:&#34;Industrials&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Information Technology&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Information Technology&#34;,&#34;avg&#34;:-6.66981199800315e-05,&#34;stddev&#34;:0.0147197714609053,&#34;skew&#34;:-0.336220712047966,&#34;kurt&#34;:1.82085736162563,&#34;y&#34;:-0.336220712047966,&#34;name&#34;:&#34;Information Technology&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Market&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Market&#34;,&#34;avg&#34;:-0.000185823433694747,&#34;stddev&#34;:0.0107588740626304,&#34;skew&#34;:-0.478926291405256,&#34;kurt&#34;:3.17915173743908,&#34;y&#34;:-0.478926291405256,&#34;name&#34;:&#34;Market&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Materials&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Materials&#34;,&#34;avg&#34;:-0.000641400233181771,&#34;stddev&#34;:0.0120768281084307,&#34;skew&#34;:-0.209666863078795,&#34;kurt&#34;:0.86141220498136,&#34;y&#34;:-0.209666863078795,&#34;name&#34;:&#34;Materials&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Real Estate&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Real Estate&#34;,&#34;avg&#34;:-9.56835569738823e-05,&#34;stddev&#34;:0.0102621792018636,&#34;skew&#34;:-0.548410701832081,&#34;kurt&#34;:1.41422002727793,&#34;y&#34;:-0.548410701832081,&#34;name&#34;:&#34;Real Estate&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Utilities&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Utilities&#34;,&#34;avg&#34;:0.000153255979575135,&#34;stddev&#34;:0.00956326094648331,&#34;skew&#34;:-0.620587742749803,&#34;kurt&#34;:1.81712393049461,&#34;y&#34;:-0.620587742749803,&#34;name&#34;:&#34;Utilities&#34;}],&#34;type&#34;:&#34;column&#34;}],&#34;xAxis&#34;:{&#34;type&#34;:&#34;category&#34;,&#34;title&#34;:{&#34;text&#34;:&#34;&#34;}},&#34;subtitle&#34;:{&#34;text&#34;:&#34;by sector&#34;},&#34;tooltip&#34;:{&#34;headerFormat&#34;:&#34;&#34;,&#34;pointFormat&#34;:&#34;skewness: {point.y: .4f}% &lt;br&gt;\n                            mean return: {point.avg: .4f}&#34;},&#34;legend&#34;:{&#34;enabled&#34;:false}},&#34;theme&#34;:{&#34;colors&#34;:[&#34;#f1c40f&#34;,&#34;#2ecc71&#34;,&#34;#9b59b6&#34;,&#34;#e74c3c&#34;,&#34;#34495e&#34;,&#34;#3498db&#34;,&#34;#1abc9c&#34;,&#34;#f39c12&#34;,&#34;#d35400&#34;],&#34;chart&#34;:{&#34;backgroundColor&#34;:&#34;#ECF0F1&#34;},&#34;xAxis&#34;:{&#34;gridLineDashStyle&#34;:&#34;Dash&#34;,&#34;gridLineWidth&#34;:1,&#34;gridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;lineColor&#34;:&#34;#BDC3C7&#34;,&#34;minorGridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;tickColor&#34;:&#34;#BDC3C7&#34;,&#34;tickWidth&#34;:1},&#34;yAxis&#34;:{&#34;gridLineDashStyle&#34;:&#34;Dash&#34;,&#34;gridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;lineColor&#34;:&#34;#BDC3C7&#34;,&#34;minorGridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;tickColor&#34;:&#34;#BDC3C7&#34;,&#34;tickWidth&#34;:1},&#34;legendBackgroundColor&#34;:&#34;rgba(0, 0, 0, 0.5)&#34;,&#34;background2&#34;:&#34;#505053&#34;,&#34;dataLabelsColor&#34;:&#34;#B0B0B3&#34;,&#34;textColor&#34;:&#34;#34495e&#34;,&#34;contrastTextColor&#34;:&#34;#F0F0F3&#34;,&#34;maskColor&#34;:&#34;rgba(255,255,255,0.3)&#34;},&#34;conf_opts&#34;:{&#34;global&#34;:{&#34;Date&#34;:null,&#34;VMLRadialGradientURL&#34;:&#34;http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png&#34;,&#34;canvasToolsURL&#34;:&#34;http =//code.highcharts.com/list(version)/modules/canvas-tools.js&#34;,&#34;getTimezoneOffset&#34;:null,&#34;timezoneOffset&#34;:0,&#34;useUTC&#34;:true},&#34;lang&#34;:{&#34;contextButtonTitle&#34;:&#34;Chart context menu&#34;,&#34;decimalPoint&#34;:&#34;.&#34;,&#34;downloadJPEG&#34;:&#34;Download JPEG image&#34;,&#34;downloadPDF&#34;:&#34;Download PDF document&#34;,&#34;downloadPNG&#34;:&#34;Download PNG image&#34;,&#34;downloadSVG&#34;:&#34;Download SVG vector image&#34;,&#34;drillUpText&#34;:&#34;Back to {series.name}&#34;,&#34;invalidDate&#34;:null,&#34;loading&#34;:&#34;Loading...&#34;,&#34;months&#34;:[&#34;January&#34;,&#34;February&#34;,&#34;March&#34;,&#34;April&#34;,&#34;May&#34;,&#34;June&#34;,&#34;July&#34;,&#34;August&#34;,&#34;September&#34;,&#34;October&#34;,&#34;November&#34;,&#34;December&#34;],&#34;noData&#34;:&#34;No data to display&#34;,&#34;numericSymbols&#34;:[&#34;k&#34;,&#34;M&#34;,&#34;G&#34;,&#34;T&#34;,&#34;P&#34;,&#34;E&#34;],&#34;printChart&#34;:&#34;Print chart&#34;,&#34;resetZoom&#34;:&#34;Reset zoom&#34;,&#34;resetZoomTitle&#34;:&#34;Reset zoom level 1:1&#34;,&#34;shortMonths&#34;:[&#34;Jan&#34;,&#34;Feb&#34;,&#34;Mar&#34;,&#34;Apr&#34;,&#34;May&#34;,&#34;Jun&#34;,&#34;Jul&#34;,&#34;Aug&#34;,&#34;Sep&#34;,&#34;Oct&#34;,&#34;Nov&#34;,&#34;Dec&#34;],&#34;thousandsSep&#34;:&#34; &#34;,&#34;weekdays&#34;:[&#34;Sunday&#34;,&#34;Monday&#34;,&#34;Tuesday&#34;,&#34;Wednesday&#34;,&#34;Thursday&#34;,&#34;Friday&#34;,&#34;Saturday&#34;]}},&#34;type&#34;:&#34;chart&#34;,&#34;fonts&#34;:[],&#34;debug&#34;:false},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt;Hover on the bars and notice that we included the mean return for each sector as well. That’s the beauty of &lt;code&gt;highcharter&lt;/code&gt;: we can easily add more data in the tooltip using the &lt;code&gt;hc_tooltip()&lt;/code&gt; function. Those skews look pretty daunting, but that’s down to the scale of the y-axis of this chart, which defaults to a max of 0 and a minimum of .8%. Let’s coerce it to max of 1 and a min of -1, which is a rough boundary for where we are comfortable with skewness.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon %&amp;gt;% 
  summarise(avg = mean(daily_return),
            stddev = sd(daily_return),
            skew = skewness(daily_return),
            kurt = kurtosis(daily_return)) %&amp;gt;%
 filter(year == &amp;quot;2018&amp;quot;) %&amp;gt;% 
 hchart(., 
       type = &amp;#39;column&amp;#39;, 
       hcaes(y = skew,
             x = sector,
             group = sector)) %&amp;gt;% 
  hc_title(text = &amp;quot;2018 Skew by Sector&amp;quot;) %&amp;gt;%
  hc_xAxis(title = list(text = &amp;quot;&amp;quot;)) %&amp;gt;%
  hc_tooltip(headerFormat = &amp;quot;&amp;quot;,
             pointFormat = &amp;quot;skewness: {point.y: .4f}% &amp;lt;br&amp;gt;
                            mean return: {point.avg: .4f}&amp;quot;) %&amp;gt;% 
  hc_yAxis(labels = list(format = &amp;quot;{value}%&amp;quot;),
           min = -1,
           max =1) %&amp;gt;% 
  hc_add_theme(hc_theme_flat()) %&amp;gt;%
  hc_exporting(enabled = TRUE) %&amp;gt;% 
  hc_legend(enabled = FALSE)&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-2&#34; style=&#34;width:100%;height:500px;&#34; class=&#34;highchart html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-2&#34;&gt;{&#34;x&#34;:{&#34;hc_opts&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;2018 Skew by Sector&#34;},&#34;yAxis&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;skew&#34;},&#34;type&#34;:&#34;linear&#34;,&#34;labels&#34;:{&#34;format&#34;:&#34;{value}%&#34;},&#34;min&#34;:-1,&#34;max&#34;:1},&#34;credits&#34;:{&#34;enabled&#34;:false},&#34;exporting&#34;:{&#34;enabled&#34;:true},&#34;plotOptions&#34;:{&#34;series&#34;:{&#34;label&#34;:{&#34;enabled&#34;:false},&#34;turboThreshold&#34;:0,&#34;showInLegend&#34;:true},&#34;treemap&#34;:{&#34;layoutAlgorithm&#34;:&#34;squarified&#34;},&#34;scatter&#34;:{&#34;marker&#34;:{&#34;symbol&#34;:&#34;circle&#34;}}},&#34;series&#34;:[{&#34;name&#34;:&#34;Consumer Discretionary&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Consumer Discretionary&#34;,&#34;avg&#34;:6.29212024387683e-05,&#34;stddev&#34;:0.0121861445829787,&#34;skew&#34;:-0.19944429120813,&#34;kurt&#34;:2.60792743137546,&#34;y&#34;:-0.19944429120813,&#34;name&#34;:&#34;Consumer Discretionary&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Consumer Staples&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Consumer Staples&#34;,&#34;avg&#34;:-0.000335354442936463,&#34;stddev&#34;:0.00914691288490999,&#34;skew&#34;:-0.663911209508658,&#34;kurt&#34;:1.53966192765663,&#34;y&#34;:-0.663911209508658,&#34;name&#34;:&#34;Consumer Staples&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Energy&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Energy&#34;,&#34;avg&#34;:-0.00080068717401515,&#34;stddev&#34;:0.0140431552521789,&#34;skew&#34;:-0.293792546325906,&#34;kurt&#34;:1.58286282271065,&#34;y&#34;:-0.293792546325906,&#34;name&#34;:&#34;Energy&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Financials&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Financials&#34;,&#34;avg&#34;:-0.000556801288397995,&#34;stddev&#34;:0.0123573811788945,&#34;skew&#34;:-0.674658259310695,&#34;kurt&#34;:2.47308484717972,&#34;y&#34;:-0.674658259310695,&#34;name&#34;:&#34;Financials&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Health Care&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Health Care&#34;,&#34;avg&#34;:0.000242798452412498,&#34;stddev&#34;:0.0110593533992154,&#34;skew&#34;:-0.603718531887702,&#34;kurt&#34;:2.30880571887281,&#34;y&#34;:-0.603718531887702,&#34;name&#34;:&#34;Health Care&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Industrials&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Industrials&#34;,&#34;avg&#34;:-0.000565863327991203,&#34;stddev&#34;:0.0120301635082814,&#34;skew&#34;:-0.716625623353101,&#34;kurt&#34;:2.07901897858249,&#34;y&#34;:-0.716625623353101,&#34;name&#34;:&#34;Industrials&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Information Technology&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Information Technology&#34;,&#34;avg&#34;:-6.66981199800315e-05,&#34;stddev&#34;:0.0147197714609053,&#34;skew&#34;:-0.336220712047966,&#34;kurt&#34;:1.82085736162563,&#34;y&#34;:-0.336220712047966,&#34;name&#34;:&#34;Information Technology&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Market&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Market&#34;,&#34;avg&#34;:-0.000185823433694747,&#34;stddev&#34;:0.0107588740626304,&#34;skew&#34;:-0.478926291405256,&#34;kurt&#34;:3.17915173743908,&#34;y&#34;:-0.478926291405256,&#34;name&#34;:&#34;Market&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Materials&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Materials&#34;,&#34;avg&#34;:-0.000641400233181771,&#34;stddev&#34;:0.0120768281084307,&#34;skew&#34;:-0.209666863078795,&#34;kurt&#34;:0.86141220498136,&#34;y&#34;:-0.209666863078795,&#34;name&#34;:&#34;Materials&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Real Estate&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Real Estate&#34;,&#34;avg&#34;:-9.56835569738823e-05,&#34;stddev&#34;:0.0102621792018636,&#34;skew&#34;:-0.548410701832081,&#34;kurt&#34;:1.41422002727793,&#34;y&#34;:-0.548410701832081,&#34;name&#34;:&#34;Real Estate&#34;}],&#34;type&#34;:&#34;column&#34;},{&#34;name&#34;:&#34;Utilities&#34;,&#34;data&#34;:[{&#34;year&#34;:&#34;2018&#34;,&#34;sector&#34;:&#34;Utilities&#34;,&#34;avg&#34;:0.000153255979575135,&#34;stddev&#34;:0.00956326094648331,&#34;skew&#34;:-0.620587742749803,&#34;kurt&#34;:1.81712393049461,&#34;y&#34;:-0.620587742749803,&#34;name&#34;:&#34;Utilities&#34;}],&#34;type&#34;:&#34;column&#34;}],&#34;xAxis&#34;:{&#34;type&#34;:&#34;category&#34;,&#34;title&#34;:{&#34;text&#34;:&#34;&#34;}},&#34;tooltip&#34;:{&#34;headerFormat&#34;:&#34;&#34;,&#34;pointFormat&#34;:&#34;skewness: {point.y: .4f}% &lt;br&gt;\n                            mean return: {point.avg: .4f}&#34;},&#34;legend&#34;:{&#34;enabled&#34;:false}},&#34;theme&#34;:{&#34;colors&#34;:[&#34;#f1c40f&#34;,&#34;#2ecc71&#34;,&#34;#9b59b6&#34;,&#34;#e74c3c&#34;,&#34;#34495e&#34;,&#34;#3498db&#34;,&#34;#1abc9c&#34;,&#34;#f39c12&#34;,&#34;#d35400&#34;],&#34;chart&#34;:{&#34;backgroundColor&#34;:&#34;#ECF0F1&#34;},&#34;xAxis&#34;:{&#34;gridLineDashStyle&#34;:&#34;Dash&#34;,&#34;gridLineWidth&#34;:1,&#34;gridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;lineColor&#34;:&#34;#BDC3C7&#34;,&#34;minorGridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;tickColor&#34;:&#34;#BDC3C7&#34;,&#34;tickWidth&#34;:1},&#34;yAxis&#34;:{&#34;gridLineDashStyle&#34;:&#34;Dash&#34;,&#34;gridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;lineColor&#34;:&#34;#BDC3C7&#34;,&#34;minorGridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;tickColor&#34;:&#34;#BDC3C7&#34;,&#34;tickWidth&#34;:1},&#34;legendBackgroundColor&#34;:&#34;rgba(0, 0, 0, 0.5)&#34;,&#34;background2&#34;:&#34;#505053&#34;,&#34;dataLabelsColor&#34;:&#34;#B0B0B3&#34;,&#34;textColor&#34;:&#34;#34495e&#34;,&#34;contrastTextColor&#34;:&#34;#F0F0F3&#34;,&#34;maskColor&#34;:&#34;rgba(255,255,255,0.3)&#34;},&#34;conf_opts&#34;:{&#34;global&#34;:{&#34;Date&#34;:null,&#34;VMLRadialGradientURL&#34;:&#34;http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png&#34;,&#34;canvasToolsURL&#34;:&#34;http =//code.highcharts.com/list(version)/modules/canvas-tools.js&#34;,&#34;getTimezoneOffset&#34;:null,&#34;timezoneOffset&#34;:0,&#34;useUTC&#34;:true},&#34;lang&#34;:{&#34;contextButtonTitle&#34;:&#34;Chart context menu&#34;,&#34;decimalPoint&#34;:&#34;.&#34;,&#34;downloadJPEG&#34;:&#34;Download JPEG image&#34;,&#34;downloadPDF&#34;:&#34;Download PDF document&#34;,&#34;downloadPNG&#34;:&#34;Download PNG image&#34;,&#34;downloadSVG&#34;:&#34;Download SVG vector image&#34;,&#34;drillUpText&#34;:&#34;Back to {series.name}&#34;,&#34;invalidDate&#34;:null,&#34;loading&#34;:&#34;Loading...&#34;,&#34;months&#34;:[&#34;January&#34;,&#34;February&#34;,&#34;March&#34;,&#34;April&#34;,&#34;May&#34;,&#34;June&#34;,&#34;July&#34;,&#34;August&#34;,&#34;September&#34;,&#34;October&#34;,&#34;November&#34;,&#34;December&#34;],&#34;noData&#34;:&#34;No data to display&#34;,&#34;numericSymbols&#34;:[&#34;k&#34;,&#34;M&#34;,&#34;G&#34;,&#34;T&#34;,&#34;P&#34;,&#34;E&#34;],&#34;printChart&#34;:&#34;Print chart&#34;,&#34;resetZoom&#34;:&#34;Reset zoom&#34;,&#34;resetZoomTitle&#34;:&#34;Reset zoom level 1:1&#34;,&#34;shortMonths&#34;:[&#34;Jan&#34;,&#34;Feb&#34;,&#34;Mar&#34;,&#34;Apr&#34;,&#34;May&#34;,&#34;Jun&#34;,&#34;Jul&#34;,&#34;Aug&#34;,&#34;Sep&#34;,&#34;Oct&#34;,&#34;Nov&#34;,&#34;Dec&#34;],&#34;thousandsSep&#34;:&#34; &#34;,&#34;weekdays&#34;:[&#34;Sunday&#34;,&#34;Monday&#34;,&#34;Tuesday&#34;,&#34;Wednesday&#34;,&#34;Thursday&#34;,&#34;Friday&#34;,&#34;Saturday&#34;]}},&#34;type&#34;:&#34;chart&#34;,&#34;fonts&#34;:[],&#34;debug&#34;:false},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt;Let’s explore one more piece of data. After breaking up the date into year and month and looking at the daily returns and skewness, I got to wondering if the minimum daily return for each sector tended to fall in a certain month. There’s no reason it should, but it seems like a trend we might want to parse, or at least have thought about in case we need it.&lt;/p&gt;
&lt;p&gt;My first instinct was to use &lt;code&gt;summarise()&lt;/code&gt; and get the minimum daily return for each year-sector pair.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon %&amp;gt;% 
  summarise(min_ret = min(daily_return)) %&amp;gt;% 
  head()&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 6 x 3
# Groups:   year [1]
  year  sector                 min_ret
  &amp;lt;chr&amp;gt; &amp;lt;chr&amp;gt;                    &amp;lt;dbl&amp;gt;
1 2008  Consumer Discretionary -0.116 
2 2008  Consumer Staples       -0.0568
3 2008  Energy                 -0.160 
4 2008  Financials             -0.182 
5 2008  Health Care            -0.0687
6 2008  Industrials            -0.0947&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The problem with that flow is that our &lt;code&gt;month&lt;/code&gt; got deleted and we would like to preserve that for charting. We’re better off to &lt;code&gt;filter()&lt;/code&gt; by the &lt;code&gt;min(daily_return)&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon %&amp;gt;% 
  select(-adjClose, -date) %&amp;gt;% 
  filter(daily_return == min(daily_return)) %&amp;gt;%
  group_by(sector) %&amp;gt;% 
  filter(year == &amp;quot;2008&amp;quot;) %&amp;gt;% 
  head()&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 6 x 4
# Groups:   sector [6]
  sector                 year  month daily_return
  &amp;lt;chr&amp;gt;                  &amp;lt;chr&amp;gt; &amp;lt;chr&amp;gt;        &amp;lt;dbl&amp;gt;
1 Consumer Discretionary 2008  10         -0.116 
2 Consumer Staples       2008  12         -0.0568
3 Energy                 2008  10         -0.160 
4 Financials             2008  12         -0.182 
5 Health Care            2008  10         -0.0687
6 Industrials            2008  10         -0.0947&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That’s giving us the same end data for the minimum daily return, but it’s also preserving the &lt;code&gt;month&lt;/code&gt; column.&lt;/p&gt;
&lt;p&gt;Let’s take a quick look to see if any months jump out as frequent holders of the minimum daily return. Note that we’ll need to &lt;code&gt;ungroup()&lt;/code&gt; the data before running &lt;code&gt;count(month)&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon %&amp;gt;% 
  filter(daily_return == min(daily_return)) %&amp;gt;%
  ungroup() %&amp;gt;% 
  count(month) &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 11 x 2
   month     n
   &amp;lt;chr&amp;gt; &amp;lt;int&amp;gt;
 1 01        6
 2 02       18
 3 03        4
 4 04        4
 5 05       14
 6 06       22
 7 08       23
 8 09        3
 9 10        9
10 11        3
11 12        8&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hmmm, months 5, 6 and 8 jump out a bit. Let’s translate those to their actual names using &lt;code&gt;mutate(month = month(date, label = TRUE, abbr = FALSE))&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon %&amp;gt;% 
  filter(daily_return == min(daily_return)) %&amp;gt;%
  mutate(month = month(date, label = TRUE, abbr = FALSE)) %&amp;gt;% 
  ungroup() %&amp;gt;% 
  count(month)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 11 x 2
   month         n
   &amp;lt;ord&amp;gt;     &amp;lt;int&amp;gt;
 1 January       6
 2 February     18
 3 March         4
 4 April         4
 5 May          14
 6 June         22
 7 August       23
 8 September     3
 9 October       9
10 November      3
11 December      8&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Visualizing these monthly tendencies was a bit more involved than I had anticipated, and that usually means I’ve missed a simpler solution somewhere, but I’ll post my brute force insanity in case it’s helpful to others.&lt;/p&gt;
&lt;p&gt;I want to create a chart that looks like this, with months on the x-axis and the minimum daily return for each sector on the y-axis, almost as if we’re trying to see if the minimum daily returns tend to cluster in any months.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-02-06-a-look-back-on-2018-part-2_files/figure-html/unnamed-chunk-17-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;To create that chart, I want the names of the months on the x-axis, but also in the correct order. If we coerce the numbers to month names ahead of charting, &lt;code&gt;ggplot&lt;/code&gt; will put them in alphabetical order, which is not what we want.&lt;/p&gt;
&lt;p&gt;To solve that problem, I first created a vector of months.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;months &amp;lt;- 
  sector_returns_2008_2018_year_mon %&amp;gt;% 
  mutate(months = month(date, label = TRUE, abbr = FALSE)) %&amp;gt;% 
  pull() %&amp;gt;%
  levels() %&amp;gt;% 
  as.character()

months&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt; [1] &amp;quot;January&amp;quot;   &amp;quot;February&amp;quot;  &amp;quot;March&amp;quot;     &amp;quot;April&amp;quot;     &amp;quot;May&amp;quot;      
 [6] &amp;quot;June&amp;quot;      &amp;quot;July&amp;quot;      &amp;quot;August&amp;quot;    &amp;quot;September&amp;quot; &amp;quot;October&amp;quot;  
[11] &amp;quot;November&amp;quot;  &amp;quot;December&amp;quot; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, comes our usual flow from the sector returns to &lt;code&gt;ggplot&lt;/code&gt;, but first we coerce the &lt;code&gt;month&lt;/code&gt; column with &lt;code&gt;as.numeric()&lt;/code&gt; (when we used &lt;code&gt;separate()&lt;/code&gt; before, it created a character column). Then we put month on the x-axis with &lt;code&gt;ggplot(aes(x = month...))&lt;/code&gt;. To create the proper labels, we use &lt;code&gt;scale_x_continuous( breaks = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), labels = months)&lt;/code&gt; to add 12 breaks and label them with our &lt;code&gt;months&lt;/code&gt; vector that we created above.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;  sector_returns_2008_2018_year_mon %&amp;gt;% 
  filter(daily_return == min(daily_return)) %&amp;gt;% 
  mutate(month = as.numeric(month)) %&amp;gt;% 
    ggplot(aes(x = month, y = daily_return, color = sector)) +
    geom_point() +
    scale_x_continuous(breaks = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), 
                       labels = months) + 
   labs(y = &amp;quot;min return&amp;quot;, title = &amp;quot;2008 - 2018 Min Returns by Month&amp;quot;) +
    theme(axis.text.x = element_text(angle = 90, hjust = 1),
          plot.title = element_text(hjust = 0.5)) &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-02-06-a-look-back-on-2018-part-2_files/figure-html/unnamed-chunk-19-1.png&#34; width=&#34;672&#34; /&gt; We can facet by sector if we want to break this into pieces.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;  sector_returns_2008_2018_year_mon %&amp;gt;% 
  filter(daily_return == min(daily_return)) %&amp;gt;% 
  mutate(month = as.numeric(month)) %&amp;gt;% 
    ggplot(aes(x = month, y = daily_return, color = sector)) +
    geom_point() +
    scale_x_continuous(breaks = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), 
                       labels = months)  + 
   labs(y = &amp;quot;min return&amp;quot;, title = &amp;quot;2008 - 2018 Min Returns by Month&amp;quot;) +
    theme(axis.text.x = element_text(angle = 90, hjust = 1),
          plot.title = element_text(hjust = 0.5)) +
  facet_wrap(~sector)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-02-06-a-look-back-on-2018-part-2_files/figure-html/unnamed-chunk-20-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Or we can facet by year.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sector_returns_2008_2018_year_mon %&amp;gt;% 
  filter(daily_return == min(daily_return)) %&amp;gt;% 
  mutate(month = as.numeric(month)) %&amp;gt;% 
    ggplot(aes(x = month, y = daily_return, color = sector)) +
    geom_point() +
    scale_x_continuous(breaks = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), 
                       labels = months)  + 
   labs(y = &amp;quot;min return&amp;quot;, title = &amp;quot;2008 - 2018 Min Returns by Month&amp;quot;) +
    theme(axis.text.x = element_text(angle = 90, hjust = 1),
          plot.title = element_text(hjust = 0.5)) +
  facet_wrap(~year)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-02-06-a-look-back-on-2018-part-2_files/figure-html/unnamed-chunk-21-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Interesting to see that in 2011, each of our sectors had their minimum daily return in the same month.&lt;/p&gt;
&lt;p&gt;That’s all for today. Thanks for reading and see you next time!&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2019/02/12/a-look-back-on-2018-part-2/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>Highcharting Jobs Friday</title>
      <link>https://rviews.rstudio.com/2018/08/09/highcharting-jobs-friday/</link>
      <pubDate>Thu, 09 Aug 2018 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2018/08/09/highcharting-jobs-friday/</guid>
      <description>
        
&lt;script src=&#34;/rmarkdown-libs/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/jquery/jquery.min.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/proj4js/proj4.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;/rmarkdown-libs/highcharts/css/motion.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/highstock.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/highcharts-3d.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/highcharts-more.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/annotations.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/broken-axis.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/data.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/drilldown.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/exporting.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/funnel.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/heatmap.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/map.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/no-data-to-display.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/offline-exporting.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/solid-gauge.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/treemap.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/annotations.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/draggable-legend.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/draggable-points.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/export-csv.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/grouped-categories.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/motion.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/pattern-fill-v2.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/tooltip-delay.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/custom/reset.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/custom/symbols-extra.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/custom/text-symbols.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;/rmarkdown-libs/fontawesome/font-awesome.min.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;link href=&#34;/rmarkdown-libs/htmlwdgtgrid/htmlwdgtgrid.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;/rmarkdown-libs/highchart-binding/highchart.js&#34;&gt;&lt;/script&gt;


&lt;p&gt;Today, in honor of last week’s jobs report from the &lt;a href=&#34;https://www.bls.gov/&#34;&gt;Bureau of Labor Statistics&lt;/a&gt; (BLS), we will visualize jobs data with &lt;code&gt;ggplot2&lt;/code&gt; and then, more extensively with &lt;code&gt;highcharter&lt;/code&gt;. Our aim is to explore &lt;code&gt;highcharter&lt;/code&gt; and its similarity with &lt;code&gt;ggplot&lt;/code&gt; and to create some nice interactive visualizations. In the process, we will cover how to import BLS data from FRED and then wrangle it for visualization. We won’t do any modeling or statistical analysis today, though it wouldn’t be hard to extend this script into a forecasting exercise. One nice thing about today’s code flow is that it can be refreshed and updated on each BLS release date.&lt;/p&gt;
&lt;p&gt;Let’s get to it!&lt;/p&gt;
&lt;p&gt;We will source our data from &lt;a href=&#34;https://fred.stlouisfed.org/&#34;&gt;FRED&lt;/a&gt; and will use the &lt;code&gt;tq_get()&lt;/code&gt; function from &lt;code&gt;tidyquant&lt;/code&gt; which enables us to import many data series at once in tidy, &lt;code&gt;tibble&lt;/code&gt; format. We want to get total employment numbers, ADP estimates, and the sector-by-sector numbers that make up total employment. Let’s start by creating a &lt;code&gt;tibble&lt;/code&gt; to hold the FRED codes and more intuitive names for each data series.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;library(tidyverse)
library(tidyquant)

codes_names_tbl &amp;lt;- tribble(
        ~ symbol, ~ better_names,
        &amp;quot;NPPTTL&amp;quot;, &amp;quot;ADP Estimate&amp;quot;,
        &amp;quot;PAYEMS&amp;quot;, &amp;quot;Nonfarm Employment&amp;quot;,
        &amp;quot;USCONS&amp;quot;, &amp;quot;Construction&amp;quot;,
        &amp;quot;USTRADE&amp;quot;,   &amp;quot;Retail/Trade&amp;quot;,
        &amp;quot;USPBS&amp;quot;,  &amp;quot;Prof/Bus Serv&amp;quot;,
        &amp;quot;MANEMP&amp;quot;,    &amp;quot;Manufact&amp;quot;,
        &amp;quot;USFIRE&amp;quot;,    &amp;quot;Financial&amp;quot;,
        &amp;quot;USMINE&amp;quot;,   &amp;quot;Mining&amp;quot;,
        &amp;quot;USEHS&amp;quot;,    &amp;quot;Health Care&amp;quot;,
        &amp;quot;USWTRADE&amp;quot;,    &amp;quot;Wholesale Trade&amp;quot;,
        &amp;quot;USTPU&amp;quot;,    &amp;quot;Transportation&amp;quot;,
        &amp;quot;USINFO&amp;quot;,    &amp;quot;Info Sys&amp;quot;,
        &amp;quot;USLAH&amp;quot;,    &amp;quot;Leisure&amp;quot;,
        &amp;quot;USGOVT&amp;quot;,    &amp;quot;Gov&amp;quot;,
        &amp;quot;USSERV&amp;quot;,    &amp;quot;Other Services&amp;quot;
)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now we pass the &lt;code&gt;symbol&lt;/code&gt; column to &lt;code&gt;tq_get()&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;fred_empl_data &amp;lt;- 
  tq_get(codes_names_tbl$symbol,                         
         get = &amp;quot;economic.data&amp;quot;,             
         from = &amp;quot;2007-01-01&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We have our data but look at the &lt;code&gt;symbol&lt;/code&gt; column.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;fred_empl_data %&amp;gt;% 
  group_by(symbol) %&amp;gt;% 
  slice(1)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 15 x 3
# Groups:   symbol [15]
   symbol   date         price
   &amp;lt;chr&amp;gt;    &amp;lt;date&amp;gt;       &amp;lt;dbl&amp;gt;
 1 MANEMP   2007-01-01  14008 
 2 NPPTTL   2007-01-01 115437.
 3 PAYEMS   2007-01-01 137497 
 4 USCONS   2007-01-01   7725 
 5 USEHS    2007-01-01  18415 
 6 USFIRE   2007-01-01   8389 
 7 USGOVT   2007-01-01  22095 
 8 USINFO   2007-01-01   3029 
 9 USLAH    2007-01-01  13338 
10 USMINE   2007-01-01    706 
11 USPBS    2007-01-01  17834 
12 USSERV   2007-01-01   5467 
13 USTPU    2007-01-01  26491 
14 USTRADE  2007-01-01  15443.
15 USWTRADE 2007-01-01   5969.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The symbols are the FRED codes, which are unrecognizable unless you have memorized how those codes map to more intuitive names. Let’s replace them with the &lt;code&gt;better_names&lt;/code&gt; column of &lt;code&gt;codes_names_tbl&lt;/code&gt;. We will do this with a &lt;code&gt;left_join()&lt;/code&gt;. (This explains why I labeled our original column as &lt;code&gt;symbol&lt;/code&gt; - it makes the &lt;code&gt;left_join()&lt;/code&gt; easier.) Special thanks to &lt;a href=&#34;https://twitter.com/JennyBryan&#34;&gt;Jenny Bryan&lt;/a&gt; for pointing out this &lt;a href=&#34;http://stat545.com/bit008_lookup.html&#34;&gt;code flow&lt;/a&gt;!&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;fred_empl_data %&amp;gt;% 
  left_join(codes_names_tbl, 
            by = &amp;quot;symbol&amp;quot; ) %&amp;gt;% 
  select(better_names, everything(), -symbol) %&amp;gt;% 
  group_by(better_names) %&amp;gt;% 
  slice(1)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 15 x 3
# Groups:   better_names [15]
   better_names       date         price
   &amp;lt;chr&amp;gt;              &amp;lt;date&amp;gt;       &amp;lt;dbl&amp;gt;
 1 ADP Estimate       2007-01-01 115437.
 2 Construction       2007-01-01   7725 
 3 Financial          2007-01-01   8389 
 4 Gov                2007-01-01  22095 
 5 Health Care        2007-01-01  18415 
 6 Info Sys           2007-01-01   3029 
 7 Leisure            2007-01-01  13338 
 8 Manufact           2007-01-01  14008 
 9 Mining             2007-01-01    706 
10 Nonfarm Employment 2007-01-01 137497 
11 Other Services     2007-01-01   5467 
12 Prof/Bus Serv      2007-01-01  17834 
13 Retail/Trade       2007-01-01  15443.
14 Transportation     2007-01-01  26491 
15 Wholesale Trade    2007-01-01   5969.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That looks much better, but we now have a column called &lt;code&gt;price&lt;/code&gt;, that holds the monthly employment observations, and a column called &lt;code&gt;better_names&lt;/code&gt;, that holds the more intuitive group names. Let’s change those column names to &lt;code&gt;employees&lt;/code&gt; and &lt;code&gt;sector&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;fred_empl_data &amp;lt;- 
fred_empl_data %&amp;gt;% 
  left_join(codes_names_tbl, 
            by = &amp;quot;symbol&amp;quot; ) %&amp;gt;% 
  select(better_names, everything(), -symbol) %&amp;gt;% 
  rename(employees = price, sector = better_names)

head(fred_empl_data)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 6 x 3
  sector       date       employees
  &amp;lt;chr&amp;gt;        &amp;lt;date&amp;gt;         &amp;lt;dbl&amp;gt;
1 ADP Estimate 2007-01-01   115437.
2 ADP Estimate 2007-02-01   115527.
3 ADP Estimate 2007-03-01   115647 
4 ADP Estimate 2007-04-01   115754.
5 ADP Estimate 2007-05-01   115809.
6 ADP Estimate 2007-06-01   115831.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;fred_empl_data&lt;/code&gt; has the names and organization we want, but it still has the raw number of employees per month. We want to visualize the month-to-month &lt;em&gt;change&lt;/em&gt; in jobs numbers, which means we need to perform a calculation on our data and store it in a new column. We use &lt;code&gt;mutate()&lt;/code&gt; to create the new column and calculate monthly change with &lt;code&gt;value - lag(value, 1)&lt;/code&gt;. We are not doing any annualizing or seasonality work here - it’s a simple substraction. For yearly change, it would be &lt;code&gt;value - lag(value, 12)&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;empl_monthly_change &amp;lt;- 
  fred_empl_data  %&amp;gt;% 
  group_by(sector) %&amp;gt;% 
  mutate(monthly_change = employees - lag(employees, 1)) %&amp;gt;% 
  na.omit()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Our final data object &lt;code&gt;empl_monthly_change&lt;/code&gt; is tidy, has intuitive names in the group column, and has the monthly change that we wish to visualize. Let’s build some charts.&lt;/p&gt;
&lt;p&gt;We will start at the top and use &lt;code&gt;ggplot&lt;/code&gt; to visualize how total non-farm employment (Sorry farmers. Your jobs don’t count, I guess) has changed since 2007. We want an end-user to quickly glance at the chart and find the months with positive jobs growth and negative jobs growth. That means we want months with positive jobs growth to be one color, and those with negative jobs growth to be another color. There is more than one way to accomplish this, but I like to create new columns and then add &lt;code&gt;geoms&lt;/code&gt; based on those columns. (Check out &lt;a href=&#34;http://lenkiefer.com/2018/03/11/charting-jobs-friday-with-r/&#34;&gt;this post&lt;/a&gt; by Freddie Mac’s Len Kiefer for another way to accomplish this by nesting &lt;code&gt;ifelse&lt;/code&gt; statements in &lt;code&gt;ggplot&#39;s&lt;/code&gt; aesthetics. In fact, if you like data visualization, check out all the stuff that Len writes.)&lt;/p&gt;
&lt;p&gt;Let’s walk through how to create columns for shading by positive or negative jobs growth. First, we are looking at total employment here, so we call &lt;code&gt;filter(sector == &amp;quot;Nonfarm Employment&amp;quot;)&lt;/code&gt; to get only total employment.&lt;/p&gt;
&lt;p&gt;Next, we create two new columns with &lt;code&gt;mutate()&lt;/code&gt;. The first is called &lt;code&gt;col_pos&lt;/code&gt; and is formed by &lt;code&gt;if_else(monthly_change &amp;gt; 0, monthly_change,...)&lt;/code&gt;. That logic is creating a column that holds the value of monthly change if monthly change is positive, else it holds NA. We then create another column called &lt;code&gt;col_neg&lt;/code&gt; using the same logic.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;empl_monthly_change %&amp;gt;% 
  filter(sector == &amp;quot;Nonfarm Employment&amp;quot;) %&amp;gt;% 
   mutate(col_pos = 
           if_else(monthly_change &amp;gt; 0, 
                  monthly_change, as.numeric(NA)),
         col_neg = 
           if_else(monthly_change &amp;lt; 0, 
                  monthly_change, as.numeric(NA))) %&amp;gt;% 
  dplyr::select(sector, date, col_pos, col_neg) %&amp;gt;% 
  head()&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 6 x 4
# Groups:   sector [1]
  sector             date       col_pos col_neg
  &amp;lt;chr&amp;gt;              &amp;lt;date&amp;gt;       &amp;lt;dbl&amp;gt;   &amp;lt;dbl&amp;gt;
1 Nonfarm Employment 2007-02-01      85      NA
2 Nonfarm Employment 2007-03-01     214      NA
3 Nonfarm Employment 2007-04-01      59      NA
4 Nonfarm Employment 2007-05-01     153      NA
5 Nonfarm Employment 2007-06-01      77      NA
6 Nonfarm Employment 2007-07-01      NA     -30&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Have a qucik look at the &lt;code&gt;col_pos&lt;/code&gt; and &lt;code&gt;col_neg&lt;/code&gt; columns and make sure they look right. &lt;code&gt;col_pos&lt;/code&gt; should have only positive and NA values, &lt;code&gt;col_neg&lt;/code&gt; shoud have only negative and NA values.&lt;/p&gt;
&lt;p&gt;Now we can visualize our monthly changes with &lt;code&gt;ggplot&lt;/code&gt;, adding a separate &lt;code&gt;geom&lt;/code&gt; for those new columns.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;empl_monthly_change %&amp;gt;% 
  filter(sector == &amp;quot;Nonfarm Employment&amp;quot;) %&amp;gt;% 
   mutate(col_pos = 
           if_else(monthly_change &amp;gt; 0, 
                  monthly_change, as.numeric(NA)),
         col_neg = 
           if_else(monthly_change &amp;lt; 0, 
                  monthly_change, as.numeric(NA))) %&amp;gt;%
  ggplot(aes(x = date)) +
  geom_col(aes(y = col_neg),
               alpha = .85,
               fill = &amp;quot;pink&amp;quot;,
               color = &amp;quot;pink&amp;quot;) +
  geom_col(aes(y = col_pos),
               alpha = .85,
               fill = &amp;quot;lightgreen&amp;quot;,
               color = &amp;quot;lightgreen&amp;quot;) +
  ylab(&amp;quot;Monthly Change (thousands)&amp;quot;) +
  labs(title = &amp;quot;Monthly Private Employment Change&amp;quot;,
       subtitle = &amp;quot;total empl, since 2008&amp;quot;,
       caption = &amp;quot;inspired by @lenkiefer&amp;quot;) +
  scale_x_date(breaks = scales::pretty_breaks(n = 10)) +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 90, hjust = 1),
        plot.title = element_text(hjust = 0.5),
        plot.subtitle = element_text(hjust = 0.5),
        plot.caption = element_text(hjust=0))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2018-08-07-highcharting-jobs-friday_files/figure-html/unnamed-chunk-8-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;That plot is nice, but it’s static! Hover on it and you’ll see what I mean.&lt;/p&gt;
&lt;p&gt;Let’s head to &lt;code&gt;highcharter&lt;/code&gt; and create an interactive chart that responds when we hover on it. By way of brief background, &lt;code&gt;highcharter&lt;/code&gt; is an R hook into the fantastic &lt;a href=&#34;www.highcharts.com&#34;&gt;highcharts&lt;/a&gt; JavaScript library. It’s free for personal use but a license is required for commercial use.&lt;/p&gt;
&lt;p&gt;One nice feature of &lt;code&gt;highcharter&lt;/code&gt; is that we can use very similar aesthetic logic to what we used for &lt;code&gt;ggplot&lt;/code&gt;. It’s not identical, but it’s similar and let’s us work with tidy data.&lt;/p&gt;
&lt;p&gt;Before we get to the &lt;code&gt;highcharter&lt;/code&gt; logic, we will add one column to our &lt;code&gt;tibble&lt;/code&gt; to hold the color scheme for our positive and negative monthly changes. Notice how this is different from the &lt;code&gt;ggplot&lt;/code&gt; flow above where we create one column to hold our positive changes for coloring and one column to hold our negative changes for coloring.&lt;/p&gt;
&lt;p&gt;I want to color positive changes light blue and negative changes pink, and put the &lt;a href=&#34;https://www.w3schools.com/colors/colors_picker.asp&#34;&gt;rgb&lt;/a&gt; codes for those colors directly in the new column. The rgb code for light blue is “#6495ed” and for pink is “#ffe6ea”. Thus we use &lt;code&gt;ifelse&lt;/code&gt; to create a column called &lt;code&gt;color_of_bars&lt;/code&gt; that holds “#6495ed” (light blue) when &lt;code&gt;monthly_change&lt;/code&gt; is postive and “#ffe6ea” (pink) when it’s negative.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;total_employ_hc &amp;lt;- 
  empl_monthly_change %&amp;gt;% 
  filter(sector == &amp;quot;Nonfarm Employment&amp;quot;) %&amp;gt;% 
  mutate(color_of_bars = ifelse(monthly_change &amp;gt; 0, &amp;quot;#6495ed&amp;quot;, &amp;quot;#ffe6ea&amp;quot;))

head(total_employ_hc)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 6 x 5
# Groups:   sector [1]
  sector             date       employees monthly_change color_of_bars
  &amp;lt;chr&amp;gt;              &amp;lt;date&amp;gt;         &amp;lt;dbl&amp;gt;          &amp;lt;dbl&amp;gt; &amp;lt;chr&amp;gt;        
1 Nonfarm Employment 2007-02-01    137582             85 #6495ed      
2 Nonfarm Employment 2007-03-01    137796            214 #6495ed      
3 Nonfarm Employment 2007-04-01    137855             59 #6495ed      
4 Nonfarm Employment 2007-05-01    138008            153 #6495ed      
5 Nonfarm Employment 2007-06-01    138085             77 #6495ed      
6 Nonfarm Employment 2007-07-01    138055            -30 #ffe6ea      &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now we are ready to start the &lt;code&gt;highcharter&lt;/code&gt; flow.&lt;/p&gt;
&lt;p&gt;We start by calling &lt;code&gt;hchart&lt;/code&gt; to pass in our data object. Note the similarity to &lt;code&gt;ggplot&lt;/code&gt; where we started with &lt;code&gt;ggplot&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now, intead of waiting for a call to &lt;code&gt;geom_col&lt;/code&gt;, we set &lt;code&gt;type = &amp;quot;column&amp;quot;&lt;/code&gt; to let &lt;code&gt;hchart&lt;/code&gt; know that we are building a column chart. Next, we use &lt;code&gt;hcaes(x = date, y = monthly_change, color = color_of_bars)&lt;/code&gt; to specify our aesthetics. Notice how we can control the colors of the bars from values in the &lt;code&gt;color_of_bars&lt;/code&gt; column.&lt;/p&gt;
&lt;p&gt;We also supply a &lt;code&gt;name = &amp;quot;monthly change&amp;quot;&lt;/code&gt; because we want &lt;code&gt;monthly change&lt;/code&gt; to appear when a user hovers on the chart. That wasn’t a consideration with &lt;code&gt;ggplot&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;library(highcharter)
hchart(total_employ_hc,  
                type = &amp;quot;column&amp;quot;, 
                pointWidth = 5,
                hcaes(x = date,
                      y = monthly_change,
                      color = color_of_bars),
                name = &amp;quot;monthly change&amp;quot;) %&amp;gt;%
  hc_title(text = &amp;quot;Monthly Employment Change&amp;quot;) %&amp;gt;%
  hc_xAxis(type = &amp;quot;datetime&amp;quot;) %&amp;gt;%
  hc_yAxis(title = list(text = &amp;quot;monthly change (thousands)&amp;quot;)) %&amp;gt;%
  hc_exporting(enabled = TRUE)&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-1&#34; style=&#34;width:100%;height:500px;&#34; class=&#34;highchart html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-1&#34;&gt;{&#34;x&#34;:{&#34;hc_opts&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;Monthly Employment Change&#34;},&#34;yAxis&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;monthly change (thousands)&#34;},&#34;type&#34;:&#34;linear&#34;},&#34;credits&#34;:{&#34;enabled&#34;:false},&#34;exporting&#34;:{&#34;enabled&#34;:true},&#34;plotOptions&#34;:{&#34;series&#34;:{&#34;turboThreshold&#34;:0,&#34;showInLegend&#34;:false,&#34;marker&#34;:{&#34;enabled&#34;:true}},&#34;treemap&#34;:{&#34;layoutAlgorithm&#34;:&#34;squarified&#34;},&#34;bubble&#34;:{&#34;minSize&#34;:5,&#34;maxSize&#34;:25},&#34;scatter&#34;:{&#34;marker&#34;:{&#34;symbol&#34;:&#34;circle&#34;}}},&#34;annotationsOptions&#34;:{&#34;enabledButtons&#34;:false},&#34;tooltip&#34;:{&#34;delayForDisplay&#34;:10},&#34;series&#34;:[{&#34;group&#34;:&#34;group&#34;,&#34;data&#34;:[{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2007-02-01&#34;,&#34;employees&#34;:137582,&#34;monthly_change&#34;:85,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1170288000000,&#34;y&#34;:85,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2007-03-01&#34;,&#34;employees&#34;:137796,&#34;monthly_change&#34;:214,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1172707200000,&#34;y&#34;:214,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2007-04-01&#34;,&#34;employees&#34;:137855,&#34;monthly_change&#34;:59,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1175385600000,&#34;y&#34;:59,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2007-05-01&#34;,&#34;employees&#34;:138008,&#34;monthly_change&#34;:153,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1177977600000,&#34;y&#34;:153,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2007-06-01&#34;,&#34;employees&#34;:138085,&#34;monthly_change&#34;:77,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1180656000000,&#34;y&#34;:77,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2007-07-01&#34;,&#34;employees&#34;:138055,&#34;monthly_change&#34;:-30,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1183248000000,&#34;y&#34;:-30,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2007-08-01&#34;,&#34;employees&#34;:138027,&#34;monthly_change&#34;:-28,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1185926400000,&#34;y&#34;:-28,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2007-09-01&#34;,&#34;employees&#34;:138123,&#34;monthly_change&#34;:96,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1188604800000,&#34;y&#34;:96,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2007-10-01&#34;,&#34;employees&#34;:138201,&#34;monthly_change&#34;:78,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1191196800000,&#34;y&#34;:78,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2007-11-01&#34;,&#34;employees&#34;:138307,&#34;monthly_change&#34;:106,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1193875200000,&#34;y&#34;:106,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2007-12-01&#34;,&#34;employees&#34;:138411,&#34;monthly_change&#34;:104,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1196467200000,&#34;y&#34;:104,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2008-01-01&#34;,&#34;employees&#34;:138419,&#34;monthly_change&#34;:8,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1199145600000,&#34;y&#34;:8,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2008-02-01&#34;,&#34;employees&#34;:138338,&#34;monthly_change&#34;:-81,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1201824000000,&#34;y&#34;:-81,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2008-03-01&#34;,&#34;employees&#34;:138283,&#34;monthly_change&#34;:-55,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1204329600000,&#34;y&#34;:-55,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2008-04-01&#34;,&#34;employees&#34;:138054,&#34;monthly_change&#34;:-229,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1207008000000,&#34;y&#34;:-229,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2008-05-01&#34;,&#34;employees&#34;:137870,&#34;monthly_change&#34;:-184,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1209600000000,&#34;y&#34;:-184,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2008-06-01&#34;,&#34;employees&#34;:137716,&#34;monthly_change&#34;:-154,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1212278400000,&#34;y&#34;:-154,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2008-07-01&#34;,&#34;employees&#34;:137503,&#34;monthly_change&#34;:-213,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1214870400000,&#34;y&#34;:-213,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2008-08-01&#34;,&#34;employees&#34;:137226,&#34;monthly_change&#34;:-277,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1217548800000,&#34;y&#34;:-277,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2008-09-01&#34;,&#34;employees&#34;:136783,&#34;monthly_change&#34;:-443,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1220227200000,&#34;y&#34;:-443,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2008-10-01&#34;,&#34;employees&#34;:136308,&#34;monthly_change&#34;:-475,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1222819200000,&#34;y&#34;:-475,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2008-11-01&#34;,&#34;employees&#34;:135549,&#34;monthly_change&#34;:-759,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1225497600000,&#34;y&#34;:-759,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2008-12-01&#34;,&#34;employees&#34;:134842,&#34;monthly_change&#34;:-707,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1228089600000,&#34;y&#34;:-707,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2009-01-01&#34;,&#34;employees&#34;:134055,&#34;monthly_change&#34;:-787,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1230768000000,&#34;y&#34;:-787,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2009-02-01&#34;,&#34;employees&#34;:133351,&#34;monthly_change&#34;:-704,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1233446400000,&#34;y&#34;:-704,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2009-03-01&#34;,&#34;employees&#34;:132549,&#34;monthly_change&#34;:-802,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1235865600000,&#34;y&#34;:-802,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2009-04-01&#34;,&#34;employees&#34;:131845,&#34;monthly_change&#34;:-704,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1238544000000,&#34;y&#34;:-704,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2009-05-01&#34;,&#34;employees&#34;:131491,&#34;monthly_change&#34;:-354,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1241136000000,&#34;y&#34;:-354,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2009-06-01&#34;,&#34;employees&#34;:131022,&#34;monthly_change&#34;:-469,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1243814400000,&#34;y&#34;:-469,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2009-07-01&#34;,&#34;employees&#34;:130680,&#34;monthly_change&#34;:-342,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1246406400000,&#34;y&#34;:-342,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2009-08-01&#34;,&#34;employees&#34;:130484,&#34;monthly_change&#34;:-196,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1249084800000,&#34;y&#34;:-196,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2009-09-01&#34;,&#34;employees&#34;:130255,&#34;monthly_change&#34;:-229,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1251763200000,&#34;y&#34;:-229,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2009-10-01&#34;,&#34;employees&#34;:130046,&#34;monthly_change&#34;:-209,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1254355200000,&#34;y&#34;:-209,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2009-11-01&#34;,&#34;employees&#34;:130058,&#34;monthly_change&#34;:12,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1257033600000,&#34;y&#34;:12,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2009-12-01&#34;,&#34;employees&#34;:129781,&#34;monthly_change&#34;:-277,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1259625600000,&#34;y&#34;:-277,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2010-01-01&#34;,&#34;employees&#34;:129799,&#34;monthly_change&#34;:18,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1262304000000,&#34;y&#34;:18,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2010-02-01&#34;,&#34;employees&#34;:129726,&#34;monthly_change&#34;:-73,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1264982400000,&#34;y&#34;:-73,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2010-03-01&#34;,&#34;employees&#34;:129919,&#34;monthly_change&#34;:193,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1267401600000,&#34;y&#34;:193,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2010-04-01&#34;,&#34;employees&#34;:130140,&#34;monthly_change&#34;:221,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1270080000000,&#34;y&#34;:221,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2010-05-01&#34;,&#34;employees&#34;:130662,&#34;monthly_change&#34;:522,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1272672000000,&#34;y&#34;:522,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2010-06-01&#34;,&#34;employees&#34;:130522,&#34;monthly_change&#34;:-140,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1275350400000,&#34;y&#34;:-140,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2010-07-01&#34;,&#34;employees&#34;:130444,&#34;monthly_change&#34;:-78,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1277942400000,&#34;y&#34;:-78,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2010-08-01&#34;,&#34;employees&#34;:130428,&#34;monthly_change&#34;:-16,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1280620800000,&#34;y&#34;:-16,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2010-09-01&#34;,&#34;employees&#34;:130365,&#34;monthly_change&#34;:-63,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;x&#34;:1283299200000,&#34;y&#34;:-63,&#34;color&#34;:&#34;#ffe6ea&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2010-10-01&#34;,&#34;employees&#34;:130632,&#34;monthly_change&#34;:267,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1285891200000,&#34;y&#34;:267,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2010-11-01&#34;,&#34;employees&#34;:130761,&#34;monthly_change&#34;:129,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1288569600000,&#34;y&#34;:129,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2010-12-01&#34;,&#34;employees&#34;:130834,&#34;monthly_change&#34;:73,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1291161600000,&#34;y&#34;:73,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2011-01-01&#34;,&#34;employees&#34;:130878,&#34;monthly_change&#34;:44,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1293840000000,&#34;y&#34;:44,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2011-02-01&#34;,&#34;employees&#34;:131060,&#34;monthly_change&#34;:182,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1296518400000,&#34;y&#34;:182,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2011-03-01&#34;,&#34;employees&#34;:131314,&#34;monthly_change&#34;:254,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1298937600000,&#34;y&#34;:254,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2011-04-01&#34;,&#34;employees&#34;:131637,&#34;monthly_change&#34;:323,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1301616000000,&#34;y&#34;:323,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2011-05-01&#34;,&#34;employees&#34;:131718,&#34;monthly_change&#34;:81,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1304208000000,&#34;y&#34;:81,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2011-06-01&#34;,&#34;employees&#34;:131952,&#34;monthly_change&#34;:234,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1306886400000,&#34;y&#34;:234,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2011-07-01&#34;,&#34;employees&#34;:132024,&#34;monthly_change&#34;:72,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1309478400000,&#34;y&#34;:72,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2011-08-01&#34;,&#34;employees&#34;:132136,&#34;monthly_change&#34;:112,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1312156800000,&#34;y&#34;:112,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2011-09-01&#34;,&#34;employees&#34;:132369,&#34;monthly_change&#34;:233,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1314835200000,&#34;y&#34;:233,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2011-10-01&#34;,&#34;employees&#34;:132578,&#34;monthly_change&#34;:209,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1317427200000,&#34;y&#34;:209,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2011-11-01&#34;,&#34;employees&#34;:132723,&#34;monthly_change&#34;:145,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1320105600000,&#34;y&#34;:145,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2011-12-01&#34;,&#34;employees&#34;:132924,&#34;monthly_change&#34;:201,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1322697600000,&#34;y&#34;:201,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2012-01-01&#34;,&#34;employees&#34;:133272,&#34;monthly_change&#34;:348,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1325376000000,&#34;y&#34;:348,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2012-02-01&#34;,&#34;employees&#34;:133505,&#34;monthly_change&#34;:233,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1328054400000,&#34;y&#34;:233,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2012-03-01&#34;,&#34;employees&#34;:133769,&#34;monthly_change&#34;:264,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1330560000000,&#34;y&#34;:264,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2012-04-01&#34;,&#34;employees&#34;:133841,&#34;monthly_change&#34;:72,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1333238400000,&#34;y&#34;:72,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2012-05-01&#34;,&#34;employees&#34;:133958,&#34;monthly_change&#34;:117,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1335830400000,&#34;y&#34;:117,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2012-06-01&#34;,&#34;employees&#34;:134026,&#34;monthly_change&#34;:68,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1338508800000,&#34;y&#34;:68,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2012-07-01&#34;,&#34;employees&#34;:134182,&#34;monthly_change&#34;:156,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1341100800000,&#34;y&#34;:156,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2012-08-01&#34;,&#34;employees&#34;:134355,&#34;monthly_change&#34;:173,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1343779200000,&#34;y&#34;:173,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2012-09-01&#34;,&#34;employees&#34;:134549,&#34;monthly_change&#34;:194,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1346457600000,&#34;y&#34;:194,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2012-10-01&#34;,&#34;employees&#34;:134702,&#34;monthly_change&#34;:153,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1349049600000,&#34;y&#34;:153,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2012-11-01&#34;,&#34;employees&#34;:134832,&#34;monthly_change&#34;:130,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1351728000000,&#34;y&#34;:130,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2012-12-01&#34;,&#34;employees&#34;:135075,&#34;monthly_change&#34;:243,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1354320000000,&#34;y&#34;:243,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2013-01-01&#34;,&#34;employees&#34;:135282,&#34;monthly_change&#34;:207,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1356998400000,&#34;y&#34;:207,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2013-02-01&#34;,&#34;employees&#34;:135547,&#34;monthly_change&#34;:265,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1359676800000,&#34;y&#34;:265,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2013-03-01&#34;,&#34;employees&#34;:135703,&#34;monthly_change&#34;:156,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1362096000000,&#34;y&#34;:156,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2013-04-01&#34;,&#34;employees&#34;:135882,&#34;monthly_change&#34;:179,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1364774400000,&#34;y&#34;:179,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2013-05-01&#34;,&#34;employees&#34;:136122,&#34;monthly_change&#34;:240,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1367366400000,&#34;y&#34;:240,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2013-06-01&#34;,&#34;employees&#34;:136280,&#34;monthly_change&#34;:158,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1370044800000,&#34;y&#34;:158,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2013-07-01&#34;,&#34;employees&#34;:136391,&#34;monthly_change&#34;:111,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1372636800000,&#34;y&#34;:111,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2013-08-01&#34;,&#34;employees&#34;:136651,&#34;monthly_change&#34;:260,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1375315200000,&#34;y&#34;:260,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2013-09-01&#34;,&#34;employees&#34;:136852,&#34;monthly_change&#34;:201,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1377993600000,&#34;y&#34;:201,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2013-10-01&#34;,&#34;employees&#34;:137062,&#34;monthly_change&#34;:210,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1380585600000,&#34;y&#34;:210,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2013-11-01&#34;,&#34;employees&#34;:137283,&#34;monthly_change&#34;:221,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1383264000000,&#34;y&#34;:221,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2013-12-01&#34;,&#34;employees&#34;:137376,&#34;monthly_change&#34;:93,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1385856000000,&#34;y&#34;:93,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2014-01-01&#34;,&#34;employees&#34;:137550,&#34;monthly_change&#34;:174,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1388534400000,&#34;y&#34;:174,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2014-02-01&#34;,&#34;employees&#34;:137732,&#34;monthly_change&#34;:182,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1391212800000,&#34;y&#34;:182,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2014-03-01&#34;,&#34;employees&#34;:137993,&#34;monthly_change&#34;:261,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1393632000000,&#34;y&#34;:261,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2014-04-01&#34;,&#34;employees&#34;:138304,&#34;monthly_change&#34;:311,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1396310400000,&#34;y&#34;:311,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2014-05-01&#34;,&#34;employees&#34;:138556,&#34;monthly_change&#34;:252,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1398902400000,&#34;y&#34;:252,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2014-06-01&#34;,&#34;employees&#34;:138862,&#34;monthly_change&#34;:306,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1401580800000,&#34;y&#34;:306,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2014-07-01&#34;,&#34;employees&#34;:139058,&#34;monthly_change&#34;:196,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1404172800000,&#34;y&#34;:196,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2014-08-01&#34;,&#34;employees&#34;:139284,&#34;monthly_change&#34;:226,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1406851200000,&#34;y&#34;:226,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2014-09-01&#34;,&#34;employees&#34;:139568,&#34;monthly_change&#34;:284,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1409529600000,&#34;y&#34;:284,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2014-10-01&#34;,&#34;employees&#34;:139823,&#34;monthly_change&#34;:255,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1412121600000,&#34;y&#34;:255,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2014-11-01&#34;,&#34;employees&#34;:140130,&#34;monthly_change&#34;:307,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1414800000000,&#34;y&#34;:307,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2014-12-01&#34;,&#34;employees&#34;:140381,&#34;monthly_change&#34;:251,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1417392000000,&#34;y&#34;:251,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2015-01-01&#34;,&#34;employees&#34;:140592,&#34;monthly_change&#34;:211,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1420070400000,&#34;y&#34;:211,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2015-02-01&#34;,&#34;employees&#34;:140859,&#34;monthly_change&#34;:267,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1422748800000,&#34;y&#34;:267,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2015-03-01&#34;,&#34;employees&#34;:140937,&#34;monthly_change&#34;:78,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1425168000000,&#34;y&#34;:78,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2015-04-01&#34;,&#34;employees&#34;:141219,&#34;monthly_change&#34;:282,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1427846400000,&#34;y&#34;:282,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2015-05-01&#34;,&#34;employees&#34;:141545,&#34;monthly_change&#34;:326,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1430438400000,&#34;y&#34;:326,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2015-06-01&#34;,&#34;employees&#34;:141736,&#34;monthly_change&#34;:191,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1433116800000,&#34;y&#34;:191,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2015-07-01&#34;,&#34;employees&#34;:141992,&#34;monthly_change&#34;:256,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1435708800000,&#34;y&#34;:256,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2015-08-01&#34;,&#34;employees&#34;:142156,&#34;monthly_change&#34;:164,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1438387200000,&#34;y&#34;:164,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2015-09-01&#34;,&#34;employees&#34;:142244,&#34;monthly_change&#34;:88,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1441065600000,&#34;y&#34;:88,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2015-10-01&#34;,&#34;employees&#34;:142595,&#34;monthly_change&#34;:351,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1443657600000,&#34;y&#34;:351,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2015-11-01&#34;,&#34;employees&#34;:142859,&#34;monthly_change&#34;:264,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1446336000000,&#34;y&#34;:264,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2015-12-01&#34;,&#34;employees&#34;:143093,&#34;monthly_change&#34;:234,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1448928000000,&#34;y&#34;:234,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2016-01-01&#34;,&#34;employees&#34;:143196,&#34;monthly_change&#34;:103,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1451606400000,&#34;y&#34;:103,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2016-02-01&#34;,&#34;employees&#34;:143453,&#34;monthly_change&#34;:257,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1454284800000,&#34;y&#34;:257,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2016-03-01&#34;,&#34;employees&#34;:143688,&#34;monthly_change&#34;:235,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1456790400000,&#34;y&#34;:235,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2016-04-01&#34;,&#34;employees&#34;:143862,&#34;monthly_change&#34;:174,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1459468800000,&#34;y&#34;:174,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2016-05-01&#34;,&#34;employees&#34;:143896,&#34;monthly_change&#34;:34,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1462060800000,&#34;y&#34;:34,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2016-06-01&#34;,&#34;employees&#34;:144181,&#34;monthly_change&#34;:285,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1464739200000,&#34;y&#34;:285,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2016-07-01&#34;,&#34;employees&#34;:144506,&#34;monthly_change&#34;:325,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1467331200000,&#34;y&#34;:325,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2016-08-01&#34;,&#34;employees&#34;:144681,&#34;monthly_change&#34;:175,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1470009600000,&#34;y&#34;:175,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2016-09-01&#34;,&#34;employees&#34;:144945,&#34;monthly_change&#34;:264,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1472688000000,&#34;y&#34;:264,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2016-10-01&#34;,&#34;employees&#34;:145085,&#34;monthly_change&#34;:140,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1475280000000,&#34;y&#34;:140,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2016-11-01&#34;,&#34;employees&#34;:145257,&#34;monthly_change&#34;:172,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1477958400000,&#34;y&#34;:172,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2016-12-01&#34;,&#34;employees&#34;:145437,&#34;monthly_change&#34;:180,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1480550400000,&#34;y&#34;:180,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-01-01&#34;,&#34;employees&#34;:145696,&#34;monthly_change&#34;:259,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1483228800000,&#34;y&#34;:259,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-02-01&#34;,&#34;employees&#34;:145896,&#34;monthly_change&#34;:200,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1485907200000,&#34;y&#34;:200,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-03-01&#34;,&#34;employees&#34;:145969,&#34;monthly_change&#34;:73,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1488326400000,&#34;y&#34;:73,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-04-01&#34;,&#34;employees&#34;:146144,&#34;monthly_change&#34;:175,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1491004800000,&#34;y&#34;:175,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-05-01&#34;,&#34;employees&#34;:146299,&#34;monthly_change&#34;:155,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1493596800000,&#34;y&#34;:155,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-06-01&#34;,&#34;employees&#34;:146538,&#34;monthly_change&#34;:239,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1496275200000,&#34;y&#34;:239,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-07-01&#34;,&#34;employees&#34;:146728,&#34;monthly_change&#34;:190,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1498867200000,&#34;y&#34;:190,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-08-01&#34;,&#34;employees&#34;:146949,&#34;monthly_change&#34;:221,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1501545600000,&#34;y&#34;:221,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-09-01&#34;,&#34;employees&#34;:146963,&#34;monthly_change&#34;:14,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1504224000000,&#34;y&#34;:14,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-10-01&#34;,&#34;employees&#34;:147234,&#34;monthly_change&#34;:271,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1506816000000,&#34;y&#34;:271,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-11-01&#34;,&#34;employees&#34;:147450,&#34;monthly_change&#34;:216,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1509494400000,&#34;y&#34;:216,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-12-01&#34;,&#34;employees&#34;:147625,&#34;monthly_change&#34;:175,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1512086400000,&#34;y&#34;:175,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-01-01&#34;,&#34;employees&#34;:147801,&#34;monthly_change&#34;:176,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1514764800000,&#34;y&#34;:176,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-02-01&#34;,&#34;employees&#34;:148125,&#34;monthly_change&#34;:324,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1517443200000,&#34;y&#34;:324,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-03-01&#34;,&#34;employees&#34;:148280,&#34;monthly_change&#34;:155,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1519862400000,&#34;y&#34;:155,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-04-01&#34;,&#34;employees&#34;:148455,&#34;monthly_change&#34;:175,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1522540800000,&#34;y&#34;:175,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-05-01&#34;,&#34;employees&#34;:148723,&#34;monthly_change&#34;:268,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1525132800000,&#34;y&#34;:268,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-06-01&#34;,&#34;employees&#34;:148971,&#34;monthly_change&#34;:248,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1527811200000,&#34;y&#34;:248,&#34;color&#34;:&#34;#6495ed&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:149128,&#34;monthly_change&#34;:157,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;x&#34;:1530403200000,&#34;y&#34;:157,&#34;color&#34;:&#34;#6495ed&#34;}],&#34;type&#34;:&#34;column&#34;,&#34;pointWidth&#34;:5,&#34;name&#34;:&#34;monthly change&#34;}],&#34;xAxis&#34;:{&#34;type&#34;:&#34;datetime&#34;,&#34;title&#34;:{&#34;text&#34;:&#34;date&#34;}}},&#34;theme&#34;:{&#34;chart&#34;:{&#34;backgroundColor&#34;:&#34;transparent&#34;}},&#34;conf_opts&#34;:{&#34;global&#34;:{&#34;Date&#34;:null,&#34;VMLRadialGradientURL&#34;:&#34;http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png&#34;,&#34;canvasToolsURL&#34;:&#34;http =//code.highcharts.com/list(version)/modules/canvas-tools.js&#34;,&#34;getTimezoneOffset&#34;:null,&#34;timezoneOffset&#34;:0,&#34;useUTC&#34;:true},&#34;lang&#34;:{&#34;contextButtonTitle&#34;:&#34;Chart context menu&#34;,&#34;decimalPoint&#34;:&#34;.&#34;,&#34;downloadJPEG&#34;:&#34;Download JPEG image&#34;,&#34;downloadPDF&#34;:&#34;Download PDF document&#34;,&#34;downloadPNG&#34;:&#34;Download PNG image&#34;,&#34;downloadSVG&#34;:&#34;Download SVG vector image&#34;,&#34;drillUpText&#34;:&#34;Back to {series.name}&#34;,&#34;invalidDate&#34;:null,&#34;loading&#34;:&#34;Loading...&#34;,&#34;months&#34;:[&#34;January&#34;,&#34;February&#34;,&#34;March&#34;,&#34;April&#34;,&#34;May&#34;,&#34;June&#34;,&#34;July&#34;,&#34;August&#34;,&#34;September&#34;,&#34;October&#34;,&#34;November&#34;,&#34;December&#34;],&#34;noData&#34;:&#34;No data to display&#34;,&#34;numericSymbols&#34;:[&#34;k&#34;,&#34;M&#34;,&#34;G&#34;,&#34;T&#34;,&#34;P&#34;,&#34;E&#34;],&#34;printChart&#34;:&#34;Print chart&#34;,&#34;resetZoom&#34;:&#34;Reset zoom&#34;,&#34;resetZoomTitle&#34;:&#34;Reset zoom level 1:1&#34;,&#34;shortMonths&#34;:[&#34;Jan&#34;,&#34;Feb&#34;,&#34;Mar&#34;,&#34;Apr&#34;,&#34;May&#34;,&#34;Jun&#34;,&#34;Jul&#34;,&#34;Aug&#34;,&#34;Sep&#34;,&#34;Oct&#34;,&#34;Nov&#34;,&#34;Dec&#34;],&#34;thousandsSep&#34;:&#34; &#34;,&#34;weekdays&#34;:[&#34;Sunday&#34;,&#34;Monday&#34;,&#34;Tuesday&#34;,&#34;Wednesday&#34;,&#34;Thursday&#34;,&#34;Friday&#34;,&#34;Saturday&#34;]}},&#34;type&#34;:&#34;chart&#34;,&#34;fonts&#34;:[],&#34;debug&#34;:false},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt;Let’s stay in the &lt;code&gt;highcharter&lt;/code&gt; world and visualize how each sector changed in the most recent month, which is July of 2018.&lt;/p&gt;
&lt;p&gt;First, we isolate the most recent month by filtering on the last date. We also don’t want the ADP Estimate and filter that out as well.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;empl_monthly_change %&amp;gt;% 
filter(date == (last(date))) %&amp;gt;%
filter(sector != &amp;quot;ADP Estimate&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 14 x 4
# Groups:   sector [14]
   sector             date       employees monthly_change
   &amp;lt;chr&amp;gt;              &amp;lt;date&amp;gt;         &amp;lt;dbl&amp;gt;          &amp;lt;dbl&amp;gt;
 1 Nonfarm Employment 2018-07-01   149128           157  
 2 Construction       2018-07-01     7242            19  
 3 Retail/Trade       2018-07-01    15944             7.1
 4 Prof/Bus Serv      2018-07-01    21019            51  
 5 Manufact           2018-07-01    12751            37  
 6 Financial          2018-07-01     8568            -5  
 7 Mining             2018-07-01      735            -4  
 8 Health Care        2018-07-01    23662            22  
 9 Wholesale Trade    2018-07-01     5982.           12.3
10 Transportation     2018-07-01    27801            15  
11 Info Sys           2018-07-01     2772             0  
12 Leisure            2018-07-01    16371            40  
13 Gov                2018-07-01    22334           -13  
14 Other Services     2018-07-01     5873            -5  &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That filtered flow has the data we want, but we have two more tasks. First, we want to &lt;code&gt;arrange&lt;/code&gt; this data so that it goes from smallest to largest. If we did not do this, our chart would still “work”, but the column heights would not progress from lowest to highest.&lt;/p&gt;
&lt;p&gt;Second, we need to create another column to hold colors for negative and positive values, with the same &lt;code&gt;ifelse()&lt;/code&gt; logic as we used before.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;emp_by_sector_recent_month &amp;lt;- 
  empl_monthly_change  %&amp;gt;% 
  filter(date == (last(date))) %&amp;gt;%
  filter(sector != &amp;quot;ADP Estimate&amp;quot;) %&amp;gt;% 
  arrange(monthly_change) %&amp;gt;% 
  mutate(color_of_bars = if_else(monthly_change &amp;gt; 0, &amp;quot;#6495ed&amp;quot;, &amp;quot;#ffe6ea&amp;quot;))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now we pass that object to &lt;code&gt;hchart&lt;/code&gt;, set &lt;code&gt;type = &amp;quot;column&amp;quot;&lt;/code&gt;, and choose our &lt;code&gt;hcaes&lt;/code&gt; values. We want to label the x-axis with the different sectors and do that with &lt;code&gt;hc_xAxis(categories = emp_by_sector_recent_month$sector)&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;last_month &amp;lt;- lubridate::month(last(empl_monthly_change$date),
                                 label = TRUE, 
                                 abbr = FALSE)

hchart(emp_by_sector_recent_month,  
                type = &amp;quot;column&amp;quot;, 
                pointWidth = 20,
                hcaes(x = sector,
                      y = monthly_change,
                      color = color_of_bars),
                showInLegend = FALSE) %&amp;gt;% 
  hc_title(text = paste(last_month, &amp;quot;Employment Change&amp;quot;, sep = &amp;quot; &amp;quot;)) %&amp;gt;%
  hc_xAxis(categories = emp_by_sector_recent_month$sector) %&amp;gt;%
  hc_yAxis(title = list(text = &amp;quot;Monthly Change (thousands)&amp;quot;))&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-2&#34; style=&#34;width:100%;height:500px;&#34; class=&#34;highchart html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-2&#34;&gt;{&#34;x&#34;:{&#34;hc_opts&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;July Employment Change&#34;},&#34;yAxis&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;Monthly Change (thousands)&#34;},&#34;type&#34;:&#34;linear&#34;},&#34;credits&#34;:{&#34;enabled&#34;:false},&#34;exporting&#34;:{&#34;enabled&#34;:false},&#34;plotOptions&#34;:{&#34;series&#34;:{&#34;turboThreshold&#34;:0,&#34;showInLegend&#34;:false,&#34;marker&#34;:{&#34;enabled&#34;:true}},&#34;treemap&#34;:{&#34;layoutAlgorithm&#34;:&#34;squarified&#34;},&#34;bubble&#34;:{&#34;minSize&#34;:5,&#34;maxSize&#34;:25},&#34;scatter&#34;:{&#34;marker&#34;:{&#34;symbol&#34;:&#34;circle&#34;}}},&#34;annotationsOptions&#34;:{&#34;enabledButtons&#34;:false},&#34;tooltip&#34;:{&#34;delayForDisplay&#34;:10},&#34;series&#34;:[{&#34;group&#34;:&#34;group&#34;,&#34;data&#34;:[{&#34;sector&#34;:&#34;Gov&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:22334,&#34;monthly_change&#34;:-13,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;y&#34;:-13,&#34;color&#34;:&#34;#ffe6ea&#34;,&#34;name&#34;:&#34;Gov&#34;},{&#34;sector&#34;:&#34;Financial&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:8568,&#34;monthly_change&#34;:-5,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;y&#34;:-5,&#34;color&#34;:&#34;#ffe6ea&#34;,&#34;name&#34;:&#34;Financial&#34;},{&#34;sector&#34;:&#34;Other Services&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:5873,&#34;monthly_change&#34;:-5,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;y&#34;:-5,&#34;color&#34;:&#34;#ffe6ea&#34;,&#34;name&#34;:&#34;Other Services&#34;},{&#34;sector&#34;:&#34;Mining&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:735,&#34;monthly_change&#34;:-4,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;y&#34;:-4,&#34;color&#34;:&#34;#ffe6ea&#34;,&#34;name&#34;:&#34;Mining&#34;},{&#34;sector&#34;:&#34;Info Sys&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:2772,&#34;monthly_change&#34;:0,&#34;color_of_bars&#34;:&#34;#ffe6ea&#34;,&#34;y&#34;:0,&#34;color&#34;:&#34;#ffe6ea&#34;,&#34;name&#34;:&#34;Info Sys&#34;},{&#34;sector&#34;:&#34;Retail/Trade&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:15944,&#34;monthly_change&#34;:7.10000000000036,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;y&#34;:7.10000000000036,&#34;color&#34;:&#34;#6495ed&#34;,&#34;name&#34;:&#34;Retail/Trade&#34;},{&#34;sector&#34;:&#34;Wholesale Trade&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:5981.5,&#34;monthly_change&#34;:12.3000000000002,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;y&#34;:12.3000000000002,&#34;color&#34;:&#34;#6495ed&#34;,&#34;name&#34;:&#34;Wholesale Trade&#34;},{&#34;sector&#34;:&#34;Transportation&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:27801,&#34;monthly_change&#34;:15,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;y&#34;:15,&#34;color&#34;:&#34;#6495ed&#34;,&#34;name&#34;:&#34;Transportation&#34;},{&#34;sector&#34;:&#34;Construction&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:7242,&#34;monthly_change&#34;:19,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;y&#34;:19,&#34;color&#34;:&#34;#6495ed&#34;,&#34;name&#34;:&#34;Construction&#34;},{&#34;sector&#34;:&#34;Health Care&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:23662,&#34;monthly_change&#34;:22,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;y&#34;:22,&#34;color&#34;:&#34;#6495ed&#34;,&#34;name&#34;:&#34;Health Care&#34;},{&#34;sector&#34;:&#34;Manufact&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:12751,&#34;monthly_change&#34;:37,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;y&#34;:37,&#34;color&#34;:&#34;#6495ed&#34;,&#34;name&#34;:&#34;Manufact&#34;},{&#34;sector&#34;:&#34;Leisure&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:16371,&#34;monthly_change&#34;:40,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;y&#34;:40,&#34;color&#34;:&#34;#6495ed&#34;,&#34;name&#34;:&#34;Leisure&#34;},{&#34;sector&#34;:&#34;Prof/Bus Serv&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:21019,&#34;monthly_change&#34;:51,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;y&#34;:51,&#34;color&#34;:&#34;#6495ed&#34;,&#34;name&#34;:&#34;Prof/Bus Serv&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:149128,&#34;monthly_change&#34;:157,&#34;color_of_bars&#34;:&#34;#6495ed&#34;,&#34;y&#34;:157,&#34;color&#34;:&#34;#6495ed&#34;,&#34;name&#34;:&#34;Nonfarm Employment&#34;}],&#34;type&#34;:&#34;column&#34;,&#34;pointWidth&#34;:20,&#34;showInLegend&#34;:false}],&#34;xAxis&#34;:{&#34;type&#34;:&#34;category&#34;,&#34;title&#34;:{&#34;text&#34;:&#34;sector&#34;},&#34;categories&#34;:[&#34;Gov&#34;,&#34;Financial&#34;,&#34;Other Services&#34;,&#34;Mining&#34;,&#34;Info Sys&#34;,&#34;Retail/Trade&#34;,&#34;Wholesale Trade&#34;,&#34;Transportation&#34;,&#34;Construction&#34;,&#34;Health Care&#34;,&#34;Manufact&#34;,&#34;Leisure&#34;,&#34;Prof/Bus Serv&#34;,&#34;Nonfarm Employment&#34;]}},&#34;theme&#34;:{&#34;chart&#34;:{&#34;backgroundColor&#34;:&#34;transparent&#34;}},&#34;conf_opts&#34;:{&#34;global&#34;:{&#34;Date&#34;:null,&#34;VMLRadialGradientURL&#34;:&#34;http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png&#34;,&#34;canvasToolsURL&#34;:&#34;http =//code.highcharts.com/list(version)/modules/canvas-tools.js&#34;,&#34;getTimezoneOffset&#34;:null,&#34;timezoneOffset&#34;:0,&#34;useUTC&#34;:true},&#34;lang&#34;:{&#34;contextButtonTitle&#34;:&#34;Chart context menu&#34;,&#34;decimalPoint&#34;:&#34;.&#34;,&#34;downloadJPEG&#34;:&#34;Download JPEG image&#34;,&#34;downloadPDF&#34;:&#34;Download PDF document&#34;,&#34;downloadPNG&#34;:&#34;Download PNG image&#34;,&#34;downloadSVG&#34;:&#34;Download SVG vector image&#34;,&#34;drillUpText&#34;:&#34;Back to {series.name}&#34;,&#34;invalidDate&#34;:null,&#34;loading&#34;:&#34;Loading...&#34;,&#34;months&#34;:[&#34;January&#34;,&#34;February&#34;,&#34;March&#34;,&#34;April&#34;,&#34;May&#34;,&#34;June&#34;,&#34;July&#34;,&#34;August&#34;,&#34;September&#34;,&#34;October&#34;,&#34;November&#34;,&#34;December&#34;],&#34;noData&#34;:&#34;No data to display&#34;,&#34;numericSymbols&#34;:[&#34;k&#34;,&#34;M&#34;,&#34;G&#34;,&#34;T&#34;,&#34;P&#34;,&#34;E&#34;],&#34;printChart&#34;:&#34;Print chart&#34;,&#34;resetZoom&#34;:&#34;Reset zoom&#34;,&#34;resetZoomTitle&#34;:&#34;Reset zoom level 1:1&#34;,&#34;shortMonths&#34;:[&#34;Jan&#34;,&#34;Feb&#34;,&#34;Mar&#34;,&#34;Apr&#34;,&#34;May&#34;,&#34;Jun&#34;,&#34;Jul&#34;,&#34;Aug&#34;,&#34;Sep&#34;,&#34;Oct&#34;,&#34;Nov&#34;,&#34;Dec&#34;],&#34;thousandsSep&#34;:&#34; &#34;,&#34;weekdays&#34;:[&#34;Sunday&#34;,&#34;Monday&#34;,&#34;Tuesday&#34;,&#34;Wednesday&#34;,&#34;Thursday&#34;,&#34;Friday&#34;,&#34;Saturday&#34;]}},&#34;type&#34;:&#34;chart&#34;,&#34;fonts&#34;:[],&#34;debug&#34;:false},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt;Finally, let’s compare the ADP Estimates to the actual Nonfarm payroll numbers since 2017. We start with filtering again.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;adp_bls_hc &amp;lt;- 
  empl_monthly_change %&amp;gt;% 
  filter(sector == &amp;quot;ADP Estimate&amp;quot; | sector == &amp;quot;Nonfarm Employment&amp;quot;) %&amp;gt;% 
  filter(date &amp;gt;= &amp;quot;2017-01-01&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We create a column to hold different colors, but our logic is not whether a reading is positive or negative. We want to color the ADP and BLS reports differently.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;adp_bls_hc &amp;lt;- 
  adp_bls_hc %&amp;gt;% 
  mutate(color_of_bars = 
           ifelse(sector == &amp;quot;ADP Estimate&amp;quot;, &amp;quot;#ffb3b3&amp;quot;, &amp;quot;#4d94ff&amp;quot;))

head(adp_bls_hc)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 6 x 5
# Groups:   sector [1]
  sector       date       employees monthly_change color_of_bars
  &amp;lt;chr&amp;gt;        &amp;lt;date&amp;gt;         &amp;lt;dbl&amp;gt;          &amp;lt;dbl&amp;gt; &amp;lt;chr&amp;gt;        
1 ADP Estimate 2017-01-01   123253.           245. #ffb3b3      
2 ADP Estimate 2017-02-01   123533.           280. #ffb3b3      
3 ADP Estimate 2017-03-01   123655            122. #ffb3b3      
4 ADP Estimate 2017-04-01   123810.           155. #ffb3b3      
5 ADP Estimate 2017-05-01   124012.           202. #ffb3b3      
6 ADP Estimate 2017-06-01   124166.           154. #ffb3b3      &lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;tail(adp_bls_hc)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# A tibble: 6 x 5
# Groups:   sector [1]
  sector             date       employees monthly_change color_of_bars
  &amp;lt;chr&amp;gt;              &amp;lt;date&amp;gt;         &amp;lt;dbl&amp;gt;          &amp;lt;dbl&amp;gt; &amp;lt;chr&amp;gt;        
1 Nonfarm Employment 2018-02-01    148125            324 #4d94ff      
2 Nonfarm Employment 2018-03-01    148280            155 #4d94ff      
3 Nonfarm Employment 2018-04-01    148455            175 #4d94ff      
4 Nonfarm Employment 2018-05-01    148723            268 #4d94ff      
5 Nonfarm Employment 2018-06-01    148971            248 #4d94ff      
6 Nonfarm Employment 2018-07-01    149128            157 #4d94ff      &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And now we pass that object to our familiar &lt;code&gt;hchart&lt;/code&gt; flow.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;hchart(adp_bls_hc, 
       type = &amp;#39;column&amp;#39;, 
       hcaes(y = monthly_change,
             x = date,
             group = sector, 
             color = color_of_bars),
       showInLegend = FALSE
       ) %&amp;gt;% 
  hc_title(text = &amp;quot;ADP v. BLS&amp;quot;) %&amp;gt;%
  hc_xAxis(type = &amp;quot;datetime&amp;quot;) %&amp;gt;%
  hc_yAxis(title = list(text = &amp;quot;monthly change (thousands)&amp;quot;)) %&amp;gt;%
  hc_add_theme(hc_theme_flat()) %&amp;gt;%
  hc_exporting(enabled = TRUE)&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-3&#34; style=&#34;width:100%;height:500px;&#34; class=&#34;highchart html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-3&#34;&gt;{&#34;x&#34;:{&#34;hc_opts&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;ADP v. BLS&#34;},&#34;yAxis&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;monthly change (thousands)&#34;},&#34;type&#34;:&#34;linear&#34;},&#34;credits&#34;:{&#34;enabled&#34;:false},&#34;exporting&#34;:{&#34;enabled&#34;:true},&#34;plotOptions&#34;:{&#34;series&#34;:{&#34;turboThreshold&#34;:0,&#34;showInLegend&#34;:true,&#34;marker&#34;:{&#34;enabled&#34;:true}},&#34;treemap&#34;:{&#34;layoutAlgorithm&#34;:&#34;squarified&#34;},&#34;bubble&#34;:{&#34;minSize&#34;:5,&#34;maxSize&#34;:25},&#34;scatter&#34;:{&#34;marker&#34;:{&#34;symbol&#34;:&#34;circle&#34;}}},&#34;annotationsOptions&#34;:{&#34;enabledButtons&#34;:false},&#34;tooltip&#34;:{&#34;delayForDisplay&#34;:10},&#34;series&#34;:[{&#34;name&#34;:&#34;ADP Estimate&#34;,&#34;data&#34;:[{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2017-01-01&#34;,&#34;employees&#34;:123252.682,&#34;monthly_change&#34;:245.051999999996,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1483228800000,&#34;y&#34;:245.051999999996,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2017-02-01&#34;,&#34;employees&#34;:123532.62,&#34;monthly_change&#34;:279.937999999995,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1485907200000,&#34;y&#34;:279.937999999995,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2017-03-01&#34;,&#34;employees&#34;:123655,&#34;monthly_change&#34;:122.380000000005,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1488326400000,&#34;y&#34;:122.380000000005,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2017-04-01&#34;,&#34;employees&#34;:123810.373,&#34;monthly_change&#34;:155.373000000007,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1491004800000,&#34;y&#34;:155.373000000007,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2017-05-01&#34;,&#34;employees&#34;:124012.451,&#34;monthly_change&#34;:202.077999999994,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1493596800000,&#34;y&#34;:202.077999999994,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2017-06-01&#34;,&#34;employees&#34;:124166.035,&#34;monthly_change&#34;:153.584000000003,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1496275200000,&#34;y&#34;:153.584000000003,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2017-07-01&#34;,&#34;employees&#34;:124368.583,&#34;monthly_change&#34;:202.547999999995,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1498867200000,&#34;y&#34;:202.547999999995,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2017-08-01&#34;,&#34;employees&#34;:124538.23,&#34;monthly_change&#34;:169.646999999997,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1501545600000,&#34;y&#34;:169.646999999997,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2017-09-01&#34;,&#34;employees&#34;:124621.918,&#34;monthly_change&#34;:83.6880000000092,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1504224000000,&#34;y&#34;:83.6880000000092,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2017-10-01&#34;,&#34;employees&#34;:124783.074,&#34;monthly_change&#34;:161.155999999988,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1506816000000,&#34;y&#34;:161.155999999988,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2017-11-01&#34;,&#34;employees&#34;:124983.136,&#34;monthly_change&#34;:200.062000000005,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1509494400000,&#34;y&#34;:200.062000000005,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2017-12-01&#34;,&#34;employees&#34;:125232.605,&#34;monthly_change&#34;:249.468999999997,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1512086400000,&#34;y&#34;:249.468999999997,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2018-01-01&#34;,&#34;employees&#34;:125473.964,&#34;monthly_change&#34;:241.359000000011,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1514764800000,&#34;y&#34;:241.359000000011,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2018-02-01&#34;,&#34;employees&#34;:125714.734,&#34;monthly_change&#34;:240.76999999999,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1517443200000,&#34;y&#34;:240.76999999999,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2018-03-01&#34;,&#34;employees&#34;:125913.201,&#34;monthly_change&#34;:198.467000000004,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1519862400000,&#34;y&#34;:198.467000000004,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2018-04-01&#34;,&#34;employees&#34;:126083.325,&#34;monthly_change&#34;:170.123999999996,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1522540800000,&#34;y&#34;:170.123999999996,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2018-05-01&#34;,&#34;employees&#34;:126279.638,&#34;monthly_change&#34;:196.313000000009,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1525132800000,&#34;y&#34;:196.313000000009,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2018-06-01&#34;,&#34;employees&#34;:126460.542,&#34;monthly_change&#34;:180.903999999995,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1527811200000,&#34;y&#34;:180.903999999995,&#34;color&#34;:&#34;#ffb3b3&#34;},{&#34;sector&#34;:&#34;ADP Estimate&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:126679.56,&#34;monthly_change&#34;:219.017999999996,&#34;color_of_bars&#34;:&#34;#ffb3b3&#34;,&#34;x&#34;:1530403200000,&#34;y&#34;:219.017999999996,&#34;color&#34;:&#34;#ffb3b3&#34;}],&#34;type&#34;:&#34;column&#34;,&#34;showInLegend&#34;:false},{&#34;name&#34;:&#34;Nonfarm Employment&#34;,&#34;data&#34;:[{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-01-01&#34;,&#34;employees&#34;:145696,&#34;monthly_change&#34;:259,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1483228800000,&#34;y&#34;:259,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-02-01&#34;,&#34;employees&#34;:145896,&#34;monthly_change&#34;:200,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1485907200000,&#34;y&#34;:200,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-03-01&#34;,&#34;employees&#34;:145969,&#34;monthly_change&#34;:73,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1488326400000,&#34;y&#34;:73,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-04-01&#34;,&#34;employees&#34;:146144,&#34;monthly_change&#34;:175,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1491004800000,&#34;y&#34;:175,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-05-01&#34;,&#34;employees&#34;:146299,&#34;monthly_change&#34;:155,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1493596800000,&#34;y&#34;:155,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-06-01&#34;,&#34;employees&#34;:146538,&#34;monthly_change&#34;:239,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1496275200000,&#34;y&#34;:239,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-07-01&#34;,&#34;employees&#34;:146728,&#34;monthly_change&#34;:190,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1498867200000,&#34;y&#34;:190,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-08-01&#34;,&#34;employees&#34;:146949,&#34;monthly_change&#34;:221,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1501545600000,&#34;y&#34;:221,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-09-01&#34;,&#34;employees&#34;:146963,&#34;monthly_change&#34;:14,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1504224000000,&#34;y&#34;:14,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-10-01&#34;,&#34;employees&#34;:147234,&#34;monthly_change&#34;:271,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1506816000000,&#34;y&#34;:271,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-11-01&#34;,&#34;employees&#34;:147450,&#34;monthly_change&#34;:216,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1509494400000,&#34;y&#34;:216,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2017-12-01&#34;,&#34;employees&#34;:147625,&#34;monthly_change&#34;:175,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1512086400000,&#34;y&#34;:175,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-01-01&#34;,&#34;employees&#34;:147801,&#34;monthly_change&#34;:176,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1514764800000,&#34;y&#34;:176,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-02-01&#34;,&#34;employees&#34;:148125,&#34;monthly_change&#34;:324,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1517443200000,&#34;y&#34;:324,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-03-01&#34;,&#34;employees&#34;:148280,&#34;monthly_change&#34;:155,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1519862400000,&#34;y&#34;:155,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-04-01&#34;,&#34;employees&#34;:148455,&#34;monthly_change&#34;:175,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1522540800000,&#34;y&#34;:175,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-05-01&#34;,&#34;employees&#34;:148723,&#34;monthly_change&#34;:268,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1525132800000,&#34;y&#34;:268,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-06-01&#34;,&#34;employees&#34;:148971,&#34;monthly_change&#34;:248,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1527811200000,&#34;y&#34;:248,&#34;color&#34;:&#34;#4d94ff&#34;},{&#34;sector&#34;:&#34;Nonfarm Employment&#34;,&#34;date&#34;:&#34;2018-07-01&#34;,&#34;employees&#34;:149128,&#34;monthly_change&#34;:157,&#34;color_of_bars&#34;:&#34;#4d94ff&#34;,&#34;x&#34;:1530403200000,&#34;y&#34;:157,&#34;color&#34;:&#34;#4d94ff&#34;}],&#34;type&#34;:&#34;column&#34;,&#34;showInLegend&#34;:false}],&#34;xAxis&#34;:{&#34;type&#34;:&#34;datetime&#34;,&#34;title&#34;:{&#34;text&#34;:&#34;date&#34;}}},&#34;theme&#34;:{&#34;colors&#34;:[&#34;#f1c40f&#34;,&#34;#2ecc71&#34;,&#34;#9b59b6&#34;,&#34;#e74c3c&#34;,&#34;#34495e&#34;,&#34;#3498db&#34;,&#34;#1abc9c&#34;,&#34;#f39c12&#34;,&#34;#d35400&#34;],&#34;chart&#34;:{&#34;backgroundColor&#34;:&#34;#ECF0F1&#34;},&#34;xAxis&#34;:{&#34;gridLineDashStyle&#34;:&#34;Dash&#34;,&#34;gridLineWidth&#34;:1,&#34;gridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;lineColor&#34;:&#34;#BDC3C7&#34;,&#34;minorGridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;tickColor&#34;:&#34;#BDC3C7&#34;,&#34;tickWidth&#34;:1},&#34;yAxis&#34;:{&#34;gridLineDashStyle&#34;:&#34;Dash&#34;,&#34;gridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;lineColor&#34;:&#34;#BDC3C7&#34;,&#34;minorGridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;tickColor&#34;:&#34;#BDC3C7&#34;,&#34;tickWidth&#34;:1},&#34;legendBackgroundColor&#34;:&#34;rgba(0, 0, 0, 0.5)&#34;,&#34;background2&#34;:&#34;#505053&#34;,&#34;dataLabelsColor&#34;:&#34;#B0B0B3&#34;,&#34;textColor&#34;:&#34;#34495e&#34;,&#34;contrastTextColor&#34;:&#34;#F0F0F3&#34;,&#34;maskColor&#34;:&#34;rgba(255,255,255,0.3)&#34;},&#34;conf_opts&#34;:{&#34;global&#34;:{&#34;Date&#34;:null,&#34;VMLRadialGradientURL&#34;:&#34;http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png&#34;,&#34;canvasToolsURL&#34;:&#34;http =//code.highcharts.com/list(version)/modules/canvas-tools.js&#34;,&#34;getTimezoneOffset&#34;:null,&#34;timezoneOffset&#34;:0,&#34;useUTC&#34;:true},&#34;lang&#34;:{&#34;contextButtonTitle&#34;:&#34;Chart context menu&#34;,&#34;decimalPoint&#34;:&#34;.&#34;,&#34;downloadJPEG&#34;:&#34;Download JPEG image&#34;,&#34;downloadPDF&#34;:&#34;Download PDF document&#34;,&#34;downloadPNG&#34;:&#34;Download PNG image&#34;,&#34;downloadSVG&#34;:&#34;Download SVG vector image&#34;,&#34;drillUpText&#34;:&#34;Back to {series.name}&#34;,&#34;invalidDate&#34;:null,&#34;loading&#34;:&#34;Loading...&#34;,&#34;months&#34;:[&#34;January&#34;,&#34;February&#34;,&#34;March&#34;,&#34;April&#34;,&#34;May&#34;,&#34;June&#34;,&#34;July&#34;,&#34;August&#34;,&#34;September&#34;,&#34;October&#34;,&#34;November&#34;,&#34;December&#34;],&#34;noData&#34;:&#34;No data to display&#34;,&#34;numericSymbols&#34;:[&#34;k&#34;,&#34;M&#34;,&#34;G&#34;,&#34;T&#34;,&#34;P&#34;,&#34;E&#34;],&#34;printChart&#34;:&#34;Print chart&#34;,&#34;resetZoom&#34;:&#34;Reset zoom&#34;,&#34;resetZoomTitle&#34;:&#34;Reset zoom level 1:1&#34;,&#34;shortMonths&#34;:[&#34;Jan&#34;,&#34;Feb&#34;,&#34;Mar&#34;,&#34;Apr&#34;,&#34;May&#34;,&#34;Jun&#34;,&#34;Jul&#34;,&#34;Aug&#34;,&#34;Sep&#34;,&#34;Oct&#34;,&#34;Nov&#34;,&#34;Dec&#34;],&#34;thousandsSep&#34;:&#34; &#34;,&#34;weekdays&#34;:[&#34;Sunday&#34;,&#34;Monday&#34;,&#34;Tuesday&#34;,&#34;Wednesday&#34;,&#34;Thursday&#34;,&#34;Friday&#34;,&#34;Saturday&#34;]}},&#34;type&#34;:&#34;chart&#34;,&#34;fonts&#34;:[],&#34;debug&#34;:false},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt;That’s all for today. Try revisiting this script on September 7th, when the next BLS jobs data is released, and see if any new visualizations or code flows come to mind.&lt;/p&gt;
&lt;p&gt;See you next time and happy coding!&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2018/08/09/highcharting-jobs-friday/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>Introduction to Visualizing Asset Returns</title>
      <link>https://rviews.rstudio.com/2017/11/09/introduction-to-visualizing-asset-returns/</link>
      <pubDate>Thu, 09 Nov 2017 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2017/11/09/introduction-to-visualizing-asset-returns/</guid>
      <description>
        
&lt;script src=&#34;/rmarkdown-libs/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/jquery/jquery.min.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/proj4js/proj4.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;/rmarkdown-libs/highcharts/css/motion.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/highstock.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/highcharts-3d.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/highcharts-more.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/annotations.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/broken-axis.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/data.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/drilldown.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/exporting.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/funnel.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/heatmap.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/map.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/no-data-to-display.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/offline-exporting.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/solid-gauge.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/treemap.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/annotations.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/draggable-legend.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/draggable-points.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/export-csv.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/grouped-categories.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/motion.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/pattern-fill-v2.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/tooltip-delay.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/custom/reset.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/custom/symbols-extra.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/custom/text-symbols.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;/rmarkdown-libs/fontawesome/font-awesome.min.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;link href=&#34;/rmarkdown-libs/htmlwdgtgrid/htmlwdgtgrid.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;/rmarkdown-libs/highchart-binding/highchart.js&#34;&gt;&lt;/script&gt;

&lt;p&gt;In a &lt;a href=&#34;https://rviews.rstudio.com/2017/10/11/from-asset-to-portfolio-returns/&#34;&gt;previous post&lt;/a&gt;, we reviewed how to import daily prices, build a portfolio, and calculate portfolio returns. Today, we will visualize the returns of our individual assets that ultimately get mashed into a portfolio. The motivation here is to make sure we have scrutinized our assets before they get into our portfolio, because once the portfolio has been constructed, it is tempting to keep the analysis at the portfolio level.&lt;/p&gt;
&lt;p&gt;By way of a quick reminder, our ultimate portfolio consists of the following.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;+ SPY (S&amp;amp;P 500 fund) weighted 25%
+ EFA (a non-US equities fund) weighted 25%
+ IJS (a small-cap value fund) weighted 20%
+ EEM (an emerging-mkts fund) weighted 20%
+ AGG (a bond fund) weighted 10%&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Let’s load up our packages.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;library(tidyverse)
library(tidyquant)
library(timetk)
library(tibbletime)
library(highcharter)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To get our objects into the global environment, we use the next code chunk, which should look familiar from the previous post: we will create one &lt;code&gt;xts&lt;/code&gt; object and one &lt;code&gt;tibble&lt;/code&gt;, in long/tidy format, of monthly log returns.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# The symbols vector holds our tickers. 
symbols &amp;lt;- c(&amp;quot;SPY&amp;quot;,&amp;quot;EFA&amp;quot;, &amp;quot;IJS&amp;quot;, &amp;quot;EEM&amp;quot;,&amp;quot;AGG&amp;quot;)

prices &amp;lt;- 
  getSymbols(symbols, src = &amp;#39;yahoo&amp;#39;, from = &amp;quot;2005-01-01&amp;quot;, 
             auto.assign = TRUE, warnings = FALSE) %&amp;gt;% 
  map(~Ad(get(.))) %&amp;gt;% 
  reduce(merge) %&amp;gt;%
  `colnames&amp;lt;-`(symbols)

# XTS method
prices_monthly &amp;lt;- to.monthly(prices, indexAt = &amp;quot;last&amp;quot;, OHLC = FALSE)
asset_returns_xts &amp;lt;- na.omit(Return.calculate(prices_monthly, method = &amp;quot;log&amp;quot;))

# Tidyverse method, to long, tidy format
asset_returns_long &amp;lt;- 
  prices %&amp;gt;% 
  to.monthly(indexAt = &amp;quot;last&amp;quot;, OHLC = FALSE) %&amp;gt;% 
  tk_tbl(preserve_index = TRUE, rename_index = &amp;quot;date&amp;quot;) %&amp;gt;%
  gather(asset, returns, -date) %&amp;gt;% 
  group_by(asset) %&amp;gt;%  
  mutate(returns = (log(returns) - log(lag(returns))))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We now have two objects holding monthly log returns, &lt;code&gt;asset_returns_xts&lt;/code&gt; and &lt;code&gt;asset_returns_long&lt;/code&gt;. First, let’s use &lt;code&gt;highcharter&lt;/code&gt; to visualize the &lt;code&gt;xts&lt;/code&gt; formatted returns.&lt;/p&gt;
&lt;p&gt;Highcharter is fantastic for visualizing a time series or many time series. First, we set &lt;code&gt;highchart(type = &amp;quot;stock&amp;quot;)&lt;/code&gt; to get a nice time series line. Then we add each of our series to the highcharter code flow. In this case, we’ll add our columns from the xts object.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;highchart(type = &amp;quot;stock&amp;quot;) %&amp;gt;% 
  hc_title(text = &amp;quot;Monthly Log Returns&amp;quot;) %&amp;gt;%
  hc_add_series(asset_returns_xts$SPY, 
                  name = names(asset_returns_xts$SPY)) %&amp;gt;%
  hc_add_series(asset_returns_xts$EFA, 
                  name = names(asset_returns_xts$EFA)) %&amp;gt;%
  hc_add_series(asset_returns_xts$IJS, 
                  name = names(asset_returns_xts$IJS)) %&amp;gt;%
  hc_add_theme(hc_theme_flat()) %&amp;gt;%
  hc_navigator(enabled = FALSE) %&amp;gt;% 
  hc_scrollbar(enabled = FALSE)&lt;/code&gt;&lt;/pre&gt;
&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
&lt;div id=&#34;htmlwidget-1&#34; style=&#34;width:100%;height:500px;&#34; class=&#34;highchart html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-1&#34;&gt;{&#34;x&#34;:{&#34;hc_opts&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;Monthly Log Returns&#34;},&#34;yAxis&#34;:{&#34;title&#34;:{&#34;text&#34;:null}},&#34;credits&#34;:{&#34;enabled&#34;:false},&#34;exporting&#34;:{&#34;enabled&#34;:false},&#34;plotOptions&#34;:{&#34;series&#34;:{&#34;turboThreshold&#34;:0},&#34;treemap&#34;:{&#34;layoutAlgorithm&#34;:&#34;squarified&#34;},&#34;bubble&#34;:{&#34;minSize&#34;:5,&#34;maxSize&#34;:25}},&#34;annotationsOptions&#34;:{&#34;enabledButtons&#34;:false},&#34;tooltip&#34;:{&#34;delayForDisplay&#34;:10},&#34;series&#34;:[{&#34;data&#34;:[[1109548800000,0.0206879564787652],[1112227200000,-0.0184620427115227],[1114732800000,-0.0189129118436862],[1117497600000,0.0317163083379048],[1120089600000,0.00151393629460106],[1122595200000,0.0375475240332914],[1125446400000,-0.00941855857008189],[1128038400000,0.007993202120959],[1130716800000,-0.0239349137310887],[1133308800000,0.0430138749208249],[1135900800000,-0.0019156226742254],[1138665600000,0.0237308029515964],[1141084800000,0.00570899260805735],[1143763200000,0.0163691250694358],[1146182400000,0.0125527610205225],[1149033600000,-0.0305839375386094],[1151625600000,0.00260488765092415],[1154304000000,0.0044681481904556],[1156982400000,0.0215881063221808],[1159488000000,0.026643087519183],[1162252800000,0.031030247969607],[1164844800000,0.0196902180071232],[1167350400000,0.0132824269392957],[1170201600000,0.0149287468809467],[1172620800000,-0.0198126309091737],[1175212800000,0.0115224470101358],[1177891200000,0.0433425164975478],[1180569600000,0.0333578210097789],[1183075200000,-0.0147288107682826],[1185840000000,-0.0318111103015148],[1188518400000,0.0127511519771888],[1190937600000,0.037983878406008],[1193788800000,0.0134756480496216],[1196380800000,-0.0395031646979138],[1199059200000,-0.0113241455710815],[1201737600000,-0.062366166012918],[1204243200000,-0.0261820868034999],[1206921600000,-0.00898255723853847],[1209513600000,0.0465610927028539],[1212105600000,0.0150035057676243],[1214784000000,-0.0872762465769927],[1217462400000,-0.00902604574898103],[1219968000000,0.0153352377351812],[1222732800000,-0.0989073697028093],[1225411200000,-0.180547395863481],[1227830400000,-0.072147882008025],[1230681600000,0.00974913256530652],[1233273600000,-0.0856823870527457],[1235692800000,-0.113671935138881],[1238457600000,0.0800220063060602],[1241049600000,0.094715527774393],[1243555200000,0.0568088071858863],[1246320000000,-0.000655167253289513],[1248998400000,0.071953996648217],[1251676800000,0.0362735609011979],[1254268800000,0.0348429492089988],[1256860800000,-0.0194122101038108],[1259539200000,0.0597837301676805],[1262217600000,0.0189205364696052],[1264723200000,-0.0370191100308706],[1267142400000,0.0307179901644217],[1269993600000,0.0590982633204424],[1272585600000,0.0153517791422715],[1275004800000,-0.082789029026074],[1277856000000,-0.0531274653636906],[1280448000000,0.0660691628873211],[1283212800000,-0.0460236322571204],[1285804800000,0.0857691561301728],[1288310400000,0.0374905301138417],[1291075200000,0],[1293753600000,0.0647126358053045],[1296432000000,0.0230325314056046],[1298851200000,0.0341479340332063],[1301529600000,0.00011975806919029],[1304035200000,0.0285502967694589],[1306800000000,-0.0112781487823161],[1309392000000,-0.0170134064348968],[1311897600000,-0.0202073935478904],[1314748800000,-0.0565445290215694],[1317340800000,-0.0719479355806953],[1320019200000,0.103591277397301],[1322611200000,-0.00407225015013868],[1325203200000,0.0103942584024228],[1327968000000,0.0453313493227681],[1330473600000,0.042489853182194],[1333065600000,0.0316573309578079],[1335744000000,-0.00669814909292832],[1338422400000,-0.0619346298765713],[1340928000000,0.0397793800113906],[1343692800000,0.0117601810113923],[1346371200000,0.0247440302682689],[1348790400000,0.0250347803664841],[1351641600000,-0.0183660958508947],[1354233600000,0.00564402145604426],[1356912000000,0.0088947119917],[1359590400000,0.0499229739693074],[1362009600000,0.0126782888845867],[1364428800000,0.0372681391254028],[1367280000000,0.0190301985626817],[1369958400000,0.0233350764063225],[1372377600000,-0.0134341176746107],[1375228800000,0.0503857346056087],[1377820800000,-0.0304514727123406],[1380499200000,0.0311561844386716],[1383177600000,0.0452666390820351],[1385683200000,0.029206921916912],[1388448000000,0.0255960775136792],[1391126400000,-0.0358844994464338],[1393545600000,0.0445103393197277],[1396224000000,0.00826126379928027],[1398816000000,0.00692752148230458],[1401408000000,0.0229411937674122],[1404086400000,0.020434571472804],[1406764800000,-0.0135286262072674],[1409270400000,0.0387046969843707],[1412035200000,-0.0138923891344058],[1414713600000,0.0232777542525708],[1417132800000,0.0271015754478947],[1419984000000,-0.00254002002878728],[1422576000000,-0.0300767694361843],[1424995200000,0.0546818057272151],[1427760000000,-0.0158303468184666],[1430352000000,0.00978598900739236],[1432857600000,0.0127741884503729],[1435622400000,-0.0203254364909862],[1438300800000,0.0219060133877527],[1440979200000,-0.0633070337442643],[1443571200000,-0.0253971364858741],[1446163200000,0.0818438281022278],[1448841600000,0.00364830021490725],[1451520000000,-0.017433493021799],[1454025600000,-0.051068745607993],[1456704000000,-0.000826272340695766],[1459382400000,0.0651002372862814],[1461888000000,0.00393355280006968],[1464652800000,0.0168684168520459],[1467244800000,0.00346986666674631],[1469750400000,0.0358218673761721],[1472601600000,0.00119688944841201],[1475193600000,5.80083859968994e-05],[1477872000000,-0.0174890984625753],[1480464000000,0.0361759803978394],[1483056000000,0.0200691262966979],[1485820800000,0.0177365234669162],[1488240000000,0.0385392352341904],[1490918400000,0.00124919981810123],[1493337600000,0.00987715638181186],[1496188800000,0.0140142937017638],[1498780800000,0.0063547386737941],[1501459200000,0.0203457615482456],[1504137600000,0.00291345463160919],[1506643200000,0.0199491222858326],[1509408000000,0.0232907105950764],[1510099200000,0.00759307518159069]],&#34;name&#34;:&#34;SPY&#34;},{&#34;data&#34;:[[1109548800000,0.037151134272853],[1112227200000,-0.0265838389041115],[1114732800000,-0.0163089755672123],[1117497600000,-0.00867461761694077],[1120089600000,0.0142254640102872],[1122595200000,0.0295274996701176],[1125446400000,0.0376439503473396],[1128038400000,0.0362784852024642],[1130716800000,-0.0323598198953077],[1133308800000,0.0228482619911152],[1135900800000,0.0505276527755769],[1138665600000,0.0561109769064179],[1141084800000,-0.00702447237375559],[1143763200000,0.0392699591675636],[1146182400000,0.0467930479482104],[1149033600000,-0.0389679406958585],[1151625600000,-0.000611290408581766],[1154304000000,0.00807242712294753],[1156982400000,0.0251661207214218],[1159488000000,0.00221651592188188],[1162252800000,0.0368049528313334],[1164844800000,0.0302672456166655],[1167350400000,0.0314716099337979],[1170201600000,0.0138342000225076],[1172620800000,-0.00121274201084187],[1175212800000,0.0285827539990051],[1177891200000,0.0367981237963262],[1180569600000,0.023348580160409],[1183075200000,-0.00321413838200346],[1185840000000,-0.0231710746818719],[1188518400000,-0.0063555878304502],[1190937600000,0.0518098232028095],[1193788800000,0.0416208362386312],[1196380800000,-0.0369099719460833],[1199059200000,-0.0302661933720048],[1201737600000,-0.0817214568330091],[1204243200000,-0.0102820674777391],[1206921600000,0.00418097653946115],[1209513600000,0.0529540909918413],[1212105600000,0.0118020141194437],[1214784000000,-0.0919707626305599],[1217462400000,-0.0337659926261513],[1219968000000,-0.0434046779238249],[1222732800000,-0.121447220729729],[1225411200000,-0.233633611527602],[1227830400000,-0.065840530045524],[1230681600000,0.0849696967387832],[1233273600000,-0.147707186898761],[1235692800000,-0.109676223419933],[1238457600000,0.0805748613952213],[1241049600000,0.109024822178633],[1243555200000,0.123913602147066],[1246320000000,-0.0141486182002488],[1248998400000,0.0956871031096225],[1251676800000,0.0440462841789913],[1254268800000,0.0372620446282181],[1256860800000,-0.0255616499409705],[1259539200000,0.0384627676118114],[1262217600000,0.00707108987272109],[1264723200000,-0.051978866149399],[1267142400000,0.00266406370831529],[1269993600000,0.0618981291618597],[1272585600000,-0.0284465113532373],[1275004800000,-0.118702313684693],[1277856000000,-0.0208350857380379],[1280448000000,0.109844258803769],[1283212800000,-0.0386893284782368],[1285804800000,0.095055500829881],[1288310400000,0.0373490095117459],[1291075200000,-0.0494395750737691],[1293753600000,0.0798096864770277],[1296432000000,0.0207384312165213],[1298851200000,0.0348823493355179],[1301529600000,-0.0241726773332922],[1304035200000,0.0547327668077355],[1306800000000,-0.0223081675510199],[1309392000000,-0.0121811146717974],[1311897600000,-0.0240652603492073],[1314748800000,-0.0916209895261475],[1317340800000,-0.114382222680635],[1320019200000,0.0919178839423349],[1322611200000,-0.022004287484473],[1325203200000,-0.0219894735413453],[1327968000000,0.051353836985244],[1330473600000,0.0471998203969957],[1333065600000,0.00419879485552022],[1335744000000,-0.0209872726859328],[1338422400000,-0.118155203572803],[1340928000000,0.068063370602534],[1343692800000,0.000800288769793323],[1346371200000,0.0314987289415014],[1348790400000,0.0267703167039559],[1351641600000,0.0108838376151383],[1354233600000,0.0274292435140708],[1356912000000,0.042879075039882],[1359590400000,0.0366062177433522],[1362009600000,-0.0129693475113624],[1364428800000,0.0129693475113624],[1367280000000,0.0489678279763219],[1369958400000,-0.030655705787022],[1372377600000,-0.0271443734947425],[1375228800000,0.0518601885478733],[1377820800000,-0.0197463072357991],[1380499200000,0.0753386169581263],[1383177600000,0.0320816230620462],[1385683200000,0.00544967509154315],[1388448000000,0.0215281231213043],[1391126400000,-0.0534132932648861],[1393545600000,0.0595049957265781],[1396224000000,-0.0046026010587763],[1398816000000,0.0165294641755356],[1401408000000,0.0158284424353807],[1404086400000,0.0091654717345353],[1406764800000,-0.0263798737202805],[1409270400000,0.00180045712250632],[1412035200000,-0.039598541324648],[1414713600000,-0.00265478388784413],[1417132800000,0.000625227534890804],[1419984000000,-0.0407465927925506],[1422576000000,0.00622638001941045],[1424995200000,0.0614505439740869],[1427760000000,-0.0143887128054843],[1430352000000,0.0358165555667957],[1432857600000,0.00195266162417695],[1435622400000,-0.031676232061093],[1438300800000,0.0201144387140753],[1440979200000,-0.0771524802712635],[1443571200000,-0.0451948483375104],[1446163200000,0.0640259924153521],[1448841600000,-0.00755588943730778],[1451520000000,-0.0235950182011635],[1454025600000,-0.056757828831866],[1456704000000,-0.0339139677633575],[1459382400000,0.0637456787775954],[1461888000000,0.0219751639880688],[1464652800000,-0.000856075241223664],[1467244800000,-0.0244915611178333],[1469750400000,0.0390003013163938],[1472601600000,0.005326818637859],[1475193600000,0.0132791495670137],[1477872000000,-0.0224037208451646],[1480464000000,-0.0179744493521579],[1483056000000,0.0267029207072493],[1485820800000,0.0323818692375557],[1488240000000,0.0118364376763189],[1490918400000,0.0318056747302649],[1493337600000,0.0239522219375043],[1496188800000,0.0348101755260704],[1498780800000,0.00295595977539609],[1501459200000,0.0261878741922148],[1504137600000,-0.000448300083002451],[1506643200000,0.0233427786123483],[1509408000000,0.016653690227681],[1510099200000,0.00344094963166341]],&#34;name&#34;:&#34;EFA&#34;},{&#34;data&#34;:[[1109548800000,0.0286090056376822],[1112227200000,-0.0238816413470162],[1114732800000,-0.052557028119252],[1117497600000,0.0597361469218773],[1120089600000,0.0384077367010072],[1122595200000,0.0567711816790979],[1125446400000,-0.0188802370639181],[1128038400000,0.000488809073939223],[1130716800000,-0.0347115077857048],[1133308800000,0.0479259551003905],[1135900800000,-0.0105975414862556],[1138665600000,0.0838887941563367],[1141084800000,0.00273101701240375],[1143763200000,0.0474208866435006],[1146182400000,0.00178350386683412],[1149033600000,-0.0465784153055235],[1151625600000,0.000421964055665747],[1154304000000,-0.0314464774227146],[1156982400000,0.0266837275924203],[1159488000000,0.0117932306008948],[1162252800000,0.0537273110996388],[1164844800000,0.0234988455767606],[1167350400000,0.00314687820050708],[1170201600000,0.0211451208839621],[1172620800000,-0.00926989522508315],[1175212800000,0.00901964836660518],[1177891200000,0.0182141380840877],[1180569600000,0.0452975847517818],[1183075200000,-0.0227115073812163],[1185840000000,-0.0646393138723926],[1188518400000,0.0132135352466678],[1190937600000,0.00315389764764262],[1193788800000,0.0105475244758262],[1196380800000,-0.0741584623834521],[1199059200000,-0.00720895443262393],[1201737600000,-0.0408220573495495],[1204243200000,-0.03420937272326],[1206921600000,0.00822014981195895],[1209513600000,0.0260927305455478],[1212105600000,0.0384077297164023],[1214784000000,-0.087925673348515],[1217462400000,0.0283280107599966],[1219968000000,0.0465200693220789],[1222732800000,-0.0493365385162789],[1225411200000,-0.221415713421957],[1227830400000,-0.125533997035027],[1230681600000,0.0637301705420099],[1233273600000,-0.150182251633202],[1235692800000,-0.139558506609924],[1238457600000,0.0732620809428939],[1241049600000,0.173026624489215],[1243555200000,0.00667868562089469],[1246320000000,0.0150718542910742],[1248998400000,0.104382975461063],[1251676800000,0.0342330282040972],[1254268800000,0.041153182560882],[1256860800000,-0.062663997967856],[1259539200000,0.0286026656444029],[1262217600000,0.077878192778106],[1264723200000,-0.0256780949528288],[1267142400000,0.0465278114149363],[1269993600000,0.0750794660652976],[1272585600000,0.0641679025009161],[1275004800000,-0.0892741998339348],[1277856000000,-0.0863778482937168],[1280448000000,0.0649646269398509],[1283212800000,-0.082420611411318],[1285804800000,0.103833493326968],[1288310400000,0.0395797001940199],[1291075200000,0.0244359202825697],[1293753600000,0.085859230191506],[1296432000000,-0.00236746310031322],[1298851200000,0.0412456108572048],[1301529600000,0.0218402674875495],[1304035200000,0.0105711717645729],[1306800000000,-0.0178132160838675],[1309392000000,-0.0160795458360079],[1311897600000,-0.0281285077592326],[1314748800000,-0.0831290069956392],[1317340800000,-0.111609680117464],[1320019200000,0.142717737052455],[1322611200000,0.00627880721610197],[1325203200000,0.0199991369370647],[1327968000000,0.0760203352926903],[1330473600000,0.0169933479136102],[1333065600000,0.0285565399698857],[1335744000000,-0.0192756080816627],[1338422400000,-0.0744576383071394],[1340928000000,0.0444857052220033],[1343692800000,-0.00688508881229044],[1346371200000,0.0399652273790148],[1348790400000,0.0308345004659198],[1351641600000,-0.0198151689749491],[1354233600000,0.016391945950768],[1356912000000,0.0348939458556297],[1359590400000,0.0521334068088111],[1362009600000,0.0161753160899298],[1364428800000,0.0402581118721042],[1367280000000,0.00122261949434677],[1369958400000,0.041976209966303],[1372377600000,-0.00140295871433338],[1375228800000,0.0635415530701504],[1377820800000,-0.0347434139628504],[1380499200000,0.063873524552303],[1383177600000,0.0342339597986134],[1385683200000,0.0416612432633112],[1388448000000,0.0128921429591502],[1391126400000,-0.0357753812832087],[1393545600000,0.045257393506442],[1396224000000,0.0133152917570012],[1398816000000,-0.0231841735810603],[1401408000000,0.00620527316117681],[1404086400000,0.0377187390221776],[1406764800000,-0.0520094136899454],[1409270400000,0.0436578133993812],[1412035200000,-0.0612605643393618],[1414713600000,0.0688749937183744],[1417132800000,0.00477364402186176],[1419984000000,0.0252957663427056],[1422576000000,-0.0546278352682528],[1424995200000,0.0569145405749198],[1427760000000,0.0101563013835051],[1430352000000,-0.0184176319430005],[1432857600000,0.00750988632388072],[1435622400000,0.00417146447130001],[1438300800000,-0.0273754457742177],[1440979200000,-0.047268458395858],[1443571200000,-0.0384647360685886],[1446163200000,0.0635897190900101],[1448841600000,0.0244152403272127],[1451520000000,-0.0521569132328743],[1454025600000,-0.0603069715640157],[1456704000000,0.0206053245172564],[1459382400000,0.0899102913009653],[1461888000000,0.0210442397678579],[1464652800000,0.00439714604375929],[1467244800000,0.00829228533296789],[1469750400000,0.0493483204384928],[1472601600000,0.0112610906578512],[1475193600000,0.00861467666116589],[1477872000000,-0.0381348678009106],[1480464000000,0.125246458484529],[1483056000000,0.0314916841334938],[1485820800000,-0.0121438398744331],[1488240000000,0.013428773146078],[1490918400000,-0.00653302685795687],[1493337600000,0.00510773653279983],[1496188800000,-0.0228626735155766],[1498780800000,0.0291518775628319],[1501459200000,0.00748150981266793],[1504137600000,-0.0275646800558462],[1506643200000,0.0823217315839475],[1509408000000,0.00591601053187674],[1510099200000,-0.0157409159678101]],&#34;name&#34;:&#34;IJS&#34;}],&#34;navigator&#34;:{&#34;enabled&#34;:false},&#34;scrollbar&#34;:{&#34;enabled&#34;:false}},&#34;theme&#34;:{&#34;colors&#34;:[&#34;#f1c40f&#34;,&#34;#2ecc71&#34;,&#34;#9b59b6&#34;,&#34;#e74c3c&#34;,&#34;#34495e&#34;,&#34;#3498db&#34;,&#34;#1abc9c&#34;,&#34;#f39c12&#34;,&#34;#d35400&#34;],&#34;chart&#34;:{&#34;backgroundColor&#34;:&#34;#ECF0F1&#34;},&#34;xAxis&#34;:{&#34;gridLineDashStyle&#34;:&#34;Dash&#34;,&#34;gridLineWidth&#34;:1,&#34;gridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;lineColor&#34;:&#34;#BDC3C7&#34;,&#34;minorGridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;tickColor&#34;:&#34;#BDC3C7&#34;,&#34;tickWidth&#34;:1},&#34;yAxis&#34;:{&#34;gridLineDashStyle&#34;:&#34;Dash&#34;,&#34;gridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;lineColor&#34;:&#34;#BDC3C7&#34;,&#34;minorGridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;tickColor&#34;:&#34;#BDC3C7&#34;,&#34;tickWidth&#34;:1},&#34;legendBackgroundColor&#34;:&#34;rgba(0, 0, 0, 0.5)&#34;,&#34;background2&#34;:&#34;#505053&#34;,&#34;dataLabelsColor&#34;:&#34;#B0B0B3&#34;,&#34;textColor&#34;:&#34;#34495e&#34;,&#34;contrastTextColor&#34;:&#34;#F0F0F3&#34;,&#34;maskColor&#34;:&#34;rgba(255,255,255,0.3)&#34;},&#34;conf_opts&#34;:{&#34;global&#34;:{&#34;Date&#34;:null,&#34;VMLRadialGradientURL&#34;:&#34;http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png&#34;,&#34;canvasToolsURL&#34;:&#34;http =//code.highcharts.com/list(version)/modules/canvas-tools.js&#34;,&#34;getTimezoneOffset&#34;:null,&#34;timezoneOffset&#34;:0,&#34;useUTC&#34;:true},&#34;lang&#34;:{&#34;contextButtonTitle&#34;:&#34;Chart context menu&#34;,&#34;decimalPoint&#34;:&#34;.&#34;,&#34;downloadJPEG&#34;:&#34;Download JPEG image&#34;,&#34;downloadPDF&#34;:&#34;Download PDF document&#34;,&#34;downloadPNG&#34;:&#34;Download PNG image&#34;,&#34;downloadSVG&#34;:&#34;Download SVG vector image&#34;,&#34;drillUpText&#34;:&#34;Back to {series.name}&#34;,&#34;invalidDate&#34;:null,&#34;loading&#34;:&#34;Loading...&#34;,&#34;months&#34;:[&#34;January&#34;,&#34;February&#34;,&#34;March&#34;,&#34;April&#34;,&#34;May&#34;,&#34;June&#34;,&#34;July&#34;,&#34;August&#34;,&#34;September&#34;,&#34;October&#34;,&#34;November&#34;,&#34;December&#34;],&#34;noData&#34;:&#34;No data to display&#34;,&#34;numericSymbols&#34;:[&#34;k&#34;,&#34;M&#34;,&#34;G&#34;,&#34;T&#34;,&#34;P&#34;,&#34;E&#34;],&#34;printChart&#34;:&#34;Print chart&#34;,&#34;resetZoom&#34;:&#34;Reset zoom&#34;,&#34;resetZoomTitle&#34;:&#34;Reset zoom level 1:1&#34;,&#34;shortMonths&#34;:[&#34;Jan&#34;,&#34;Feb&#34;,&#34;Mar&#34;,&#34;Apr&#34;,&#34;May&#34;,&#34;Jun&#34;,&#34;Jul&#34;,&#34;Aug&#34;,&#34;Sep&#34;,&#34;Oct&#34;,&#34;Nov&#34;,&#34;Dec&#34;],&#34;thousandsSep&#34;:&#34; &#34;,&#34;weekdays&#34;:[&#34;Sunday&#34;,&#34;Monday&#34;,&#34;Tuesday&#34;,&#34;Wednesday&#34;,&#34;Thursday&#34;,&#34;Friday&#34;,&#34;Saturday&#34;]}},&#34;type&#34;:&#34;stock&#34;,&#34;fonts&#34;:[],&#34;debug&#34;:false},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt;Take a look at the chart. It has a line for the monthly log returns of 3 of our ETFs (and in my opinion it’s already starting to get crowded). We might be able to pull some useful intuition from this chart. Perhaps one of our ETFs remained stable during the 2008 financial crisis, or had an era of consistently negative/positive returns. Highcharter is great for plotting time series line charts.&lt;/p&gt;
&lt;p&gt;Highcharter does have the capacity for histogram making. One method is to first call the base function &lt;code&gt;hist&lt;/code&gt; on the data along with the arguments for breaks and &lt;code&gt;plot = FALSE&lt;/code&gt;. Then we can call &lt;code&gt;hchart&lt;/code&gt; on that object.&lt;/p&gt;
=======
&lt;div id=&#34;htmlwidget-ff196d56880b1d09e5a4&#34; style=&#34;width:100%;height:500px;&#34; class=&#34;highchart html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-ff196d56880b1d09e5a4&#34;&gt;{&#34;x&#34;:{&#34;hc_opts&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;Monthly Log Returns&#34;},&#34;yAxis&#34;:{&#34;title&#34;:{&#34;text&#34;:null}},&#34;credits&#34;:{&#34;enabled&#34;:false},&#34;exporting&#34;:{&#34;enabled&#34;:false},&#34;plotOptions&#34;:{&#34;series&#34;:{&#34;turboThreshold&#34;:0},&#34;treemap&#34;:{&#34;layoutAlgorithm&#34;:&#34;squarified&#34;},&#34;bubble&#34;:{&#34;minSize&#34;:5,&#34;maxSize&#34;:25}},&#34;annotationsOptions&#34;:{&#34;enabledButtons&#34;:false},&#34;tooltip&#34;:{&#34;delayForDisplay&#34;:10},&#34;series&#34;:[{&#34;data&#34;:[[1109548800000,0.0206881263448668],[1112227200000,-0.018461969530513],[1114732800000,-0.0189130916629976],[1117497600000,0.0317163509312559],[1120089600000,0.00151410285222653],[1122595200000,0.037547541574888],[1125446400000,-0.00941884503296375],[1128038400000,0.00799332807135134],[1130716800000,-0.0239349792446122],[1133308800000,0.0430140199254936],[1135900800000,-0.00191553334079586],[1138665600000,0.023730238946575],[1141084800000,0.00570942903340121],[1143763200000,0.0163691491192619],[1146182400000,0.0125527791771942],[1149033600000,-0.0305840427637456],[1151625600000,0.00260480822378106],[1154304000000,0.00446826943836154],[1156982400000,0.0215881773681232],[1159488000000,0.0266430581441846],[1162252800000,0.0310301182093982],[1164844800000,0.0196903490891849],[1167350400000,0.0132825159196317],[1170201600000,0.0149285567125448],[1172620800000,-0.0198125538943206],[1175212800000,0.0115224020349931],[1177891200000,0.043342670657931],[1180569600000,0.033357753539998],[1183075200000,-0.0147290730213427],[1185840000000,-0.0318107355371051],[1188518400000,0.0127509156509156],[1190937600000,0.0379841633617399],[1193788800000,0.0134754732155491],[1196380800000,-0.0395031297726991],[1199059200000,-0.0113241672416082],[1201737600000,-0.0623662499410251],[1204243200000,-0.0261821945542557],[1206921600000,-0.00898244920304414],[1209513600000,0.0465611896250309],[1212105600000,0.0150033073872766],[1214784000000,-0.0872760439747893],[1217462400000,-0.00902608620600098],[1219968000000,0.0153351022933936],[1222732800000,-0.0989072027032512],[1225411200000,-0.180547382132571],[1227830400000,-0.0721477711379288],[1230681600000,0.00974878758495823],[1233273600000,-0.0856823980637982],[1235692800000,-0.113671549173575],[1238457600000,0.0800219727508518],[1241049600000,0.0947152799658264],[1243555200000,0.056808684574583],[1246320000000,-0.000654779082119639],[1248998400000,0.0719537109976889],[1251676800000,0.0362738629781489],[1254268800000,0.0348429860538877],[1256860800000,-0.0194127419599788],[1259539200000,0.0597840114964852],[1262217600000,0.0189207045993536],[1264723200000,-0.0370194572774638],[1267142400000,0.0307178770840828],[1269993600000,0.0590985135494204],[1272585600000,0.0153517985869751],[1275004800000,-0.0827891084898482],[1277856000000,-0.0531275156757474],[1280448000000,0.0660691746622897],[1283212800000,-0.0460234543794877],[1285804800000,0.0857689827414481],[1288310400000,0.0374905370511103],[1291075200000,0],[1293753600000,0.0647126722655313],[1296432000000,0.0230326584025153],[1298851200000,0.0341477927534681],[1301529600000,0.000119955860938603],[1304035200000,0.0285501923331761],[1306800000000,-0.0112781129793715],[1309392000000,-0.0170135370352185],[1311897600000,-0.0202073070054096],[1314748800000,-0.056544590858735],[1317340800000,-0.0719480395552079],[1320019200000,0.103591325069326],[1322611200000,-0.00407201749741493],[1325203200000,0.0103942796449079],[1327968000000,0.0453313675703297],[1330473600000,0.0424897503683699],[1333065600000,0.0316573828601339],[1335744000000,-0.00669805819960878],[1338422400000,-0.0619347602384499],[1340928000000,0.0397792910718513],[1343692800000,0.0117602004556092],[1346371200000,0.0247439983165263],[1348790400000,0.0250346772989518],[1351641600000,-0.0183659008794557],[1354233600000,0.00564399143596894],[1356912000000,0.0088945614376108],[1359590400000,0.0499231357446419],[1362009600000,0.0126782321108232],[1364428800000,0.0372681092354448],[1367280000000,0.0190299135256806],[1369958400000,0.0233355101543333],[1372377600000,-0.0134345864857588],[1375228800000,0.0503859552747734],[1377820800000,-0.0304512570950308],[1380499200000,0.0311555726370498],[1383177600000,0.0452667745302389],[1385683200000,0.029206815648287],[1388448000000,0.0255975973946434],[1391126400000,-0.0358842297562694],[1393545600000,0.0445102011793042],[1396224000000,0.00825920786856926],[1398816000000,0.00692750665745923],[1401408000000,0.0229411266746888],[1404086400000,0.0204330993937125],[1406764800000,-0.0135286953950207],[1409270400000,0.0387046457361997],[1412035200000,-0.0138914643259724],[1414713600000,0.0232780247164452],[1417132800000,0.0271013548213164],[1419984000000,-0.00254025089793064],[1422576000000,-0.0300770304757565],[1424995200000,0.0546818615209057],[1427760000000,-0.0158303175042906],[1430352000000,0.00978589508163452],[1432857600000,0.0127741659516065],[1435622400000,-0.020325324232874],[1438300800000,0.0219060477057784],[1440979200000,-0.0633070688928576],[1443571200000,-0.0253970886044232],[1446163200000,0.0818435978611651],[1448841600000,0.00364860372917342],[1451520000000,-0.0174358618687105],[1454025600000,-0.0510687711922486],[1456704000000,-0.000826272681099027],[1459382400000,0.065100343505363],[1461888000000,0.00393347906859809],[1464652800000,0.0168684232025615],[1467244800000,0.0034698679598284],[1469750400000,0.0358218804665604],[1472601600000,0.00119688516071292],[1475193600000,5.83715975830401e-05],[1477872000000,-0.0174890984625753],[1480464000000,0.0361759803978394],[1483056000000,0.0200691262966979],[1485820800000,0.0177365234669162],[1488240000000,0.0385392352341904],[1490918400000,0.00124919981810123],[1493337600000,0.00987715638181186],[1496188800000,0.0140142937017638],[1498780800000,0.0063547386737941],[1501459200000,0.0203457615482456],[1504137600000,0.00291345463160919],[1506643200000,0.0199491222858326],[1507852800000,0.0146985974409883],[1510099200000,0.0161851883356787]],&#34;name&#34;:&#34;SPY&#34;},{&#34;data&#34;:[[1109548800000,0.037150948352815],[1112227200000,-0.0265835142440878],[1114732800000,-0.0163090725589354],[1117497600000,-0.00867466428157559],[1120089600000,0.0142253616719064],[1122595200000,0.0295273973167864],[1125446400000,0.0376442743262433],[1128038400000,0.0362784187372776],[1130716800000,-0.0323597822330686],[1133308800000,0.022848195178915],[1135900800000,0.0505275766899529],[1138665600000,0.056110917773712],[1141084800000,-0.007024175903668],[1143763200000,0.0392698451844868],[1146182400000,0.0467931036436049],[1149033600000,-0.0389679893663066],[1151625600000,-0.000611371385501602],[1154304000000,0.00807245366318332],[1156982400000,0.025165940075349],[1159488000000,0.00221674766282787],[1162252800000,0.0368049268121502],[1164844800000,0.0302672981040883],[1167350400000,0.0314715318070187],[1170201600000,0.0138343028700345],[1172620800000,-0.00121291756801645],[1175212800000,0.0285828022653436],[1177891200000,0.036798190448712],[1180569600000,0.0233484283316967],[1183075200000,-0.00321392901812256],[1185840000000,-0.0231711099840224],[1188518400000,-0.00635554107826408],[1190937600000,0.0518096328208513],[1193788800000,0.0416209245105454],[1196380800000,-0.0369097642675253],[1199059200000,-0.030266218267621],[1201737600000,-0.081721614519354],[1204243200000,-0.0102820665305772],[1206921600000,0.00418096462123341],[1209513600000,0.0529539788700069],[1212105600000,0.0118021211769301],[1214784000000,-0.0919708423850207],[1217462400000,-0.0337659028908996],[1219968000000,-0.0434049720963574],[1222732800000,-0.121446874633704],[1225411200000,-0.233633792531256],[1227830400000,-0.0658406383578156],[1230681600000,0.0849697845200064],[1233273600000,-0.147706884437237],[1235692800000,-0.109676440956979],[1238457600000,0.0805750581629332],[1241049600000,0.109024825847011],[1243555200000,0.123913444338497],[1246320000000,-0.014148735610481],[1248998400000,0.0956873289264037],[1251676800000,0.0440460621709837],[1254268800000,0.0372621994222415],[1256860800000,-0.0255615317827003],[1259539200000,0.0384626470958627],[1262217600000,0.00707103834293576],[1264723200000,-0.0519789328795244],[1267142400000,0.00266404456608482],[1269993600000,0.0618983035022298],[1272585600000,-0.0284464606542518],[1275004800000,-0.118702497261121],[1277856000000,-0.0208349337886693],[1280448000000,0.109844133473587],[1283212800000,-0.0386892402239898],[1285804800000,0.0950552624964733],[1288310400000,0.0373493333469392],[1291075200000,-0.0494396081247053],[1293753600000,0.0798094976404307],[1296432000000,0.0207385095555375],[1298851200000,0.0348823380990058],[1301529600000,-0.024172885889413],[1304035200000,0.0547329107405674],[1306800000000,-0.0223082413364466],[1309392000000,-0.012181107045369],[1311897600000,-0.0240651682613073],[1314748800000,-0.0916208778704641],[1317340800000,-0.114382111063962],[1320019200000,0.0919176873776739],[1322611200000,-0.0220041261663795],[1325203200000,-0.0219894043548212],[1327968000000,0.0513535533097351],[1330473600000,0.0472000516897708],[1333065600000,0.00419876372819417],[1335744000000,-0.0209872699631335],[1338422400000,-0.118155316494923],[1340928000000,0.0680632384381901],[1343692800000,0.000800283045633066],[1346371200000,0.0314987538731004],[1348790400000,0.0267703018125518],[1351641600000,0.0108840192198798],[1354233600000,0.0274291289141937],[1356912000000,0.042879053480259],[1359590400000,0.036606249800073],[1362009600000,-0.0129693906306034],[1364428800000,0.0129693906306034],[1367280000000,0.0489678331571293],[1369958400000,-0.0306556708342192],[1372377600000,-0.0271532952722922],[1375228800000,0.0518603459929912],[1377820800000,-0.0197463368878967],[1380499200000,0.0753385863662306],[1383177600000,0.0320817400117521],[1385683200000,0.00544956433121691],[1388448000000,0.0215236481684693],[1391126400000,-0.0534134135464139],[1393545600000,0.0595051031275506],[1396224000000,-0.00460251303433612],[1398816000000,0.0165293174141574],[1401408000000,0.0158284098633086],[1404086400000,0.00916832156906366],[1406764800000,-0.0263797166471029],[1409270400000,0.00180046272259027],[1412035200000,-0.0395984129409275],[1414713600000,-0.00265491061272183],[1417132800000,0.000625365168779979],[1419984000000,-0.0407436245216282],[1422576000000,0.00622638001941045],[1424995200000,0.0614505439740869],[1427760000000,-0.0143887128054843],[1430352000000,0.0358165555667957],[1432857600000,0.00195266162417695],[1435622400000,-0.031676232061093],[1438300800000,0.0201144387140753],[1440979200000,-0.0771524802712635],[1443571200000,-0.0451948483375104],[1446163200000,0.0640259924153521],[1448841600000,-0.00755588943730778],[1451520000000,-0.0235950182011635],[1454025600000,-0.056757828831866],[1456704000000,-0.0339139677633575],[1459382400000,0.0637456787775954],[1461888000000,0.0219751639880688],[1464652800000,-0.000856075241223664],[1467244800000,-0.0244915611178333],[1469750400000,0.0390003013163938],[1472601600000,0.005326818637859],[1475193600000,0.0132791495670137],[1477872000000,-0.0224037208451646],[1480464000000,-0.0179744493521579],[1483056000000,0.0267029207072493],[1485820800000,0.0323818692375557],[1488240000000,0.0118364376763189],[1490918400000,0.0318056747302649],[1493337600000,0.0239522219375043],[1496188800000,0.0348101755260704],[1498780800000,0.00295595977539609],[1501459200000,0.0261878741922148],[1504137600000,-0.000448300083002451],[1506643200000,0.0233427786123483],[1507852800000,0.0157916642936531],[1510099200000,0.00430297556569137]],&#34;name&#34;:&#34;EFA&#34;},{&#34;data&#34;:[[1109548800000,0.0286091835752296],[1112227200000,-0.023881960774137],[1114732800000,-0.0525567567716227],[1117497600000,0.0597360281829751],[1120089600000,0.0384078988363052],[1122595200000,0.0567711131380602],[1125446400000,-0.0188802735072606],[1128038400000,0.00048880282072794],[1130716800000,-0.0347115213331861],[1133308800000,0.0479258007518513],[1135900800000,-0.0105972762787201],[1138665600000,0.0838887532742061],[1141084800000,0.00273098197748478],[1143763200000,0.0474209793328431],[1146182400000,0.00178348087353886],[1149033600000,-0.0465785356809585],[1151625600000,0.000421907447683445],[1154304000000,-0.0314464768563711],[1156982400000,0.0266839077700176],[1159488000000,0.0117932151860591],[1162252800000,0.0537270717712728],[1164844800000,0.0234987876801567],[1167350400000,0.00314726113885566],[1170201600000,0.0211452634290206],[1172620800000,-0.00927025254575131],[1175212800000,0.00901965655165515],[1177891200000,0.0182142389958804],[1180569600000,0.0452977921943942],[1183075200000,-0.022711884103523],[1185840000000,-0.0646391890198581],[1188518400000,0.0132133671646901],[1190937600000,0.00315398135389788],[1193788800000,0.0105470396818728],[1196380800000,-0.0741578989019551],[1199059200000,-0.00720879555141885],[1201737600000,-0.0408223632061162],[1204243200000,-0.0342094861171001],[1206921600000,0.00822045461122922],[1209513600000,0.0260925896069768],[1212105600000,0.0384077659567383],[1214784000000,-0.0879256088027134],[1217462400000,0.0283279880979155],[1219968000000,0.0465201951240743],[1222732800000,-0.0493366989838835],[1225411200000,-0.221415841311478],[1227830400000,-0.12553383493852],[1230681600000,0.0637302731761364],[1233273600000,-0.150182127359193],[1235692800000,-0.139559035429452],[1238457600000,0.0732624814968919],[1241049600000,0.173026367331466],[1243555200000,0.00667886939942797],[1246320000000,0.0150717586599165],[1248998400000,0.104382709443319],[1251676800000,0.0342334862466127],[1254268800000,0.0411531832974159],[1256860800000,-0.0626640381292511],[1259539200000,0.028602676082838],[1262217600000,0.0778780337050256],[1264723200000,-0.0256779610092956],[1267142400000,0.0465277907457828],[1269993600000,0.0750793222749171],[1272585600000,0.0641679965232713],[1275004800000,-0.0892740964513363],[1277856000000,-0.0863780106417571],[1280448000000,0.0649647943035698],[1283212800000,-0.0824206340946496],[1285804800000,0.103833439539222],[1288310400000,0.0395797869497736],[1291075200000,0.0244358100636264],[1293753600000,0.0858594700151807],[1296432000000,-0.00236789467257559],[1298851200000,0.0412461078354003],[1301529600000,0.0218399846777197],[1304035200000,0.0105711516430063],[1306800000000,-0.0178134381544695],[1309392000000,-0.0160791051253089],[1311897600000,-0.0281285023849778],[1314748800000,-0.0831291871138644],[1317340800000,-0.111609868106249],[1320019200000,0.142718125866275],[1322611200000,0.00627855019597234],[1325203200000,0.0199989465075365],[1327968000000,0.0760209064294912],[1330473600000,0.0169931262311458],[1333065600000,0.0285567019044617],[1335744000000,-0.0192759883030487],[1338422400000,-0.0744574763828227],[1340928000000,0.0444854793666387],[1343692800000,-0.00688489889294264],[1346371200000,0.0399652729751869],[1348790400000,0.030834518414717],[1351641600000,-0.0198151194259841],[1354233600000,0.0163917216261975],[1356912000000,0.0348941306160588],[1359590400000,0.052133127161075],[1362009600000,0.0161755825286827],[1364428800000,0.0402581483054432],[1367280000000,0.00122250892083642],[1369958400000,0.0419764663520441],[1372377600000,-0.00140311096043089],[1375228800000,0.0635411624860351],[1377820800000,-0.0347433020936734],[1380499200000,0.0638705228684522],[1383177600000,0.034234005648365],[1385683200000,0.0416611454340288],[1388448000000,0.0128910143700107],[1391126400000,-0.0357753086929975],[1393545600000,0.0452574477086429],[1396224000000,0.0133144732671528],[1398816000000,-0.0231842093818004],[1401408000000,0.00620536673268912],[1404086400000,0.0377146432070781],[1406764800000,-0.052009280888619],[1409270400000,0.0436577760943528],[1412035200000,-0.0612641877276303],[1414713600000,0.068874988549612],[1417132800000,0.00477357970257231],[1419984000000,0.0252944749655128],[1422576000000,-0.054627890333558],[1424995200000,0.0569145366582307],[1427760000000,0.0101562438764011],[1430352000000,-0.0184175223251408],[1432857600000,0.00750976285273453],[1435622400000,0.00417146978708427],[1438300800000,-0.0273754179729648],[1440979200000,-0.0472684430048069],[1443571200000,-0.0384635075969859],[1446163200000,0.0635897190900101],[1448841600000,0.0244152403272127],[1451520000000,-0.0521569132328743],[1454025600000,-0.0603069715640157],[1456704000000,0.0206053245172564],[1459382400000,0.0899102913009653],[1461888000000,0.0210442397678579],[1464652800000,0.00439714604375929],[1467244800000,0.00829228533296789],[1469750400000,0.0493483204384928],[1472601600000,0.0112610906578512],[1475193600000,0.00861467666116589],[1477872000000,-0.0381348678009106],[1480464000000,0.125246458484529],[1483056000000,0.0314916841334938],[1485820800000,-0.0121438398744331],[1488240000000,0.013428773146078],[1490918400000,-0.00653302685795687],[1493337600000,0.00510773653279983],[1496188800000,-0.0228626735155766],[1498780800000,0.0291518775628319],[1501459200000,0.00748150981266793],[1504137600000,-0.0275646800558462],[1506643200000,0.0823217315839475],[1507852800000,0.00477588769901161],[1510099200000,-0.014600793134945]],&#34;name&#34;:&#34;IJS&#34;}],&#34;navigator&#34;:{&#34;enabled&#34;:false},&#34;scrollbar&#34;:{&#34;enabled&#34;:false}},&#34;theme&#34;:{&#34;colors&#34;:[&#34;#f1c40f&#34;,&#34;#2ecc71&#34;,&#34;#9b59b6&#34;,&#34;#e74c3c&#34;,&#34;#34495e&#34;,&#34;#3498db&#34;,&#34;#1abc9c&#34;,&#34;#f39c12&#34;,&#34;#d35400&#34;],&#34;chart&#34;:{&#34;backgroundColor&#34;:&#34;#ECF0F1&#34;},&#34;xAxis&#34;:{&#34;gridLineDashStyle&#34;:&#34;Dash&#34;,&#34;gridLineWidth&#34;:1,&#34;gridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;lineColor&#34;:&#34;#BDC3C7&#34;,&#34;minorGridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;tickColor&#34;:&#34;#BDC3C7&#34;,&#34;tickWidth&#34;:1},&#34;yAxis&#34;:{&#34;gridLineDashStyle&#34;:&#34;Dash&#34;,&#34;gridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;lineColor&#34;:&#34;#BDC3C7&#34;,&#34;minorGridLineColor&#34;:&#34;#BDC3C7&#34;,&#34;tickColor&#34;:&#34;#BDC3C7&#34;,&#34;tickWidth&#34;:1},&#34;legendBackgroundColor&#34;:&#34;rgba(0, 0, 0, 0.5)&#34;,&#34;background2&#34;:&#34;#505053&#34;,&#34;dataLabelsColor&#34;:&#34;#B0B0B3&#34;,&#34;textColor&#34;:&#34;#34495e&#34;,&#34;contrastTextColor&#34;:&#34;#F0F0F3&#34;,&#34;maskColor&#34;:&#34;rgba(255,255,255,0.3)&#34;},&#34;conf_opts&#34;:{&#34;global&#34;:{&#34;Date&#34;:null,&#34;VMLRadialGradientURL&#34;:&#34;http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png&#34;,&#34;canvasToolsURL&#34;:&#34;http =//code.highcharts.com/list(version)/modules/canvas-tools.js&#34;,&#34;getTimezoneOffset&#34;:null,&#34;timezoneOffset&#34;:0,&#34;useUTC&#34;:true},&#34;lang&#34;:{&#34;contextButtonTitle&#34;:&#34;Chart context menu&#34;,&#34;decimalPoint&#34;:&#34;.&#34;,&#34;downloadJPEG&#34;:&#34;Download JPEG image&#34;,&#34;downloadPDF&#34;:&#34;Download PDF document&#34;,&#34;downloadPNG&#34;:&#34;Download PNG image&#34;,&#34;downloadSVG&#34;:&#34;Download SVG vector image&#34;,&#34;drillUpText&#34;:&#34;Back to {series.name}&#34;,&#34;invalidDate&#34;:null,&#34;loading&#34;:&#34;Loading...&#34;,&#34;months&#34;:[&#34;January&#34;,&#34;February&#34;,&#34;March&#34;,&#34;April&#34;,&#34;May&#34;,&#34;June&#34;,&#34;July&#34;,&#34;August&#34;,&#34;September&#34;,&#34;October&#34;,&#34;November&#34;,&#34;December&#34;],&#34;noData&#34;:&#34;No data to display&#34;,&#34;numericSymbols&#34;:[&#34;k&#34;,&#34;M&#34;,&#34;G&#34;,&#34;T&#34;,&#34;P&#34;,&#34;E&#34;],&#34;printChart&#34;:&#34;Print chart&#34;,&#34;resetZoom&#34;:&#34;Reset zoom&#34;,&#34;resetZoomTitle&#34;:&#34;Reset zoom level 1:1&#34;,&#34;shortMonths&#34;:[&#34;Jan&#34;,&#34;Feb&#34;,&#34;Mar&#34;,&#34;Apr&#34;,&#34;May&#34;,&#34;Jun&#34;,&#34;Jul&#34;,&#34;Aug&#34;,&#34;Sep&#34;,&#34;Oct&#34;,&#34;Nov&#34;,&#34;Dec&#34;],&#34;thousandsSep&#34;:&#34; &#34;,&#34;weekdays&#34;:[&#34;Sunday&#34;,&#34;Monday&#34;,&#34;Tuesday&#34;,&#34;Wednesday&#34;,&#34;Thursday&#34;,&#34;Friday&#34;,&#34;Saturday&#34;]}},&#34;type&#34;:&#34;stock&#34;,&#34;fonts&#34;:[],&#34;debug&#34;:false},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt;Take a look at the chart. It has a line for the monthly log returns of three of our ETFs (and in my opinion, it’s already starting to get crowded). We might be able to pull some useful intuition from this chart. Perhaps one of our ETFs remained stable during the 2008 financial crisis, or had an era of consistently negative/positive returns. Highcharter is great for plotting time series line charts.&lt;/p&gt;
&lt;p&gt;Highcharter does have the capacity for histogram making. One method is to first call the base function &lt;code&gt;hist&lt;/code&gt; on the data with the arguments for breaks and &lt;code&gt;plot = FALSE&lt;/code&gt;. Then we can call &lt;code&gt;hchart&lt;/code&gt; on that object.&lt;/p&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt; ea33b5686b615c7a2697ce0b8da92b85932d655f
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;hc_spy &amp;lt;- hist(asset_returns_xts$SPY, breaks = 50, plot = FALSE)

hchart(hc_spy) %&amp;gt;% 
  hc_title(text = &amp;quot;SPY Log Returns Distribution&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-11a6eadf4b1e78db9f75&#34; style=&#34;width:100%;height:500px;&#34; class=&#34;highchart html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-11a6eadf4b1e78db9f75&#34;&gt;{&#34;x&#34;:{&#34;hc_opts&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;SPY Log Returns Distribution&#34;},&#34;yAxis&#34;:{&#34;title&#34;:{&#34;text&#34;:null}},&#34;credits&#34;:{&#34;enabled&#34;:false},&#34;exporting&#34;:{&#34;enabled&#34;:false},&#34;plotOptions&#34;:{&#34;series&#34;:{&#34;turboThreshold&#34;:0},&#34;treemap&#34;:{&#34;layoutAlgorithm&#34;:&#34;squarified&#34;},&#34;bubble&#34;:{&#34;minSize&#34;:5,&#34;maxSize&#34;:25}},&#34;annotationsOptions&#34;:{&#34;enabledButtons&#34;:false},&#34;tooltip&#34;:{&#34;delayForDisplay&#34;:10,&#34;formatter&#34;:&#34;function() { return  this.point.name + &#39;&lt;br/&gt;&#39; + this.y; }&#34;},&#34;chart&#34;:{&#34;zoomType&#34;:&#34;x&#34;},&#34;series&#34;:[{&#34;data&#34;:[{&#34;x&#34;:-0.1825,&#34;y&#34;:1,&#34;name&#34;:&#34;(-0.185, -0.18]&#34;},{&#34;x&#34;:-0.1775,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.18, -0.175]&#34;},{&#34;x&#34;:-0.1725,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.175, -0.17]&#34;},{&#34;x&#34;:-0.1675,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.17, -0.165]&#34;},{&#34;x&#34;:-0.1625,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.165, -0.16]&#34;},{&#34;x&#34;:-0.1575,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.16, -0.155]&#34;},{&#34;x&#34;:-0.1525,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.155, -0.15]&#34;},{&#34;x&#34;:-0.1475,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.15, -0.145]&#34;},{&#34;x&#34;:-0.1425,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.145, -0.14]&#34;},{&#34;x&#34;:-0.1375,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.14, -0.135]&#34;},{&#34;x&#34;:-0.1325,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.135, -0.13]&#34;},{&#34;x&#34;:-0.1275,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.13, -0.125]&#34;},{&#34;x&#34;:-0.1225,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.125, -0.12]&#34;},{&#34;x&#34;:-0.1175,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.12, -0.115]&#34;},{&#34;x&#34;:-0.1125,&#34;y&#34;:1,&#34;name&#34;:&#34;(-0.115, -0.11]&#34;},{&#34;x&#34;:-0.1075,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.11, -0.105]&#34;},{&#34;x&#34;:-0.1025,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.105, -0.1]&#34;},{&#34;x&#34;:-0.0975,&#34;y&#34;:1,&#34;name&#34;:&#34;(-0.1, -0.095]&#34;},{&#34;x&#34;:-0.0925,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.095, -0.09]&#34;},{&#34;x&#34;:-0.0875,&#34;y&#34;:2,&#34;name&#34;:&#34;(-0.09, -0.085]&#34;},{&#34;x&#34;:-0.0825,&#34;y&#34;:1,&#34;name&#34;:&#34;(-0.085, -0.08]&#34;},{&#34;x&#34;:-0.0775,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.08, -0.075]&#34;},{&#34;x&#34;:-0.0725,&#34;y&#34;:2,&#34;name&#34;:&#34;(-0.075, -0.07]&#34;},{&#34;x&#34;:-0.0675,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.07, -0.065]&#34;},{&#34;x&#34;:-0.0625,&#34;y&#34;:3,&#34;name&#34;:&#34;(-0.065, -0.06]&#34;},{&#34;x&#34;:-0.0575,&#34;y&#34;:1,&#34;name&#34;:&#34;(-0.06, -0.055]&#34;},{&#34;x&#34;:-0.0525,&#34;y&#34;:2,&#34;name&#34;:&#34;(-0.055, -0.05]&#34;},{&#34;x&#34;:-0.0475,&#34;y&#34;:1,&#34;name&#34;:&#34;(-0.05, -0.045]&#34;},{&#34;x&#34;:-0.0425,&#34;y&#34;:0,&#34;name&#34;:&#34;(-0.045, -0.04]&#34;},{&#34;x&#34;:-0.0375,&#34;y&#34;:3,&#34;name&#34;:&#34;(-0.04, -0.035]&#34;},{&#34;x&#34;:-0.0325,&#34;y&#34;:4,&#34;name&#34;:&#34;(-0.035, -0.03]&#34;},{&#34;x&#34;:-0.0275,&#34;y&#34;:2,&#34;name&#34;:&#34;(-0.03, -0.025]&#34;},{&#34;x&#34;:-0.0225,&#34;y&#34;:3,&#34;name&#34;:&#34;(-0.025, -0.02]&#34;},{&#34;x&#34;:-0.0175,&#34;y&#34;:9,&#34;name&#34;:&#34;(-0.02, -0.015]&#34;},{&#34;x&#34;:-0.0125,&#34;y&#34;:6,&#34;name&#34;:&#34;(-0.015, -0.01]&#34;},{&#34;x&#34;:-0.00750000000000003,&#34;y&#34;:4,&#34;name&#34;:&#34;(-0.01, -0.00500000000000003]&#34;},{&#34;x&#34;:-0.00250000000000002,&#34;y&#34;:6,&#34;name&#34;:&#34;(-0.00500000000000002, -1.38777878078145e-17]&#34;},{&#34;x&#34;:0.00249999999999999,&#34;y&#34;:11,&#34;name&#34;:&#34;(-1.38777878078145e-17, 0.00499999999999999]&#34;},{&#34;x&#34;:0.00749999999999998,&#34;y&#34;:10,&#34;name&#34;:&#34;(0.00499999999999998, 0.00999999999999998]&#34;},{&#34;x&#34;:0.0125,&#34;y&#34;:12,&#34;name&#34;:&#34;(0.00999999999999997, 0.015]&#34;},{&#34;x&#34;:0.0175,&#34;y&#34;:11,&#34;name&#34;:&#34;(0.015, 0.02]&#34;},{&#34;x&#34;:0.0225,&#34;y&#34;:12,&#34;name&#34;:&#34;(0.02, 0.025]&#34;},{&#34;x&#34;:0.0275,&#34;y&#34;:6,&#34;name&#34;:&#34;(0.025, 0.03]&#34;},{&#34;x&#34;:0.0325,&#34;y&#34;:8,&#34;name&#34;:&#34;(0.03, 0.035]&#34;},{&#34;x&#34;:0.0375,&#34;y&#34;:10,&#34;name&#34;:&#34;(0.035, 0.04]&#34;},{&#34;x&#34;:0.0425,&#34;y&#34;:4,&#34;name&#34;:&#34;(0.04, 0.045]&#34;},{&#34;x&#34;:0.0475,&#34;y&#34;:4,&#34;name&#34;:&#34;(0.045, 0.05]&#34;},{&#34;x&#34;:0.0525,&#34;y&#34;:2,&#34;name&#34;:&#34;(0.05, 0.055]&#34;},{&#34;x&#34;:0.0575,&#34;y&#34;:3,&#34;name&#34;:&#34;(0.055, 0.06]&#34;},{&#34;x&#34;:0.0625,&#34;y&#34;:1,&#34;name&#34;:&#34;(0.06, 0.065]&#34;},{&#34;x&#34;:0.0675,&#34;y&#34;:2,&#34;name&#34;:&#34;(0.065, 0.07]&#34;},{&#34;x&#34;:0.0725,&#34;y&#34;:1,&#34;name&#34;:&#34;(0.07, 0.075]&#34;},{&#34;x&#34;:0.0775,&#34;y&#34;:0,&#34;name&#34;:&#34;(0.075, 0.08]&#34;},{&#34;x&#34;:0.0825,&#34;y&#34;:2,&#34;name&#34;:&#34;(0.08, 0.085]&#34;},{&#34;x&#34;:0.0875,&#34;y&#34;:1,&#34;name&#34;:&#34;(0.085, 0.09]&#34;},{&#34;x&#34;:0.0925,&#34;y&#34;:1,&#34;name&#34;:&#34;(0.09, 0.095]&#34;},{&#34;x&#34;:0.0975,&#34;y&#34;:0,&#34;name&#34;:&#34;(0.095, 0.1]&#34;},{&#34;x&#34;:0.1025,&#34;y&#34;:1,&#34;name&#34;:&#34;(0.1, 0.105]&#34;}],&#34;type&#34;:&#34;column&#34;,&#34;pointRange&#34;:0.005,&#34;groupPadding&#34;:0,&#34;pointPadding&#34;:0,&#34;borderWidth&#34;:0}]},&#34;theme&#34;:{&#34;chart&#34;:{&#34;backgroundColor&#34;:&#34;transparent&#34;}},&#34;conf_opts&#34;:{&#34;global&#34;:{&#34;Date&#34;:null,&#34;VMLRadialGradientURL&#34;:&#34;http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png&#34;,&#34;canvasToolsURL&#34;:&#34;http =//code.highcharts.com/list(version)/modules/canvas-tools.js&#34;,&#34;getTimezoneOffset&#34;:null,&#34;timezoneOffset&#34;:0,&#34;useUTC&#34;:true},&#34;lang&#34;:{&#34;contextButtonTitle&#34;:&#34;Chart context menu&#34;,&#34;decimalPoint&#34;:&#34;.&#34;,&#34;downloadJPEG&#34;:&#34;Download JPEG image&#34;,&#34;downloadPDF&#34;:&#34;Download PDF document&#34;,&#34;downloadPNG&#34;:&#34;Download PNG image&#34;,&#34;downloadSVG&#34;:&#34;Download SVG vector image&#34;,&#34;drillUpText&#34;:&#34;Back to {series.name}&#34;,&#34;invalidDate&#34;:null,&#34;loading&#34;:&#34;Loading...&#34;,&#34;months&#34;:[&#34;January&#34;,&#34;February&#34;,&#34;March&#34;,&#34;April&#34;,&#34;May&#34;,&#34;June&#34;,&#34;July&#34;,&#34;August&#34;,&#34;September&#34;,&#34;October&#34;,&#34;November&#34;,&#34;December&#34;],&#34;noData&#34;:&#34;No data to display&#34;,&#34;numericSymbols&#34;:[&#34;k&#34;,&#34;M&#34;,&#34;G&#34;,&#34;T&#34;,&#34;P&#34;,&#34;E&#34;],&#34;printChart&#34;:&#34;Print chart&#34;,&#34;resetZoom&#34;:&#34;Reset zoom&#34;,&#34;resetZoomTitle&#34;:&#34;Reset zoom level 1:1&#34;,&#34;shortMonths&#34;:[&#34;Jan&#34;,&#34;Feb&#34;,&#34;Mar&#34;,&#34;Apr&#34;,&#34;May&#34;,&#34;Jun&#34;,&#34;Jul&#34;,&#34;Aug&#34;,&#34;Sep&#34;,&#34;Oct&#34;,&#34;Nov&#34;,&#34;Dec&#34;],&#34;thousandsSep&#34;:&#34; &#34;,&#34;weekdays&#34;:[&#34;Sunday&#34;,&#34;Monday&#34;,&#34;Tuesday&#34;,&#34;Wednesday&#34;,&#34;Thursday&#34;,&#34;Friday&#34;,&#34;Saturday&#34;]}},&#34;type&#34;:&#34;chart&#34;,&#34;fonts&#34;:[],&#34;debug&#34;:false},&#34;evals&#34;:[&#34;hc_opts.tooltip.formatter&#34;],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt;Nothing wrong with that chart, and it shows us the distribution of SPY returns. However, &lt;code&gt;highcharter&lt;/code&gt; is missing an easy way to chart multiple histograms, and to add density lines to those multiple histograms. The functionality is fine for one set of returns, but here we want to see the distribution of all of our returns series together.&lt;/p&gt;
&lt;p&gt;For that, we will head to the tidyverse and use &lt;code&gt;ggplot2&lt;/code&gt; on our tidy &lt;code&gt;tibble&lt;/code&gt; called &lt;code&gt;assets_returns_long&lt;/code&gt;. Because it is in long, tidy format, and it is grouped by the ‘asset’ column, we can chart the asset histograms collectively on one chart.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# Make so all titles centered in the upcoming ggplots
theme_update(plot.title = element_text(hjust = 0.5))

asset_returns_long %&amp;gt;% 
  ggplot(aes(x = returns, fill = asset)) + 
  geom_histogram(alpha = 0.25, binwidth = .01)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2017-11-07-introduction-to-visualizing-asset-returns_files/figure-html/unnamed-chunk-5-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Let’s use &lt;code&gt;facet_wrap(~asset)&lt;/code&gt; to break these out by asset. We can add a title with &lt;code&gt;ggtitle&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;asset_returns_long %&amp;gt;% 
  ggplot(aes(x = returns, fill = asset)) + 
  geom_histogram(alpha = 0.25, binwidth = .01) + 
  facet_wrap(~asset) + 
  ggtitle(&amp;quot;Monthly Returns Since 2005&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2017-11-07-introduction-to-visualizing-asset-returns_files/figure-html/unnamed-chunk-6-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Maybe we don’t want to use a histogram, but instead want to use a density line to visualize the various distributions. We can use the &lt;code&gt;stat_density(geom = &amp;quot;line&amp;quot;, alpha = 1)&lt;/code&gt; function to do this. The &lt;code&gt;alpha&lt;/code&gt; argument is selecting a line thickness. Let’s also add a label to the x and y axes with the &lt;code&gt;xlab&lt;/code&gt; and &lt;code&gt;ylab&lt;/code&gt; functions.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;asset_returns_long %&amp;gt;% 
  ggplot(aes(x = returns, colour = asset, fill = asset)) +
  stat_density(geom = &amp;quot;line&amp;quot;, alpha = 1) +
  ggtitle(&amp;quot;Monthly Returns Since 2005&amp;quot;) +
  xlab(&amp;quot;monthly returns&amp;quot;) +
  ylab(&amp;quot;distribution&amp;quot;) &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2017-11-07-introduction-to-visualizing-asset-returns_files/figure-html/unnamed-chunk-7-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;That chart is quite digestible, but we can also &lt;code&gt;facet_wrap(~asset)&lt;/code&gt; to break the densities out into individual charts.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;asset_returns_long %&amp;gt;% 
  ggplot(aes(x = returns, colour = asset, fill = asset)) +
  stat_density(geom = &amp;quot;line&amp;quot;, alpha = 1) +
  facet_wrap(~asset) +
  ggtitle(&amp;quot;Monthly Returns Since 2005&amp;quot;) +
  xlab(&amp;quot;monthly returns&amp;quot;) +
  ylab(&amp;quot;distribution&amp;quot;) &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2017-11-07-introduction-to-visualizing-asset-returns_files/figure-html/unnamed-chunk-8-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Now we can combine all of our ggplots into one nice, faceted plot.&lt;/p&gt;
&lt;p&gt;At the same time, to add to the aesthetic toolkit a bit, we will do some editing to the label colors. First off, let’s choose a different color besides black to be the theme. I will go with cornflower blue, because it’s a nice shade and I don’t see it used very frequently elsewhere. Once we have a color, we can choose the different elements of the chart to change in the the &lt;code&gt;theme&lt;/code&gt; function. I make a lot of changes here by way of example but feel free to comment out a few of those lines and see the different options.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;asset_returns_long %&amp;gt;% 
  ggplot(aes(x = returns, colour = asset, fill = asset)) +
  stat_density(geom = &amp;quot;line&amp;quot;, alpha = 1) +
  geom_histogram(alpha = 0.25, binwidth = .01) +
  facet_wrap(~asset) +
  ggtitle(&amp;quot;Monthly Returns Since 2005&amp;quot;) +
  xlab(&amp;quot;monthly returns&amp;quot;) +
  ylab(&amp;quot;distribution&amp;quot;) +
  # Lots of elements can be customized in the theme() function
  theme(plot.title = element_text(colour = &amp;quot;cornflowerblue&amp;quot;),  
        strip.text.x = element_text(size = 8, colour = &amp;quot;white&amp;quot;), 
        strip.background = element_rect(colour = &amp;quot;white&amp;quot;, fill = &amp;quot;cornflowerblue&amp;quot;), 
        axis.text.x = element_text(colour = &amp;quot;cornflowerblue&amp;quot;), 
        axis.text = element_text(colour = &amp;quot;cornflowerblue&amp;quot;), 
        axis.ticks.x = element_line(colour = &amp;quot;cornflowerblue&amp;quot;), 
        axis.text.y = element_text(colour = &amp;quot;cornflowerblue&amp;quot;), 
        axis.ticks.y = element_line(colour = &amp;quot;cornflowerblue&amp;quot;),
        axis.title = element_text(colour = &amp;quot;cornflowerblue&amp;quot;),
        legend.title = element_text(colour = &amp;quot;cornflowerblue&amp;quot;),
        legend.text = element_text(colour = &amp;quot;cornflowerblue&amp;quot;)
        )&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2017-11-07-introduction-to-visualizing-asset-returns_files/figure-html/unnamed-chunk-9-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;We now have one chart, with histograms and line densities broken out for each of our assets. This would scale nicely if we had more assets and wanted to peek at more distributions of returns.&lt;/p&gt;
&lt;p&gt;We have not done any substantive work today, but the chart of monthly returns is a tool to quickly glance at the data and see if anything unusual jumps out, or some sort of hypothesis comes to mind. We are going to be combining these assets into a portfolio and, once that occurs, we will rarely view the assets in isolation again. Before that leap to portfolio building, it’s a good idea to glance at the portfolio component distributions.&lt;/p&gt;
&lt;p&gt;That’s all for today. Thanks for reading!&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2017/11/09/introduction-to-visualizing-asset-returns/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>Visualizing Portfolio Volatility</title>
      <link>https://rviews.rstudio.com/2017/07/21/visualizing-portfolio-volatility/</link>
      <pubDate>Fri, 21 Jul 2017 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2017/07/21/visualizing-portfolio-volatility/</guid>
      <description>
        
&lt;script src=&#34;/rmarkdown-libs/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/jquery/jquery.min.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/proj4js/proj4.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;/rmarkdown-libs/highcharts/css/motion.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/highstock.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/highcharts-3d.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/highcharts-more.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/annotations.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/broken-axis.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/data.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/drilldown.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/exporting.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/funnel.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/heatmap.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/map.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/no-data-to-display.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/offline-exporting.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/solid-gauge.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/modules/treemap.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/annotations.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/draggable-legend.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/draggable-points.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/export-csv.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/grouped-categories.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/motion.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/pattern-fill-v2.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/plugins/tooltip-delay.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/custom/reset.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/custom/symbols-extra.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/highcharts/custom/text-symbols.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;/rmarkdown-libs/fontawesome/font-awesome.min.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;link href=&#34;/rmarkdown-libs/htmlwdgtgrid/htmlwdgtgrid.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;/rmarkdown-libs/highchart-binding/highchart.js&#34;&gt;&lt;/script&gt;

&lt;p&gt;This is the third post in our series on portfolio volatility, variance and standard deviation. If you want to start at the beginning with calculating portfolio volatility, have a look at the first post &lt;a href=&#34;https://rviews.rstudio.com/2017/07/12/introduction-to-volatility/&#34;&gt;here - Intro to Volatility&lt;/a&gt;. The second post on calculating rolling standard deviations is &lt;a href=&#34;url&#34;&gt;here: Intro to Rolling Volatility&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Today we will visualize rolling standard deviations with &lt;code&gt;highcharter&lt;/code&gt; using two objects from that second post.&lt;/p&gt;
&lt;p&gt;The charts, which are the fun payoff after all of the equations and functions that we have ground out in the previous posts, should highlight any unusual occurrences or volatility spikes/dips that we might want to investigate.&lt;/p&gt;
&lt;p&gt;First, load the &lt;code&gt;.RDat&lt;/code&gt; file saved from our previous Notebook (or you can run the scripts from the previous posts).&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;load(&amp;#39;rolling-sd.RDat&amp;#39;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We now have 2 objects in our Global Environment - &lt;code&gt;spy_rolling_sd&lt;/code&gt; - an &lt;code&gt;xts&lt;/code&gt; object of rolling SPY standard deviations - &lt;code&gt;roll_portfolio_result&lt;/code&gt; - an &lt;code&gt;xts&lt;/code&gt; object of rolling portfolio standard deviations. Because both of those are &lt;code&gt;xts&lt;/code&gt; objects, we can pass them straight to &lt;code&gt;highcharter&lt;/code&gt; with the &lt;code&gt;hc_add_series()&lt;/code&gt; function and set a name and a color with the &lt;code&gt;name&lt;/code&gt; and &lt;code&gt;color&lt;/code&gt; arguments. Nothing too complicated here - we did the hard work in our previous Notebooks.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;highchart(type = &amp;quot;stock&amp;quot;) %&amp;gt;%
  hc_title(text = &amp;quot;SPY v. Portfolio Rolling Volatility&amp;quot;) %&amp;gt;%
  hc_add_series(spy_rolling_sd, name = &amp;quot;SPY Volatility&amp;quot;, color = &amp;quot;blue&amp;quot;) %&amp;gt;%
  hc_add_series(roll_portfolio_result, name = &amp;quot;Port Volatility&amp;quot;, color = &amp;quot;green&amp;quot;) %&amp;gt;%
  hc_navigator(enabled = FALSE) %&amp;gt;% 
  hc_scrollbar(enabled = FALSE)&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-b30476b8f1a2865a215f&#34; style=&#34;width:100%;height:500px;&#34; class=&#34;highchart html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-b30476b8f1a2865a215f&#34;&gt;{&#34;x&#34;:{&#34;hc_opts&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;SPY v. Portfolio Rolling Volatility&#34;},&#34;yAxis&#34;:{&#34;title&#34;:{&#34;text&#34;:null}},&#34;credits&#34;:{&#34;enabled&#34;:false},&#34;exporting&#34;:{&#34;enabled&#34;:false},&#34;plotOptions&#34;:{&#34;series&#34;:{&#34;turboThreshold&#34;:0},&#34;treemap&#34;:{&#34;layoutAlgorithm&#34;:&#34;squarified&#34;},&#34;bubble&#34;:{&#34;minSize&#34;:5,&#34;maxSize&#34;:25}},&#34;annotationsOptions&#34;:{&#34;enabledButtons&#34;:false},&#34;tooltip&#34;:{&#34;delayForDisplay&#34;:10},&#34;series&#34;:[{&#34;data&#34;:[[1375228800000,0.0230087834710489],[1377820800000,0.0310554927963628],[1380499200000,0.0303154391342273],[1383177600000,0.0333351835060359],[1385683200000,0.033679613898303],[1388448000000,0.0288400976907278],[1391126400000,0.0338190396691738],[1393545600000,0.029904383528237],[1396224000000,0.0305942566371719],[1398816000000,0.0275796530645834],[1401408000000,0.0268834182854031],[1404086400000,0.0266169197325657],[1406764800000,0.019606506360967],[1409270400000,0.0178261554082542],[1412035200000,0.0218704877587742],[1414713600000,0.0226129041709753],[1417132800000,0.0230956127375855],[1419984000000,0.0243598131833272],[1422576000000,0.0279750349266381],[1424995200000,0.0322177953429278],[1427760000000,0.0325097911709751],[1430352000000,0.0316790953242732],[1432857600000,0.0302347213514618],[1435622400000,0.0322755984506811],[1438300800000,0.029389462373966],[1440979200000,0.0321307589009705],[1443571200000,0.032984375371157],[1446163200000,0.050852177600668],[1448841600000,0.0505138108788652],[1451520000000,0.0503340252080932],[1454025600000,0.0522341207818885],[1456704000000,0.046219715155029],[1459382400000,0.0504880420143848],[1461888000000,0.0371553096877483],[1464652800000,0.0378912457951088],[1467244800000,0.0361050285668243],[1469750400000,0.0250938017057704],[1472601600000,0.0246028353527571],[1475193600000,0.0153415995353276],[1477872000000,0.0187392260707039],[1480464000000,0.0224796653731647],[1483056000000,0.0220139494031393],[1485820800000,0.018927657566137],[1488240000000,0.0221800497260555],[1490918400000,0.0218674879816177],[1493337600000,0.0159545004191706],[1496188800000,0.0135388212505291],[1498780800000,0.014675445173365],[1500508800000,0.0150096717916259]],&#34;name&#34;:&#34;SPY Volatility&#34;,&#34;color&#34;:&#34;blue&#34;},{&#34;data&#34;:[[1377820800000,0.0241115216143897],[1380499200000,0.0260442402607256],[1383177600000,0.0272674443067543],[1385683200000,0.0288719473982621],[1388448000000,0.0288857557055273],[1391126400000,0.0205191246489011],[1393545600000,0.0260055041878384],[1396224000000,0.0264271524902842],[1398816000000,0.0265816646662814],[1401408000000,0.0249591129630544],[1404086400000,0.0249769037782382],[1406764800000,0.0247281123755299],[1409270400000,0.0199346459519581],[1412035200000,0.0139540306559013],[1414713600000,0.0197192962226576],[1417132800000,0.0198713309717489],[1419984000000,0.0190676195505098],[1422576000000,0.0222013376079352],[1424995200000,0.0230297501738257],[1427760000000,0.0319188848721891],[1430352000000,0.0312580175470481],[1432857600000,0.0321510597602722],[1435622400000,0.031875737738177],[1438300800000,0.031631756790222],[1440979200000,0.0295208333915207],[1443571200000,0.0272649913296038],[1446163200000,0.0278878899612652],[1448841600000,0.0415543963149301],[1451520000000,0.0411460482731848],[1454025600000,0.0412861897878856],[1456704000000,0.0435368174613372],[1459382400000,0.0395236110434442],[1461888000000,0.0461989881404102],[1464652800000,0.0360002783258131],[1467244800000,0.0370928565224689],[1469750400000,0.0348749773237639],[1472601600000,0.0258599246690703],[1475193600000,0.0235703025145043],[1477872000000,0.0130155131890959],[1480464000000,0.0163314552380049],[1483056000000,0.0156270326216257],[1485820800000,0.0141434664632901],[1488240000000,0.0120186849784016],[1490918400000,0.0143345865051231],[1493337600000,0.014532447732245],[1496188800000,0.00807871448547398],[1498780800000,0.00794794549875872],[1500508800000,0.0132875445224473]],&#34;name&#34;:&#34;Port Volatility&#34;,&#34;color&#34;:&#34;green&#34;}],&#34;navigator&#34;:{&#34;enabled&#34;:false},&#34;scrollbar&#34;:{&#34;enabled&#34;:false}},&#34;theme&#34;:{&#34;chart&#34;:{&#34;backgroundColor&#34;:&#34;transparent&#34;}},&#34;conf_opts&#34;:{&#34;global&#34;:{&#34;Date&#34;:null,&#34;VMLRadialGradientURL&#34;:&#34;http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png&#34;,&#34;canvasToolsURL&#34;:&#34;http =//code.highcharts.com/list(version)/modules/canvas-tools.js&#34;,&#34;getTimezoneOffset&#34;:null,&#34;timezoneOffset&#34;:0,&#34;useUTC&#34;:true},&#34;lang&#34;:{&#34;contextButtonTitle&#34;:&#34;Chart context menu&#34;,&#34;decimalPoint&#34;:&#34;.&#34;,&#34;downloadJPEG&#34;:&#34;Download JPEG image&#34;,&#34;downloadPDF&#34;:&#34;Download PDF document&#34;,&#34;downloadPNG&#34;:&#34;Download PNG image&#34;,&#34;downloadSVG&#34;:&#34;Download SVG vector image&#34;,&#34;drillUpText&#34;:&#34;Back to {series.name}&#34;,&#34;invalidDate&#34;:null,&#34;loading&#34;:&#34;Loading...&#34;,&#34;months&#34;:[&#34;January&#34;,&#34;February&#34;,&#34;March&#34;,&#34;April&#34;,&#34;May&#34;,&#34;June&#34;,&#34;July&#34;,&#34;August&#34;,&#34;September&#34;,&#34;October&#34;,&#34;November&#34;,&#34;December&#34;],&#34;noData&#34;:&#34;No data to display&#34;,&#34;numericSymbols&#34;:[&#34;k&#34;,&#34;M&#34;,&#34;G&#34;,&#34;T&#34;,&#34;P&#34;,&#34;E&#34;],&#34;printChart&#34;:&#34;Print chart&#34;,&#34;resetZoom&#34;:&#34;Reset zoom&#34;,&#34;resetZoomTitle&#34;:&#34;Reset zoom level 1:1&#34;,&#34;shortMonths&#34;:[&#34;Jan&#34;,&#34;Feb&#34;,&#34;Mar&#34;,&#34;Apr&#34;,&#34;May&#34;,&#34;Jun&#34;,&#34;Jul&#34;,&#34;Aug&#34;,&#34;Sep&#34;,&#34;Oct&#34;,&#34;Nov&#34;,&#34;Dec&#34;],&#34;thousandsSep&#34;:&#34; &#34;,&#34;weekdays&#34;:[&#34;Sunday&#34;,&#34;Monday&#34;,&#34;Tuesday&#34;,&#34;Wednesday&#34;,&#34;Thursday&#34;,&#34;Friday&#34;,&#34;Saturday&#34;]}},&#34;type&#34;:&#34;stock&#34;,&#34;fonts&#34;:[],&#34;debug&#34;:false},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt;It is interesting to note that from late April 2016 to late October 2016, SPY’s rolling standard deviation dipped below that of the diversified portfolio. The portfolio volatility was plunging at the same time, but SPY’s was falling faster. What happened over the 6 preceding months to explain this?&lt;/p&gt;
&lt;p&gt;Maybe we should add a flag to highlight this event. We can also add flags for the maximum SPY volatility, maximum and minimum portfolio rolling volatility and might as well include a line for the mean rolling volatility of SPY to practice adding horizontal lines.&lt;/p&gt;
&lt;p&gt;We will use two methods for adding flags. First, we’ll hard code the date for the flag as “2016-04-29” using the date when rolling SPY volatility dipped below the portfolio. Second, we’ll set a flag with the date&lt;br /&gt;
&lt;code&gt;as.Date(index(roll_portfolio_result[which.max(roll_portfolio_result)]),format = &amp;quot;%Y-%m-%d&amp;quot;)&lt;/code&gt; which looks like a convoluted mess but is adding a date for whenever the rolling portfolio standard deviation hit its maximum.&lt;/p&gt;
&lt;p&gt;This is a bit more ‘dynamic’ because we can change our assets but keep this code the same and it will find the date with the maximum rolling standard deviation. Our first flag is not dynamic in the sense that it is specific to the comparison between SPY and this exact portfolio.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;spy_important_date &amp;lt;- as.Date(c(&amp;quot;2016-04-29&amp;quot;), format = &amp;quot;%Y-%m-%d&amp;quot;)

port_max_date &amp;lt;- as.Date(index(roll_portfolio_result[which.max(roll_portfolio_result)]),
                         format = &amp;quot;%Y-%m-%d&amp;quot;)
port_min_date &amp;lt;- as.Date(index(roll_portfolio_result[which.min(roll_portfolio_result)]),
                         format = &amp;quot;%Y-%m-%d&amp;quot;)
spy_max_date &amp;lt;- as.Date(index(spy_rolling_sd[which.max(spy_rolling_sd)]),
                         format = &amp;quot;%Y-%m-%d&amp;quot;)


highchart(type = &amp;quot;stock&amp;quot;) %&amp;gt;%
  hc_title(text = &amp;quot;SPY v. Portfolio Rolling Volatility&amp;quot;) %&amp;gt;%
  hc_add_series(spy_rolling_sd, name = &amp;quot;SPY Volatility&amp;quot;, color = &amp;quot;blue&amp;quot;, id = &amp;quot;SPY&amp;quot;) %&amp;gt;%
  hc_add_series(roll_portfolio_result, name = &amp;quot;Portf Volatility&amp;quot;, color = &amp;quot;green&amp;quot;, id = &amp;quot;Port&amp;quot;) %&amp;gt;%
  hc_add_series_flags(spy_important_date,
                      title = c(&amp;quot;SPY Vol Dips&amp;quot;), 
                      text = c(&amp;quot;SPY rolling sd dips below portfolio.&amp;quot;),
                      id = &amp;quot;SPY&amp;quot;) %&amp;gt;%
  hc_add_series_flags(spy_max_date,
                      title = c(&amp;quot;SPY Max &amp;quot;), 
                      text = c(&amp;quot;SPY max rolling volatility.&amp;quot;),
                      id = &amp;quot;SPY&amp;quot;) %&amp;gt;%
   hc_add_series_flags(port_max_date,
                      title = c(&amp;quot;Portf Max&amp;quot;), 
                      text = c(&amp;quot;Portfolio maximum rolling volatility.&amp;quot;),
                      id = &amp;quot;Port&amp;quot;) %&amp;gt;%
  hc_add_series_flags(port_min_date,
                      title = c(&amp;quot;Portf Min&amp;quot;), 
                      text = c(&amp;quot;Portfolio min rolling volatility.&amp;quot;),
                      id = &amp;quot;Port&amp;quot;) %&amp;gt;%
  hc_yAxis(title = list(text = &amp;quot;Mean SPY rolling Vol&amp;quot;),
           showFirstLabel = FALSE,
           showLastLabel = FALSE,
           plotLines = list(
             list(value = mean(spy_rolling_sd), color = &amp;quot;#2b908f&amp;quot;, width = 2)))  %&amp;gt;% 
  hc_navigator(enabled = FALSE) %&amp;gt;% 
  hc_scrollbar(enabled = FALSE)&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-d7457e81afd8384f4040&#34; style=&#34;width:100%;height:500px;&#34; class=&#34;highchart html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-d7457e81afd8384f4040&#34;&gt;{&#34;x&#34;:{&#34;hc_opts&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;SPY v. Portfolio Rolling Volatility&#34;},&#34;yAxis&#34;:{&#34;title&#34;:{&#34;text&#34;:&#34;Mean SPY rolling Vol&#34;},&#34;showFirstLabel&#34;:false,&#34;showLastLabel&#34;:false,&#34;plotLines&#34;:[{&#34;value&#34;:0.0291554812507092,&#34;color&#34;:&#34;#2b908f&#34;,&#34;width&#34;:2}]},&#34;credits&#34;:{&#34;enabled&#34;:false},&#34;exporting&#34;:{&#34;enabled&#34;:false},&#34;plotOptions&#34;:{&#34;series&#34;:{&#34;turboThreshold&#34;:0},&#34;treemap&#34;:{&#34;layoutAlgorithm&#34;:&#34;squarified&#34;},&#34;bubble&#34;:{&#34;minSize&#34;:5,&#34;maxSize&#34;:25}},&#34;annotationsOptions&#34;:{&#34;enabledButtons&#34;:false},&#34;tooltip&#34;:{&#34;delayForDisplay&#34;:10},&#34;series&#34;:[{&#34;data&#34;:[[1375228800000,0.0230087834710489],[1377820800000,0.0310554927963628],[1380499200000,0.0303154391342273],[1383177600000,0.0333351835060359],[1385683200000,0.033679613898303],[1388448000000,0.0288400976907278],[1391126400000,0.0338190396691738],[1393545600000,0.029904383528237],[1396224000000,0.0305942566371719],[1398816000000,0.0275796530645834],[1401408000000,0.0268834182854031],[1404086400000,0.0266169197325657],[1406764800000,0.019606506360967],[1409270400000,0.0178261554082542],[1412035200000,0.0218704877587742],[1414713600000,0.0226129041709753],[1417132800000,0.0230956127375855],[1419984000000,0.0243598131833272],[1422576000000,0.0279750349266381],[1424995200000,0.0322177953429278],[1427760000000,0.0325097911709751],[1430352000000,0.0316790953242732],[1432857600000,0.0302347213514618],[1435622400000,0.0322755984506811],[1438300800000,0.029389462373966],[1440979200000,0.0321307589009705],[1443571200000,0.032984375371157],[1446163200000,0.050852177600668],[1448841600000,0.0505138108788652],[1451520000000,0.0503340252080932],[1454025600000,0.0522341207818885],[1456704000000,0.046219715155029],[1459382400000,0.0504880420143848],[1461888000000,0.0371553096877483],[1464652800000,0.0378912457951088],[1467244800000,0.0361050285668243],[1469750400000,0.0250938017057704],[1472601600000,0.0246028353527571],[1475193600000,0.0153415995353276],[1477872000000,0.0187392260707039],[1480464000000,0.0224796653731647],[1483056000000,0.0220139494031393],[1485820800000,0.018927657566137],[1488240000000,0.0221800497260555],[1490918400000,0.0218674879816177],[1493337600000,0.0159545004191706],[1496188800000,0.0135388212505291],[1498780800000,0.014675445173365],[1500508800000,0.0150096717916259]],&#34;name&#34;:&#34;SPY Volatility&#34;,&#34;color&#34;:&#34;blue&#34;,&#34;id&#34;:&#34;SPY&#34;},{&#34;data&#34;:[[1377820800000,0.0241115216143897],[1380499200000,0.0260442402607256],[1383177600000,0.0272674443067543],[1385683200000,0.0288719473982621],[1388448000000,0.0288857557055273],[1391126400000,0.0205191246489011],[1393545600000,0.0260055041878384],[1396224000000,0.0264271524902842],[1398816000000,0.0265816646662814],[1401408000000,0.0249591129630544],[1404086400000,0.0249769037782382],[1406764800000,0.0247281123755299],[1409270400000,0.0199346459519581],[1412035200000,0.0139540306559013],[1414713600000,0.0197192962226576],[1417132800000,0.0198713309717489],[1419984000000,0.0190676195505098],[1422576000000,0.0222013376079352],[1424995200000,0.0230297501738257],[1427760000000,0.0319188848721891],[1430352000000,0.0312580175470481],[1432857600000,0.0321510597602722],[1435622400000,0.031875737738177],[1438300800000,0.031631756790222],[1440979200000,0.0295208333915207],[1443571200000,0.0272649913296038],[1446163200000,0.0278878899612652],[1448841600000,0.0415543963149301],[1451520000000,0.0411460482731848],[1454025600000,0.0412861897878856],[1456704000000,0.0435368174613372],[1459382400000,0.0395236110434442],[1461888000000,0.0461989881404102],[1464652800000,0.0360002783258131],[1467244800000,0.0370928565224689],[1469750400000,0.0348749773237639],[1472601600000,0.0258599246690703],[1475193600000,0.0235703025145043],[1477872000000,0.0130155131890959],[1480464000000,0.0163314552380049],[1483056000000,0.0156270326216257],[1485820800000,0.0141434664632901],[1488240000000,0.0120186849784016],[1490918400000,0.0143345865051231],[1493337600000,0.014532447732245],[1496188800000,0.00807871448547398],[1498780800000,0.00794794549875872],[1500508800000,0.0132875445224473]],&#34;name&#34;:&#34;Portf Volatility&#34;,&#34;color&#34;:&#34;green&#34;,&#34;id&#34;:&#34;Port&#34;},{&#34;data&#34;:[{&#34;x&#34;:1461888000000,&#34;title&#34;:&#34;SPY Vol Dips&#34;,&#34;text&#34;:&#34;SPY rolling sd dips below portfolio.&#34;}],&#34;onSeries&#34;:&#34;SPY&#34;,&#34;type&#34;:&#34;flags&#34;},{&#34;data&#34;:[{&#34;x&#34;:1454025600000,&#34;title&#34;:&#34;SPY Max &#34;,&#34;text&#34;:&#34;SPY max rolling volatility.&#34;}],&#34;onSeries&#34;:&#34;SPY&#34;,&#34;type&#34;:&#34;flags&#34;},{&#34;data&#34;:[{&#34;x&#34;:1461888000000,&#34;title&#34;:&#34;Portf Max&#34;,&#34;text&#34;:&#34;Portfolio maximum rolling volatility.&#34;}],&#34;onSeries&#34;:&#34;Port&#34;,&#34;type&#34;:&#34;flags&#34;},{&#34;data&#34;:[{&#34;x&#34;:1498780800000,&#34;title&#34;:&#34;Portf Min&#34;,&#34;text&#34;:&#34;Portfolio min rolling volatility.&#34;}],&#34;onSeries&#34;:&#34;Port&#34;,&#34;type&#34;:&#34;flags&#34;}],&#34;navigator&#34;:{&#34;enabled&#34;:false},&#34;scrollbar&#34;:{&#34;enabled&#34;:false}},&#34;theme&#34;:{&#34;chart&#34;:{&#34;backgroundColor&#34;:&#34;transparent&#34;}},&#34;conf_opts&#34;:{&#34;global&#34;:{&#34;Date&#34;:null,&#34;VMLRadialGradientURL&#34;:&#34;http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png&#34;,&#34;canvasToolsURL&#34;:&#34;http =//code.highcharts.com/list(version)/modules/canvas-tools.js&#34;,&#34;getTimezoneOffset&#34;:null,&#34;timezoneOffset&#34;:0,&#34;useUTC&#34;:true},&#34;lang&#34;:{&#34;contextButtonTitle&#34;:&#34;Chart context menu&#34;,&#34;decimalPoint&#34;:&#34;.&#34;,&#34;downloadJPEG&#34;:&#34;Download JPEG image&#34;,&#34;downloadPDF&#34;:&#34;Download PDF document&#34;,&#34;downloadPNG&#34;:&#34;Download PNG image&#34;,&#34;downloadSVG&#34;:&#34;Download SVG vector image&#34;,&#34;drillUpText&#34;:&#34;Back to {series.name}&#34;,&#34;invalidDate&#34;:null,&#34;loading&#34;:&#34;Loading...&#34;,&#34;months&#34;:[&#34;January&#34;,&#34;February&#34;,&#34;March&#34;,&#34;April&#34;,&#34;May&#34;,&#34;June&#34;,&#34;July&#34;,&#34;August&#34;,&#34;September&#34;,&#34;October&#34;,&#34;November&#34;,&#34;December&#34;],&#34;noData&#34;:&#34;No data to display&#34;,&#34;numericSymbols&#34;:[&#34;k&#34;,&#34;M&#34;,&#34;G&#34;,&#34;T&#34;,&#34;P&#34;,&#34;E&#34;],&#34;printChart&#34;:&#34;Print chart&#34;,&#34;resetZoom&#34;:&#34;Reset zoom&#34;,&#34;resetZoomTitle&#34;:&#34;Reset zoom level 1:1&#34;,&#34;shortMonths&#34;:[&#34;Jan&#34;,&#34;Feb&#34;,&#34;Mar&#34;,&#34;Apr&#34;,&#34;May&#34;,&#34;Jun&#34;,&#34;Jul&#34;,&#34;Aug&#34;,&#34;Sep&#34;,&#34;Oct&#34;,&#34;Nov&#34;,&#34;Dec&#34;],&#34;thousandsSep&#34;:&#34; &#34;,&#34;weekdays&#34;:[&#34;Sunday&#34;,&#34;Monday&#34;,&#34;Tuesday&#34;,&#34;Wednesday&#34;,&#34;Thursday&#34;,&#34;Friday&#34;,&#34;Saturday&#34;]}},&#34;type&#34;:&#34;stock&#34;,&#34;fonts&#34;:[],&#34;debug&#34;:false},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt;Hover on the flags and you can see the text we added for explanation.&lt;/p&gt;
&lt;p&gt;It’s remarkable how rolling volatility has absolutely plunged since early-to-mid 2016. Since August of 2016, both the portfolio and SPY rolling standard deviations have been well below the SPY mean.&lt;/p&gt;
&lt;p&gt;Thanks for sticking with this three-part introduction to volatility. Next time, we’ll port our work to Shiny and play with different assets and allocations.&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2017/07/21/visualizing-portfolio-volatility/&#39;;&lt;/script&gt;
      </description>
    </item>
    
  </channel>
</rss>
