PageSourceSearch

https://jessrosenberg14.github.io/plotly.html

html jessrosenberg14.github.io collected 2026-10-03 09:22:58 UTC 46,645 bytes, 503 lines download raw bytes

1<!DOCTYPE html>
2
3<html>
4
5<head>
6
7<meta charset="utf-8" />
8<meta name="generator" content="pandoc" />
9<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
10
11
12
13
14<title>Plotly</title>
15
16<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
vendor: 1 bytes, line 16
16
17<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
17
18<meta name="viewport" content="width=device-width, initial-scale=1" />
19<link href="site_libs/bootstrap-3.3.5/css/yeti.min.css" rel="stylesheet" />
20<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
vendor: 1 bytes, line 20
20
21<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
vendor: 1 bytes, line 21
21
22<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
22
23<style>h1 {font-size: 34px;}
24       h1.title {font-size: 38px;}
25       h2 {font-size: 30px;}
26       h3 {font-size: 24px;}
27       h4 {font-size: 18px;}
28       h5 {font-size: 16px;}
29       h6 {font-size: 12px;}
30       code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
31       pre:not([class]) { background-color: white }</style>
32<script src="site_libs/navigation-1.1/tabsets.js"></script>
vendor: 1 bytes, line 32
32
33<script src="site_libs/navigation-1.1/codefolding.js"></script>
33
34<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
35<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
vendor: 1 bytes, line 35
35
36<script src="site_libs/htmlwidgets-1.5.4/htmlwidgets.js"></script>
vendor: 1 bytes, line 36
36
37<script src="site_libs/plotly-binding-4.10.0/plotly.js"></script>
vendor: 1 bytes, line 37
37
38<script src="site_libs/typedarray-0.1/typedarray.min.js"></script>
38
39<link href="site_libs/crosstalk-1.1.1/css/crosstalk.css" rel="stylesheet" />
40<script src="site_libs/crosstalk-1.1.1/js/crosstalk.min.js"></script>
40
41<link href="site_libs/plotly-htmlwidgets-css-2.5.1/plotly-htmlwidgets.css" rel="stylesheet" />
42<script src="site_libs/plotly-main-2.5.1/plotly-latest.min.js"></script>
42
43<link href="site_libs/font-awesome-5.1.0/css/all.css" rel="stylesheet" />
44<link href="site_libs/font-awesome-5.1.0/css/v4-shims.css" rel="stylesheet" />
45
46<style type="text/css">
47  code{white-space: pre-wrap;}
48  span.smallcaps{font-variant: small-caps;}
49  span.underline{text-decoration: underline;}
50  div.column{display: inline-block; vertical-align: top; width: 50%;}
51  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
52  ul.task-list{list-style: none;}
53    </style>
54
55<style type="text/css">code{white-space: pre;}</style>
56<script type="text/javascript">
57if (window.hljs) {
58  hljs.configure({languages: []});
59  hljs.initHighlightingOnLoad();
60  if (document.readyState && document.readyState === "complete") {
61    window.setTimeout(function() { hljs.initHighlighting(); }, 0);
62  }
63}
64</script>
64
65
66
67
68
69
70
71
72
73<style type = "text/css">
74.main-container {
75  max-width: 940px;
76  margin-left: auto;
77  margin-right: auto;
78}
79img {
80  max-width:100%;
81}
82.tabbed-pane {
83  padding-top: 12px;
84}
85.html-widget {
86  margin-bottom: 20px;
87}
88button.code-folding-btn:focus {
89  outline: none;
90}
91summary {
92  display: list-item;
93}
94pre code {
95  padding: 0;
96}
97</style>
98
99
100<style type="text/css">
101.dropdown-submenu {
102  position: relative;
103}
104.dropdown-submenu>.dropdown-menu {
105  top: 0;
106  left: 100%;
107  margin-top: -6px;
108  margin-left: -1px;
109  border-radius: 0 6px 6px 6px;
110}
111.dropdown-submenu:hover>.dropdown-menu {
112  display: block;
113}
114.dropdown-submenu>a:after {
115  display: block;
116  content: " ";
117  float: right;
118  width: 0;
119  height: 0;
120  border-color: transparent;
121  border-style: solid;
122  border-width: 5px 0 5px 5px;
123  border-left-color: #cccccc;
124  margin-top: 5px;
125  margin-right: -10px;
126}
127.dropdown-submenu:hover>a:after {
128  border-left-color: #adb5bd;
129}
130.dropdown-submenu.pull-left {
131  float: none;
132}
133.dropdown-submenu.pull-left>.dropdown-menu {
134  left: -100%;
135  margin-left: 10px;
136  border-radius: 6px 0 6px 6px;
137}
138</style>
139
140<script type="text/javascript">
141// manage active state of menu based on current page
142$(document).ready(function () {
143  // active menu anchor
144  href = window.location.pathname
145  href = href.substr(href.lastIndexOf('/') + 1)
146  if (href === "")
147    href = "index.html";
148  var menuAnchor = $('a[href="' + href + '"]');
149
150  // mark it active
151  menuAnchor.tab('show');
152
153  // if it's got a parent navbar menu mark it active as well
154  menuAnchor.closest('li.dropdown').addClass('active');
155
156  // Navbar adjustments
157  var navHeight = $(".navbar").first().height() + 15;
158  var style = document.createElement('style');
159  var pt = "padding-top: " + navHeight + "px; ";
160  var mt = "margin-top: -" + navHeight + "px; ";
161  var css = "";
162  // offset scroll position for anchor links (for fixed navbar)
163  for (var i = 1; i <= 6; i++) {
164    css += ".section h" + i + "{ " + pt + mt + "}\n";
165  }
166  style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
167  document.head.appendChild(style);
168});
169</script>
169
170
171<!-- tabsets -->
172
173<style type="text/css">
174.tabset-dropdown > .nav-tabs {
175  display: inline-table;
176  max-height: 500px;
177  min-height: 44px;
178  overflow-y: auto;
179  border: 1px solid #ddd;
180  border-radius: 4px;
181}
182
183.tabset-dropdown > .nav-tabs > li.active:before {
184  content: "";
185  font-family: 'Glyphicons Halflings';
186  display: inline-block;
187  padding: 10px;
188  border-right: 1px solid #ddd;
189}
190
191.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
192  content: "&#xe258;";
193  border: none;
194}
195
196.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
197  content: "";
198  font-family: 'Glyphicons Halflings';
199  display: inline-block;
200  padding: 10px;
201  border-right: 1px solid #ddd;
202}
203
204.tabset-dropdown > .nav-tabs > li.active {
205  display: block;
206}
207
208.tabset-dropdown > .nav-tabs > li > a,
209.tabset-dropdown > .nav-tabs > li > a:focus,
210.tabset-dropdown > .nav-tabs > li > a:hover {
211  border: none;
212  display: inline-block;
213  border-radius: 4px;
214  background-color: transparent;
215}
216
217.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
218  display: block;
219  float: none;
220}
221
222.tabset-dropdown > .nav-tabs > li {
223  display: none;
224}
225</style>
226
227<!-- code folding -->
228<style type="text/css">
229.code-folding-btn { margin-bottom: 4px; }
230</style>
231
232
233
234
235</head>
236
237<body>
238
239
240<div class="container-fluid main-container">
241
242
243
244
245<div class="navbar navbar-default  navbar-fixed-top" role="navigation">
246  <div class="container">
247    <div class="navbar-header">
248      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
249        <span class="icon-bar"></span>
250        <span class="icon-bar"></span>
251        <span class="icon-bar"></span>
252      </button>
253      <a class="navbar-brand" href="index.html">Home</a>
254    </div>
255    <div id="navbar" class="navbar-collapse collapse">
256      <ul class="nav navbar-nav">
257        
258      </ul>
259      <ul class="nav navbar-nav navbar-right">
260        <li>
261  <a href="about.html">About</a>
262</li>
263<li>
264  <a href="plotly.html">Plotly</a>
265</li>
266<li>
267  <a href="dashboard.html">Dashboard</a>
268</li>
269<li>
270  <a href="mailto:&lt;[email protected]&gt;">
271    <span class="fa fa-envelope fa-lg"></span>
272     
273  </a>
274</li>
275<li>
276  <a href="http://github.com/jessrosenberg14/">
277    <span class="fa fa-github fa-lg"></span>
278     
279  </a>
280</li>
281<li>
282  <a href="https://www.linkedin.com/in/jessicadrosenberg/">
283    <span class="fab fa-linkedin"></span>
284     
285  </a>
286</li>
287      </ul>
288    </div><!--/.nav-collapse -->
289  </div><!--/.container -->
290</div><!--/.navbar -->
291
292<div id="header">
293
294<div class="btn-group pull-right float-right">
295<button type="button" class="btn btn-default btn-xs btn-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span>Code</span> <span class="caret"></span></button>
296<ul class="dropdown-menu dropdown-menu-right" style="min-width: 50px;">
297<li><a id="rmd-show-all-code" href="#">Show All Code</a></li>
298<li><a id="rmd-hide-all-code" href="#">Hide All Code</a></li>
299</ul>
300</div>
301
302
303
304<h1 class="title toc-ignore">Plotly</h1>
305
306</div>
307
308
309<pre class="r"><code>library(tidyverse)
310library(p8105.datasets)
311library(plotly)
312library(leaflet)
313library(tidygeocoder)
314library(ggridges)</code></pre>
315<p>Filtering NYC restaurant data to include only restaurants in the Bronx, the most recent inspections by restaurant, cases with a flag of Critical or Not Critical, and a grade of A, B or C.</p>
316<pre class="r"><code>data(&quot;rest_inspec&quot;)
317
318nycrest =
319  rest_inspec %&gt;%
320  group_by(camis) %&gt;%
321  slice(which.max(as.Date(inspection_date, &quot;%Y-%m-%d&quot;, tz = &quot;
321America/New_York&quot;))) %&gt;%
322  filter(boro == &quot;BRONX&quot;) %&gt;%
323  drop_na(score) %&gt;%
324  drop_na(grade) %&gt;%
325  filter(critical_flag %in% c(&quot;Critical&quot;, &quot;Not Critical&quot;)) %&gt;%
326  filter(grade %in% c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;))
327
328nycrest2 =
329nycrest %&gt;%
330    mutate(address = str_c(building, &quot; &quot; , street, &quot; New York, NY&quot;, &quot; &quot;, zipcode))
331
332addresses = 
333  nycrest2 %&gt;%
334  geocode(address = address, method = &quot;census&quot;, verbose = TRUE)</code></pre>
335<pre><code>## 
336## Number of Unique Addresses: 1848</code></pre>
337<pre><code>## Executing batch geocoding...</code></pre>
338<pre><code>## Batch limit: 10,000</code></pre>
339<pre><code>## Passing 1,848 addresses to the US Census batch geocoder</code></pre>
340<pre><code>## Querying API URL: https://geocoding.geo.census.gov/geocoder/locations/addressbatch</code></pre>
341<pre><code>## Passing the following parameters to the API:</code></pre>
342<pre><code>## format : &quot;json&quot;</code></pre>
343<pre><code>## benchmark : &quot;Public_AR_Current&quot;</code></pre>
344<pre><code>## vintage : &quot;Current_Current&quot;</code></pre>
345<pre><code>## Query completed in: 288 seconds</code></pre>
346<pre class="r"><code>addresses2_df =
347  addresses %&gt;%
348  drop_na(lat) %&gt;%
349  mutate(restaurant_name = dba)</code></pre>
350<div id="presenting-the-results-in-a-leaflet-map" class="section level1">
351<h1>Presenting the Results in a Leaflet Map</h1>
352<pre class="r"><code>pal = colorFactor(&quot;viridis&quot;, NULL)
353
354addresses2_df %&gt;%
355  leaflet() %&gt;%
356  addProviderTiles(providers$CartoDB.Positron) %&gt;%
357  addCircleMarkers(~long, ~lat, radius = 1, color = ~pal(grade), popup = ~restaurant_name) %&gt;%
358    addLegend(&quot;bottomright&quot;, pal = pal, values = ~grade,
359    title = &quot;Restaurant Grade&quot;,
360    opacity = 1)</code></pre>
361<p>Filtering the dataset to include only restaurants in Manhatta and the most recent inspections by restaurant.</p>
362<pre class="r"><code>cuisinerating =
363  rest_inspec %&gt;%
364  group_by(camis) %&gt;%
365  slice(which.max(as.Date(inspection_date, &quot;%Y-%m-%d&quot;, tz = &quot;
365America/New_York&quot;))) %&gt;%
366  filter(boro == &quot;MANHATTAN&quot;) %&gt;%
367  drop_na(score) %&gt;%
368  drop_na(grade) %&gt;%
369  filter(cuisine_description != &quot;Not Listed/Not Applicable&quot;) %&gt;%
370  group_by(cuisine_description) %&gt;%
371  summarise(avg_score = round(mean(score),0))</code></pre>
372<div id="presenting-a-scatterplot-displaying-average-inspection-score-by-cuisine-type-in-manhattan" class="section level2">
373<h2>Presenting a scatterplot displaying average inspection score by cuisine type in Manhattan</h2>
374<pre class="r"><code>cuisineplot =
375cuisinerating  %&gt;%
376plot_ly(
377    x = ~cuisine_description, y = ~avg_score, type = &quot;scatter&quot;, mode = &quot;markers&quot;, size = 0.3,
378                             color = ~avg_score, alpha = 0.9)  %&gt;%
379    layout(yaxis = list(title = list(text = &quot;Average Score&quot;)), 
380           xaxis = list(title = list(text = &quot;Cuisine Description&quot;), 
381                        showticklabels = FALSE))
382
383colorbar(cuisineplot, title = &quot;Average Score&quot;) </code></pre>
384<div id="htmlwidget-7557ec31c99214ecc471" style="width:672px;height:480px;" class="plotly html-widget"></div>
385<script type="application/json" data-for="htmlwidget-7557ec31c99214ecc471">{"x":{"visdat":{"71e437a91532":["function () ","plotlyVisDat"]},"cur_data":"71e437a91532","attrs":{"71e437a91532":{"x":{},"y":{},"mode":"markers","color":{},"size":0.3,"alpha":0.9,"alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"scatter"}},"layout":{"margin":{"b":40,"l":60,"t":25,"r":10},"yaxis":{"domain":[0,1],"automargin":true,"title":{"text":"Average Score"}},"xaxis":{"domain":[0,1],"automargin":true,"title":{"text":"Cuisine Description"},"showticklabels":false,"type":"category","categoryorder":"array","categoryarray":["Afghan","African","American","Armenian","Asian","Australian","Bagels/Pretzels","Bakery","Bangladeshi","Barbecue","Basque","Bottled beverages, including water, sodas, juices, etc.","Brazilian","Café/Coffee/Tea","Californian","Caribbean","Chicken","Chilean","Chinese","Chinese/Cuban","Chinese/Japanese","Continental","Creole","Delicatessen","Donuts","Eastern European","Egyptian","English","Ethiopian","Filipino","French","Fruits/Vegetables","German","Greek","Hamburgers","Hawaiian","Hotdogs","Hotdogs/Pretzels","Ice Cream, Gelato, Yogurt, Ices","Indian","Indonesian","Iranian","Irish","Italian","Japanese","Jewish/Kosher","Juice, Smoothies, Fruit Salads","Korean","Latin (Cuban, Dominican, Puerto Rican, South & Central American)","Mediterranean","Mexican","Middle Eastern","Moroccan","Nuts/Confectionary","Other","Pakistani","Pancakes/Waffles","Peruvian","Pizza","Pizza/Italian","Polish","Polynesian","Portuguese","Russian","Salads","Sandwiches","Sandwiches/Salads/Mixed Buffet","Scandinavian","Seafood","Soul Food","Soups","Soups & Sandwiches","Southwestern","Spanish","Steak","Tapas","Tex-Mex","Thai","Turkish","Vegetarian","Vietnamese/Cambodian/Malaysia"]},"hovermode":"closest","showlegend":false,"legend":{"yanchor":"top","y":0.5}},"source":"A","config":{"modeBarButtonsToAdd":["hoverclosest","hovercompare"],"showSendToCloud":false},"data":[{"x":["Afghan","African","American","Armenian","Asian","Australian","Bagels/Pretzels","Bakery","Bangladeshi","Barbecue","Basque","Bottled beverages, including water, sodas, juices, etc.","Brazilian","Café/Coffee/Tea","Californian","Caribbean","Chicken","Chilean","Chinese","Chinese/Cuban","Chinese/Japanese","Continental","Creole","Delicatessen","Donuts","Eastern European","Egyptian","English","Ethiopian","Filipino","French","Fruits/Vegetables","German","Greek","Hamburgers","Hawaiian","Hotdogs","Hotdogs/Pretzels","Ice Cream, Gelato, Yogurt, Ices","Indian","Indonesian","Iranian","Irish","Italian","Japanese","Jewish/Kosher","Juice, Smoothies, Fruit Salads","Korean","Latin (Cuban, Dominican, Puerto Rican, South & Central American)","Mediterranean","Mexican","Middle Eastern","Moroccan","Nuts/Confectionary","Other","Pakistani","Pancakes/Waffles","Peruvian","Pizza","Pizza/Italian","Polish","Polynesian","Portuguese","Russian","Salads","Sandwiches","Sandwiches/Salads/Mixed Buffet","Scandinavian","Seafood","Soul Food","Soups","Soups & Sandwiches","Southwestern","Spanish","Steak","Tapas","Tex-Mex","Thai","Turkish","Vegetarian","Vietnamese/Cambodian/Malaysia"],"y":[11,14,10,8,12,17,10,10,10,9,7,8,9,9,11,14,11,7,13,11,11,9,11,13,8,12,10,12,9,10,11,8,10,11,10,10,6,6,10,12,12,24,10,11,11,11,10,12,12,11,11,11,12,6,11,8,12,15,10,11,10,15,12,13,9,9,9,5,11,11,4,8,9,12,10,9,10,12,11,10,10],"mode":"markers","type":"scatter","marker":{"colorbar":{"title":"avg_score","ticklen":2},"cmin":4,"cmax":24,"colorscale":[["0","rgba(68,1,84,0.9)"],["0.0416666666666667","rgba(70,19,97,0.9)"],["0.0833333333333333","rgba(72,32,111,0.9)"],["0.125","rgba(71,45,122,0.9)"],["0.166666666666667","rgba(68,58,128,0.9)"],["0.208333333333333","rgba(64,70,135,0.9)"],["0.25","rgba(60,82,138,0.9)"],["0.291666666666667","rgba(56,93,140,0.9)"],["0.333333333333333","rgba(49,104,142,0.9)"],["0.375","rgba(46,114,142,0.9)"],["0.416666666666667","rgba(42,123,142,0.9)"],["0.458333333333333","rgba(38,133,141,0.9)"],["0.5","rgba(37,144,140,0.9)"],["0.541666666666667","rgba(33,154,138,0.9)"],["0.583333333333333","rgba(39,164,133,0.9)"],["0.625","rgba(47,174,127,0.9)"],["0.666666666666667","rgba(53,183,121,0.9)"],["0.708333333333333","rgba(79,191,110,0.9)"],["0.75","rgba(98,199,98,0.9)"],["0.791666666666667","rgba(119,207,85,0.9)"],["0.833333333333333","rgba(147,214,70,0.9)"],["0.875","rgba(172,220,52,0.9)"],["0.916666666666667","rgba(199,225,42,0.9)"],["0.958333333333333","rgba(226,228,40,0.9)"],["1","rgba(253,231,37,0.9)"]],"showscale":false,"color":[11,14,10,8,12,17,10,10,10,9,7,8,9,9,11,14,11,7,13,11,11,9,11,13,8,12,10,12,9,10,11,8,10,11,10,10,6,6,10,12,12,24,10,11,11,11,10,12,12,11,11,11,12,6,11,8,12,15,10,11,10,15,12,13,9,9,9,5,
38511,11,4,8,9,12,10,9,10,12,11,10,10],"size":[55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55],"sizemode":"area","line":{"colorbar":{"title":"","ticklen":2},"cmin":4,"cmax":24,"colorscale":[["0","rgba(68,1,84,1)"],["0.0416666666666667","rgba(70,19,97,1)"],["0.0833333333333333","rgba(72,32,111,1)"],["0.125","rgba(71,45,122,1)"],["0.166666666666667","rgba(68,58,128,1)"],["0.208333333333333","rgba(64,70,135,1)"],["0.25","rgba(60,82,138,1)"],["0.291666666666667","rgba(56,93,140,1)"],["0.333333333333333","rgba(49,104,142,1)"],["0.375","rgba(46,114,142,1)"],["0.416666666666667","rgba(42,123,142,1)"],["0.458333333333333","rgba(38,133,141,1)"],["0.5","rgba(37,144,140,1)"],["0.541666666666667","rgba(33,154,138,1)"],["0.583333333333333","rgba(39,164,133,1)"],["0.625","rgba(47,174,127,1)"],["0.666666666666667","rgba(53,183,121,1)"],["0.708333333333333","rgba(79,191,110,1)"],["0.75","rgba(98,199,98,1)"],["0.791666666666667","rgba(119,207,85,1)"],["0.833333333333333","rgba(147,214,70,1)"],["0.875","rgba(172,220,52,1)"],["0.916666666666667","rgba(199,225,42,1)"],["0.958333333333333","rgba(226,228,40,1)"],["1","rgba(253,231,37,1)"]],"showscale":false,"color":[11,14,10,8,12,17,10,10,10,9,7,8,9,9,11,14,11,7,13,11,11,9,11,13,8,12,10,12,9,10,11,8,10,11,10,10,6,6,10,12,12,24,10,11,11,11,10,12,12,11,11,11,12,6,11,8,12,15,10,11,10,15,12,13,9,9,9,5,11,11,4,8,9,12,10,9,10,12,11,10,10]}},"textfont":{"size":55},"error_y":{"width":55},"error_x":{"width":55},"line":{"width":55},"xaxis":"x","yaxis":"y","frame":null},{"x":["Afghan","Vietnamese/Cambodian/Malaysia"],"y":[4,24],"type":"scatter","mode":"markers","opacity":0,"hoverinfo":"none","showlegend":false,"marker":{"colorbar":{"title":"Average Score","ticklen":2,"len":0.5,"lenmode":"fraction","y":1,"yanchor":"top"},"cmin":4,"cmax":24,"colorscale":[["0","rgba(68,1,84,0.9)"],["0.0416666666666667","rgba(70,19,97,0.9)"],["0.0833333333333333","rgba(72,32,111,0.9)"],["0.125","rgba(71,45,122,0.9)"],["0.166666666666667","rgba(68,58,128,0.9)"],["0.208333333333333","rgba(64,70,135,0.9)"],["0.25","rgba(60,82,138,0.9)"],["0.291666666666667","rgba(56,93,140,0.9)"],["0.333333333333333","rgba(49,104,142,0.9)"],["0.375","rgba(46,114,142,0.9)"],["0.416666666666667","rgba(42,123,142,0.9)"],["0.458333333333333","rgba(38,133,141,0.9)"],["0.5","rgba(37,144,140,0.9)"],["0.541666666666667","rgba(33,154,138,0.9)"],["0.583333333333333","rgba(39,164,133,0.9)"],["0.625","rgba(47,174,127,0.9)"],["0.666666666666667","rgba(53,183,121,0.9)"],["0.708333333333333","rgba(79,191,110,0.9)"],["0.75","rgba(98,199,98,0.9)"],["0.791666666666667","rgba(119,207,85,0.9)"],["0.833333333333333","rgba(147,214,70,0.9)"],["0.875","rgba(172,220,52,0.9)"],["0.916666666666667","rgba(199,225,42,0.9)"],["0.958333333333333","rgba(226,228,40,0.9)"],["1","rgba(253,231,37,0.9)"]],"showscale":true,"color":[4,24],"line":{"color":"rgba(255,127,14,1)"}},"xaxis":"x","yaxis":"y","frame":null}],"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.2,"selected":{"opacity":1},"debounce":0},"shinyEvents":["plotly_hover","plotly_click","plotly_selected","plotly_relayout","plotly_brushed","plotly_brushing","plotly_clickannotation","plotly_doubleclick","plotly_deselect","plotly_afterplot","plotly_sunburstclick"],"base_url":"https://plot.ly"},"evals":[],"jsHooks":[]}</script>
385
386<p>Filtering the dataset to include the most recent inspections by restaurant and only grades A, B and C.</p>
387<pre class="r"><code>gradeboro =
388  rest_inspec %&gt;%
389  group_by(camis) %&gt;%
390  slice(which.max(as.Date(inspection_date, &quot;%Y-%m-%d&quot;, tz = &quot;America/New_York&quot;))) %&gt;%
391  filter(grade %in% c(&quot;A&quot;,&quot;B&quot;,&quot;C&quot;)) %&gt;%
392  filter(boro != &quot;Missing&quot;) %&gt;%
393  drop_na(score) %&gt;%
394  drop_na(grade) %&gt;%
395  group_by(boro) %&gt;%
396  count(grade, name = &quot;count_grade&quot;)</code></pre>
397</div>
398<div id="presenting-a-bar-graph-displaying-the-count-of-a-b-and-c-inspection-grades-received-by-nyc-borough" class="section level2">
399<h2>Presenting a bar graph displaying the count of A, B and C inspection grades received by NYC borough</h2>
400<pre class="r"><code>gradeboro %&gt;% 
401  plot_ly(x = ~grade, y = ~count_grade, color = ~boro, type = &quot;bar&quot;, colors = &quot;viridis&quot;,
402          facet_col = &quot;boro&quot;) %&gt;%
403  layout(title = list(text = &quot;Count of Inspection Grades Received by Borough&quot;, 
404                        xanchor = &#39;center&#39;, yanchor =  &#39;top&#39;, size = 8),
405           yaxis = list(title = list(text = &quot;Count&quot;)), 
406           xaxis = list(title = list(text = &quot;Grade&quot;)))</code></pre>
407<pre><code>## Warning: &#39;bar&#39; objects don&#39;t have these attributes: &#39;facet_col&#39;
408## Valid attributes include:
409## &#39;_deprecated&#39;, &#39;alignmentgroup&#39;, &#39;base&#39;, &#39;basesrc&#39;, &#39;cliponaxis&#39;, &#39;constraintext&#39;, &#39;customdata&#39;, &#39;customdatasrc&#39;, &#39;dx&#39;, &#39;dy&#39;, &#39;error_x&#39;, &#39;error_y&#39;, &#39;hoverinfo&#39;, &#39;hoverinfosrc&#39;, &#39;hoverlabel&#39;, &#39;hovertemplate&#39;, &#39;hovertemplatesrc&#39;, &#39;hovertext&#39;, &#39;hovertextsrc&#39;, &#39;ids&#39;, &#39;idssrc&#39;, &#39;insidetextanchor&#39;, &#39;insidetextfont&#39;, &#39;legendgroup&#39;, &#39;legendgrouptitle&#39;, &#39;legendrank&#39;, &#39;marker&#39;, &#39;meta&#39;, &#39;metasrc&#39;, &#39;name&#39;, &#39;offset&#39;, &#39;offsetgroup&#39;, &#39;offsetsrc&#39;, &#39;opacity&#39;, &#39;orientation&#39;, &#39;outsidetextfont&#39;, &#39;selected&#39;, &#39;selectedpoints&#39;, &#39;showlegend&#39;, &#39;stream&#39;, &#39;text&#39;, &#39;textangle&#39;, &#39;textfont&#39;, &#39;textposition&#39;, &#39;textpositionsrc&#39;, &#39;textsrc&#39;, &#39;texttemplate&#39;, &#39;texttemplatesrc&#39;, &#39;transforms&#39;, &#39;type&#39;, &#39;uid&#39;, &#39;uirevision&#39;, &#39;unselected&#39;, &#39;visible&#39;, &#39;width&#39;, &#39;widthsrc&#39;, &#39;x&#39;, &#39;x0&#39;, &#39;xaxis&#39;, &#39;xcalendar&#39;, &#39;xhoverformat&#39;, &#39;xperiod&#39;, &#39;xperiod0&#39;, &#39;xperiodalignment&#39;, &#39;xsrc&#39;, &#39;y&#39;, &#39;y0&#39;, &#39;yaxis&#39;, &#39;ycalendar&#39;, &#39;yhoverformat&#39;, &#39;yperiod&#39;, &#39;yperiod0&#39;, &#39;yperiodalignment&#39;, &#39;ysrc&#39;, &#39;key&#39;, &#39;set&#39;, &#39;frame&#39;, &#39;transforms&#39;, &#39;_isNestedKey&#39;, &#39;_isSimpleKey&#39;, &#39;_isGraticule&#39;, &#39;_bbox&#39;
410
411## Warning: &#39;bar&#39; objects don&#39;t have these attributes: &#39;facet_col&#39;
412## Valid attributes include:
413## &#39;_deprecated&#39;, &#39;alignmentgroup&#39;, &#39;base&#39;, &#39;basesrc&#39;, &#39;cliponaxis&#39;, &#39;constraintext&#39;, &#39;customdata&#39;, &#39;customdatasrc&#39;, &#39;dx&#39;, &#39;dy&#39;, &#39;error_x&#39;, &#39;error_y&#39;, &#39;hoverinfo&#39;, &#39;hoverinfosrc&#39;, &#39;hoverlabel&#39;, &#39;hovertemplate&#39;, &#39;hovertemplatesrc&#39;, &#39;hovertext&#39;, &#39;hovertextsrc&#39;, &#39;ids&#39;, &#39;idssrc&#39;, &#39;insidetextanchor&#39;, &#39;insidetextfont&#39;, &#39;legendgroup&#39;, &#39;legendgrouptitle&#39;, &#39;legendrank&#39;, &#39;marker&#39;, &#39;meta&#39;, &#39;metasrc&#39;, &#39;name&#39;, &#39;offset&#39;, &#39;offsetgroup&#39;, &#39;offsetsrc&#39;, &#39;opacity&#39;, &#39;orientation&#39;, &#39;outsidetextfont&#39;, &#39;selected&#39;, &#39;selectedpoints&#39;, &#39;showlegend&#39;, &#39;stream&#39;, &#39;text&#39;, &#39;textangle&#39;, &#39;textfont&#39;, &#39;textposition&#39;, &#39;textpositionsrc&#39;, &#39;textsrc&#39;, &#39;texttemplate&#39;, &#39;texttemplatesrc&#39;, &#39;transforms&#39;, &#39;type&#39;, &#39;uid&#39;, &#39;uirevision&#39;, &#39;unselected&#39;, &#39;visible&#39;, &#39;width&#39;, &#39;widthsrc&#39;, &#39;x&#39;, &#39;x0&#39;, &#39;xaxis&#39;, &#39;xcalendar&#39;, &#39;xhoverformat&#39;, &#39;xperiod&#39;, &#39;xperiod0&#39;, &#39;xperiodalignment&#39;, &#39;xsrc&#39;, &#39;y&#39;, &#39;y0&#39;, &#39;yaxis&#39;, &#39;ycalendar&#39;, &#39;yhoverformat&#39;, &#39;yperiod&#39;, &#39;yperiod0&#39;, &#39;yperiodalignment&#39;, &#39;ysrc&#39;, &#39;key&#39;, &#39;set&#39;, &#39;frame&#39;, &#39;transforms&#39;, &#39;_isNestedKey&#39;, &#39;_isSimpleKey&#39;, &#39;_isGraticule&#39;, &#39;_bbox&#39;
414
415## Warning: &#39;bar&#39; objects don&#39;t have these attributes: &#39;facet_col&#39;
416## Valid attributes include:
417## &#39;_deprecated&#39;, &#39;alignmentgroup&#39;, &#39;base&#39;, &#39;basesrc&#39;, &#39;cliponaxis&#39;, &#39;constraintext&#39;, &#39;customdata&#39;, &#39;customdatasrc&#39;, &#39;dx&#39;, &#39;dy&#39;, &#39;error_x&#39;, &#39;error_y&#39;, &#39;hoverinfo&#39;, &#39;hoverinfosrc&#39;, &#39;hoverlabel&#39;, &#39;hovertemplate&#39;, &#39;hovertemplatesrc&#39;, &#39;hovertext&#39;, &#39;hovertextsrc&#39;, &#39;ids&#39;, &#39;idssrc&#39;, &#39;insidetextanchor&#39;, &#39;insidetextfont&#39;, &#39;legendgroup&#39;, &#39;legendgrouptitle&#39;, &#39;legendrank&#39;, &#39;marker&#39;, &#39;meta&#39;, &#39;metasrc&#39;, &#39;name&#39;, &#39;offset&#39;, &#39;offsetgroup&#39;, &#39;offsetsrc&#39;, &#39;opacity&#39;, &#39;orientation&#39;, &#39;outsidetextfont&#39;, &#39;selected&#39;, &#39;selectedpoints&#39;, &#39;showlegend&#39;, &#39;stream&#39;, &#39;text&#39;, &#39;textangle&#39;, &#39;textfont&#39;, &#39;textposition&#39;, &#39;textpositionsrc&#39;, &#39;textsrc&#39;, &#39;texttemplate&#39;, &#39;texttemplatesrc&#39;, &#39;transforms&#39;, &#39;type&#39;, &#39;uid&#39;, &#39;uirevision&#39;, &#39;unselected&#39;, &#39;visible&#39;, &#39;width&#39;, &#39;widthsrc&#39;, &#39;x&#39;, &#39;x0&#39;, &#39;xaxis&#39;, &#39;xcalendar&#39;, &#39;xhoverformat&#39;, &#39;xperiod&#39;, &#39;xperiod0&#39;, &#39;xperiodalignment&#39;, &#39;xsrc&#39;, &#39;y&#39;, &#39;y0&#39;, &#39;yaxis&#39;, &#39;ycalendar&#39;, &#39;yhoverformat&#39;, &#39;yperiod&#39;, &#39;yperiod0&#39;, &#39;yperiodalignment&#39;, &#39;ysrc&#39;, &#39;key&#39;, &#39;set&#39;, &#39;frame&#39;, &#39;transforms&#39;, &#39;_isNestedKey&#39;, &#39;_isSimpleKey&#39;, &#39;_isGraticule&#39;, &#39;_bbox&#39;
418
419## Warning: &#39;bar&#39; objects don&#39;t have these attributes: &#39;facet_col&#39;
420## Valid attributes include:
421## &#39;_deprecated&#39;, &#39;alignmentgroup&#39;, &#39;base&#39;, &#39;basesrc&#39;, &#39;cliponaxis&#39;, &#39;constraintext&#39;, &#39;customdata&#39;, &#39;customdatasrc&#39;, &#39;dx&#39;, &#39;dy&#39;, &#39;error_x&#39;, &#39;error_y&#39;, &#39;hoverinfo&#39;, &#39;hoverinfosrc&#39;, &#39;hoverlabel&#39;, &#39;hovertemplate&#39;, &#39;hovertemplatesrc&#39;, &#39;hovertext&#39;, &#39;hovertextsrc&#39;, &#39;ids&#39;, &#39;idssrc&#39;, &#39;insidetextanchor&#39;, &#39;insidetextfont&#39;, &#39;legendgroup&#39;, &#39;legendgrouptitle&#39;, &#39;legendrank&#39;, &#39;marker&#39;, &#39;meta&#39;, &#39;metasrc&#39;, &#39;name&#39;, &#39;offset&#39;, &#39;offsetgroup&#39;, &#39;offsetsrc&#39;, &#39;opacity&#39;, &#39;orientation&#39;, &#39;outsidetextfont&#39;, &#39;selected&#39;, &#39;selectedpoints&#39;, &#39;showlegend&#39;, &#39;stream&#39;, &#39;text&#39;, &#39;textangle&#39;, &#39;textfont&#39;, &#39;textposition&#39;, &#39;textpositionsrc&#39;, &#39;textsrc&#39;, &#39;texttemplate&#39;, &#39;texttemplatesrc&#39;, &#39;transforms&#39;, &#39;type&#39;, &#39;uid&#39;, &#39;uirevision&#39;, &#39;unselected&#39;, &#39;visible&#39;, &#39;width&#39;, &#39;widthsrc&#39;, &#39;x&#39;, &#39;x0&#39;, &#39;xaxis&#39;, &#39;xcalendar&#39;, &#39;xhoverformat&#39;, &#39;xperiod&#39;, &#39;xperiod0&#39;, &#39;xperiodalignment&#39;, &#39;xsrc&#39;, &#39;y&#39;, &#39;y0&#39;, &#39;yaxis&#39;, &#39;ycalendar&#39;, &#39;yhoverformat&#39;, &#39;yperiod&#39;, &#39;yperiod0&#39;, &#39;yperiodalignment&#39;, &#39;ysrc&#39;, &#39;key&#39;, &#39;set&#39;, &#39;frame&#39;, &#39;transforms&#39;, &#39;_isNestedKey&#39;, &#39;_isSimpleKey&#39;, &#39;_isGraticule&#39;, &#39;_bbox&#39;
422
423## Warning: &#39;bar&#39; objects don&#39;t have these attributes: &#39;facet_col&#39;
424## Valid attributes include:
425## &#39;_deprecated&#39;, &#39;alignmentgroup&#39;, &#39;base&#39;, &#39;basesrc&#39;, &#39;cliponaxis&#39;, &#39;constraintext&#39;, &#39;customdata&#39;, &#39;customdatasrc&#39;, &#39;dx&#39;, &#39;dy&#39;, &#39;error_x&#39;, &#39;error_y&#39;, &#39;hoverinfo&#39;, &#39;hoverinfosrc&#39;, &#39;hoverlabel&#39;, &#39;hovertemplate&#39;, &#39;hovertemplatesrc&#39;, &#39;hovertext&#39;, &#39;hovertextsrc&#39;, &#39;ids&#39;, &#39;idssrc&#39;, &#39;insidetextanchor&#39;, &#39;insidetextfont&#39;, &#39;legendgroup&#39;, &#39;legendgrouptitle&#39;, &#39;legendrank&#39;, &#39;marker&#39;, &#39;meta&#39;, &#39;metasrc&#39;, &#39;name&#39;, &#39;offset&#39;, &#39;offsetgroup&#39;, &#39;offsetsrc&#39;, &#39;opacity&#39;, &#39;orientation&#39;, &#39;outsidetextfont&#39;, &#39;selected&#39;, &#39;selectedpoints&#39;, &#39;showlegend&#39;, &#39;stream&#39;, &#39;text&#39;, &#39;textangle&#39;, &#39;textfont&#39;, &#39;textposition&#39;, &#39;textpositionsrc&#39;, &#39;textsrc&#39;, &#39;texttemplate&#39;, &#39;texttemplatesrc&#39;, &#39;transforms&#39;, &#39;type&#39;, &#39;uid&#39;, &#39;uirevision&#39;, &#39;unselected&#39;, &#39;visible&#39;, &#39;width&#39;, &#39;widthsrc&#39;, &#39;x&#39;, &#39;x0&#39;, &#39;xaxis&#39;, &#39;xcalendar&#39;, &#39;xhoverformat&#39;, &#39;xperiod&#39;, &#39;xperiod0&#39;, &#39;xperiodalignment&#39;, &#39;xsrc&#39;, &#39;y&#39;, &#39;y0&#39;, &#39;yaxis&#39;, &#39;ycalendar&#39;, &#39;yhoverformat&#39;, &#39;yperiod&#39;, &#39;yperiod0&#39;, &#39;yperiodalignment&#39;, &#39;ysrc&#39;, &#39;key&#39;, &#39;set&#39;, &#39;frame&#39;, &#39;transforms&#39;, &#39;_isNestedKey&#39;, &#39;_isSimpleKey&#39;, &#39;_isGraticule&#39;, &#39;_bbox&#39;</code></pre>
426<div id="htmlwidget-19a03698a437164446a9" style="width:672px;height:480px;" class="plotly html-widget"></div>
427<script type="application/json" data-for="htmlwidget-19a03698a437164446a9">{"x":{"visdat":{"71e4595d3e2d":["function () ","plotlyVisDat"]},"cur_data":"71e4595d3e2d","attrs":{"71e4595d3e2d":{"x":{},"y":{},"facet_col":"boro","color":{},"colors":"viridis","alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"bar"}},"layout":{"margin":{"b":40,"l":60,"t":25,"r":10},"title":{"text":"Count of Inspection Grades Received by Borough","xanchor":"center","yanchor":"top","size":8},"yaxis":{"domain":[0,1],"automargin":true,"title":{"text":"Count"}},"xaxis":{"domain":[0,1],"automargin":true,"title":{"text":"Grade"},"type":"category","categoryorder":"array","categoryarray":["A","B","C"]},"hovermode":"closest","showlegend":true},"source":"A","config":{"modeBarButtonsToAdd":["hoverclosest","hovercompare"],"showSendToCloud":false},"data":[{"x":["A","B","C"],"y":[1866,102,11],"facet_col":"boro","type":"bar","name":"BRONX","marker":{"color":"rgba(68,1,84,1)","line":{"color":"rgba(68,1,84,1)"}},"textfont":{"color":"rgba(68,1,84,1)"},"error_y":{"color":"rgba(68,1,84,1)"},"error_x":{"color":"rgba(68,1,84,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["A","B","C"],"y":[4819,232,31],"facet_col":"boro","type":"bar","name":"BROOKLYN","marker":{"color":"rgba(59,82,139,1)","line":{"color":"rgba(59,82,139,1)"}},"textfont":{"color":"rgba(59,82,139,1)"},"error_y":{"color":"rgba(59,82,139,1)"},"error_x":{"color":"rgba(59,82,139,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["A","B","C"],"y":[7903,378,45],"facet_col":"boro","type":"bar","name":"MANHATTAN","marker":{"color":"rgba(33,144,141,1)","line":{"color":"rgba(33,144,141,1)"}},"textfont":{"color":"rgba(33,144,141,1)"},"error_y":{"color":"rgba(33,144,141,1)"},"error_x":{"color":"rgba(33,144,141,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["A","B","C"],"y":[4584,228,26],"facet_col":"boro","type":"bar","name":"QUEENS","marker":{"color":"rgba(93,200,99,1)","line":{"color":"rgba(93,200,99,1)"}},"textfont":{"color":"rgba(93,200,99,1)"},"error_y":{"color":"rgba(93,200,99,1)"},"error_x":{"color":"rgba(93,200,99,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["A","B","C"],"y":[670,42,5],"facet_col":"boro","type":"bar","name":"STATEN ISLAND","marker":{"color":"rgba(253,231,37,1)","line":{"color":"rgba(253,231,37,1)"}},"textfont":{"color":"rgba(253,231,37,1)"},"error_y":{"color":"rgba(253,231,37,1)"},"error_x":{"color":"rgba(253,231,37,1)"},"xaxis":"x","yaxis":"y","frame":null}],"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.2,"selected":{"opacity":1},"debounce":0},"shinyEvents":["plotly_hover","plotly_click","plotly_selected","plotly_relayout","plotly_brushed","plotly_brushing","plotly_clickannotation","plotly_doubleclick","plotly_deselect","plotly_afterplot","plotly_sunburstclick"],"base_url":"https://plot.ly"},"evals":[],"jsHooks":[]}</script>
427
428<p>Filtering the dataset to include only Au Bon Pain locations in Manhattan.</p>
429<pre class="r"><code>time =
430  rest_inspec %&gt;%
431  filter(grade %in% c(&quot;A&quot;,&quot;B&quot;,&quot;C&quot;)) %&gt;%
432  filter(boro == &quot;MANHATTAN&quot;) %&gt;%
433  drop_na(score) %&gt;%
434  drop_na(grade) %&gt;%
435  filter(dba %in% c(&quot;AU BON PAIN&quot;)) %&gt;%
436  arrange(inspection_date) %&gt;%
437  mutate(name = str_c(building, &quot; &quot;, street)) </code></pre>
438</div>
439<div id="presenting-a-line-graph-displaying-inspection-scores-over-time-by-au-bon-pain-location-in-manhattan" class="section level2">
440<h2>Presenting a line graph displaying inspection scores over time by Au Bon Pain location in Manhattan</h2>
441<pre class="r"><code>time  %&gt;%
442 plot_ly(
443    x = ~inspection_date, y = ~score,
444    type = &quot;scatter&quot;,color = ~name, mode = &quot;lines+markers&quot;, colors = &quot;viridis&quot;) %&gt;%
445     layout(yaxis = list(title = list(text = &quot;Score Received&quot;)), 
446           xaxis = list(title = list(text = &quot;Inspection Date&quot;)))</code></pre>
447<div id="htmlwidget-cacb5e08c7e4bd92cee4" style="width:672px;height:480px;" class="plotly html-widget"></div>
448<script type="application/json" data-for="htmlwidget-cacb5e08c7e4bd92cee4">{"x":{"visdat":{"71e47b811ac2":["function () ","plotlyVisDat"]},"cur_data":"71e47b811ac2","attrs":{"71e47b811ac2":{"x":{},"y":{},"mode":"lines+markers","color":{},"colors":"viridis","alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"scatter"}},"layout":{"margin":{"b":40,"l":60,"t":25,"r":10},"yaxis":{"domain":[0,1],"automargin":true,"title":{"text":"Score Received"}},"xaxis":{"domain":[0,1],"automargin":true,"title":{"text":"Inspection Date"}},"hovermode":"closest","showlegend":true},"source":"A","config":{"modeBarButtonsToAdd":["hoverclosest","hovercompare"],"showSendToCloud":false},"data":[{"x":["2014-10-14 00:00:00.000000","2014-10-14 00:00:00.000000","2014-10-14 00:00:00.000000","2015-03-24 00:00:00.000000","2015-03-24 00:00:00.000000","2015-03-24 00:00:00.000000","2015-10-26 00:00:00.000000","2015-10-26 00:00:00.000000","2016-06-02 00:00:00.000000","2016-06-02 00:00:00.000000","2017-07-25 00:00:00.000000","2017-07-25 00:00:00.000000"],"y":[12,12,12,19,19,19,9,9,4,4,11,11],"mode":"lines+markers","type":"scatter","name":"0 PENN STATION","marker":{"color":"rgba(68,1,84,1)","line":{"color":"rgba(68,1,84,1)"}},"textfont":{"color":"rgba(68,1,84,1)"},"error_y":{"color":"rgba(68,1,84,1)"},"error_x":{"color":"rgba(68,1,84,1)"},"line":{"color":"rgba(68,1,84,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2015-07-28 00:00:00.000000","2015-07-28 00:00:00.000000","2015-12-28 00:00:00.000000","2015-12-28 00:00:00.000000","2015-12-28 00:00:00.000000","2017-03-02 00:00:00.000000","2017-03-02 00:00:00.000000"],"y":[7,7,9,9,9,7,7],"mode":"lines+markers","type":"scatter","name":"1 STATE STREET PLAZA","marker":{"color":"rgba(72,27,109,1)","line":{"color":"rgba(72,27,109,1)"}},"textfont":{"color":"rgba(72,27,109,1)"},"error_y":{"color":"rgba(72,27,109,1)"},"error_x":{"color":"rgba(72,27,109,1)"},"line":{"color":"rgba(72,27,109,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2014-09-02 00:00:00.000000","2014-09-02 00:00:00.000000","2015-01-16 00:00:00.000000","2015-01-16 00:00:00.000000","2016-01-27 00:00:00.000000","2016-01-27 00:00:00.000000","2016-01-27 00:00:00.000000","2017-02-24 00:00:00.000000","2017-02-24 00:00:00.000000","2017-08-21 00:00:00.000000","2017-08-21 00:00:00.000000"],"y":[12,12,11,11,12,12,12,9,9,13,13],"mode":"lines+markers","type":"scatter","name":"111 FULTON STREET","marker":{"color":"rgba(70,50,126,1)","line":{"color":"rgba(70,50,126,1)"}},"textfont":{"color":"rgba(70,50,126,1)"},"error_y":{"color":"rgba(70,50,126,1)"},"error_x":{"color":"rgba(70,50,126,1)"},"line":{"color":"rgba(70,50,126,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2014-07-02 00:00:00.000000","2014-07-02 00:00:00.000000","2014-12-23 00:00:00.000000","2014-12-23 00:00:00.000000","2014-12-23 00:00:00.000000","2014-12-23 00:00:00.000000","2015-05-22 00:00:00.000000","2016-01-28 00:00:00.000000","2016-01-28 00:00:00.000000","2016-01-28 00:00:00.000000","2017-03-03 00:00:00.000000","2017-03-03 00:00:00.000000"],"y":[6,6,14,14,14,14,2,10,10,10,10,10],"mode":"lines+markers","type":"scatter","name":"125 WEST   55 STREET","marker":{"color":"rgba(63,72,137,1)","line":{"color":"rgba(63,72,137,1)"}},"textfont":{"color":"rgba(63,72,137,1)"},"error_y":{"color":"rgba(63,72,137,1)"},"error_x":{"color":"rgba(63,72,137,1)"},"line":{"color":"rgba(63,72,137,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2014-07-14 00:00:00.000000","2014-07-14 00:00:00.000000","2014-07-14 00:00:00.000000","2014-10-21 00:00:00.000000","2014-10-21 00:00:00.000000","2014-10-21 00:00:00.000000","2015-04-02 00:00:00.000000","2015-04-02 00:00:00.000000","2015-11-10 00:00:00.000000","2015-11-10 00:00:00.000000","2016-08-26 00:00:00.000000","2016-08-26 00:00:00.000000","2017-04-21 00:00:00.000000","2017-04-21 00:00:00.000000"],"y":[12,12,12,9,9,9,9,9,13,13,4,4,10,10],"mode":"lines+markers","type":"scatter","name":"1251 6 AVENUE","marker":{"color":"rgba(54,92,141,1)","line":{"color":"rgba(54,92,141,1)"}},"textfont":{"color":"rgba(54,92,141,1)"},"error_y":{"color":"rgba(54,92,141,1)"},"error_x":{"color":"rgba(54,92,141,1)"},"line":{"color":"rgba(54,92,141,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2014-09-10 00:00:00.000000","2014-09-10 00:00:00.000000","2015-08-20 00:00:00.000000","2015-08-20 00:00:00.000000","2016-11-04 00:00:00.000000","2016-11-04 00:00:00.000000"],"y":[7,7,4,4,7,7],"mode":"lines+markers","type":"scatter","name":"151 WEST   34 STREET","marker":{"color":"rgba(46,110,142,1)","line":{"color":"rgba(46,110,142,1)"}},"textfont":{"color":"rgba(46,110,142,1)"},"error_y":{"color":"rgba(46,110,142,1)"},"error_x":{"color":"rgba(46,110,142,1)"},"line":{"color":"rgba(46,110,142,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2015-03-05 00:00:00.000000","2015-07-16 00:00:00.000000","2016-08-26 00:00:00.000000","2017-03-17 00:00:00.000000","2017-03-17 00:00:00.000000"],"y":[2,2,10,7,7],"mode":"lines+markers","type":"scatter","name":"170 WILLIAM ST","marker":{"color":"rgba(39,127,142,1)","line":{"color":"rgba(39,127,142,1)"}},"textfont":{"color":"rgba(39,127,142,1)"},"error_y":{"color":"rgba(39,127,142,1)"},"error_x":{"color":"rgba(39,127,142,1)"},"line":{"color":"rgba(39,127,142,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2014-05-30 00:00:00.000000","2014-05-30 00:00:00.000000","2014-11-13 00:00:00.000000","2014-11-13 00:00:00.000000","2014-11-13 00:00:00.000000","2015-03-16 00:00:00.000000","2016-07-22 00:00:00.000000","2016-07-22 00:00:00.000000","2016-07-22 00:00:00.000000","2017-04-24 00:00:00.000000","2017-04-24 00:00:00.000000"],"y":[9,9,11,11,11,3,18,18,18,13,13],"mode":"lines+markers","type":"scatter","name":"30 ROCKEFELLER PLAZA","marker":{"color":"rgba(33,144,141,1)","line":{"color":"rgba(33,144,141,1)"}},"textfont":{"color":"rgba(33,144,141,1)"},"error_y":{"color":"rgba(33,144,141,1)"},"error_x":{"color":"rgba(33,144,141,1)"},"line":{"color":"rgba(33,144,141,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2014-12-10 00:00:00.000000","2014-12-10 00:00:00.000000","2015-04-15 00:00:00.000000","2015-04-15 00:00:00.000000","2016-05-10 00:00:00.000000","2016-05-10 00:00:00.000000","2016-05-10 00:00:00.000000","2017-07-07 00:00:00.000000"],"y":[11,11,9,9,9,9,9,7],"mode":"lines+markers","type":"scatter","name":"462 1 AVENUE","marker":{"color":"rgba(31,161,135,1)","line":{"color":"rgba(31,161,135,1)"}},"textfont":{"color":"rgba(31,161,135,1)"},"error_y":{"color":"rgba(31,161,135,1)"},"error_x":{"color":"rgba(31,161,135,1)"},"line":{"color":"rgba(31,161,135,1)"},"xaxis":"x","yaxis":"y","frame":null}
448,{"x":["2014-10-09 00:00:00.000000","2015-04-14 00:00:00.000000","2015-04-14 00:00:00.000000","2015-04-14 00:00:00.000000","2015-10-07 00:00:00.000000","2016-05-12 00:00:00.000000","2016-05-31 00:00:00.000000","2016-05-31 00:00:00.000000","2016-05-31 00:00:00.000000","2017-07-20 00:00:00.000000","2017-07-20 00:00:00.000000","2017-07-20 00:00:00.000000","2017-08-18 00:00:00.000000","2017-08-18 00:00:00.000000"],"y":[3,9,9,9,2,2,12,12,12,7,7,7,8,8],"mode":"lines+markers","type":"scatter","name":"525 EAST   68 STREET","marker":{"color":"rgba(45,178,125,1)","line":{"color":"rgba(45,178,125,1)"}},"textfont":{"color":"rgba(45,178,125,1)"},"error_y":{"color":"rgba(45,178,125,1)"},"error_x":{"color":"rgba(45,178,125,1)"},"line":{"color":"rgba(45,178,125,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2014-10-23 00:00:00.000000","2014-10-23 00:00:00.000000","2015-05-01 00:00:00.000000","2015-05-01 00:00:00.000000","2015-05-01 00:00:00.000000","2016-05-13 00:00:00.000000","2016-05-13 00:00:00.000000","2017-07-21 00:00:00.000000","2017-07-21 00:00:00.000000"],"y":[10,10,13,13,13,10,10,11,11],"mode":"lines+markers","type":"scatter","name":"599 LEXINGTON AVENUE","marker":{"color":"rgba(74,193,109,1)","line":{"color":"rgba(74,193,109,1)"}},"textfont":{"color":"rgba(74,193,109,1)"},"error_y":{"color":"rgba(74,193,109,1)"},"error_x":{"color":"rgba(74,193,109,1)"},"line":{"color":"rgba(74,193,109,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2014-12-08 00:00:00.000000","2014-12-08 00:00:00.000000","2015-12-09 00:00:00.000000","2015-12-09 00:00:00.000000","2015-12-09 00:00:00.000000","2017-01-27 00:00:00.000000"],"y":[10,10,11,11,11,10],"mode":"lines+markers","type":"scatter","name":"6 UNION SQUARE EAST","marker":{"color":"rgba(113,207,87,1)","line":{"color":"rgba(113,207,87,1)"}},"textfont":{"color":"rgba(113,207,87,1)"},"error_y":{"color":"rgba(113,207,87,1)"},"error_x":{"color":"rgba(113,207,87,1)"},"line":{"color":"rgba(113,207,87,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2013-11-15 00:00:00.000000","2013-11-15 00:00:00.000000","2013-11-15 00:00:00.000000","2014-11-19 00:00:00.000000","2014-11-19 00:00:00.000000","2014-11-19 00:00:00.000000","2015-04-16 00:00:00.000000","2015-04-16 00:00:00.000000","2015-08-14 00:00:00.000000","2015-08-14 00:00:00.000000","2016-09-02 00:00:00.000000","2016-09-02 00:00:00.000000"],"y":[12,12,12,11,11,11,7,7,7,7,4,4],"mode":"lines+markers","type":"scatter","name":"60 BROAD STREET","marker":{"color":"rgba(159,218,58,1)","line":{"color":"rgba(159,218,58,1)"}},"textfont":{"color":"rgba(159,218,58,1)"},"error_y":{"color":"rgba(159,218,58,1)"},"error_x":{"color":"rgba(159,218,58,1)"},"line":{"color":"rgba(159,218,58,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2014-07-07 00:00:00.000000","2014-07-07 00:00:00.000000","2014-07-07 00:00:00.000000","2014-07-07 00:00:00.000000","2014-12-09 00:00:00.000000","2015-01-29 00:00:00.000000","2015-01-29 00:00:00.000000","2015-01-29 00:00:00.000000","2016-01-05 00:00:00.000000","2016-05-13 00:00:00.000000","2016-05-13 00:00:00.000000","2016-07-25 00:00:00.000000","2016-07-25 00:00:00.000000","2016-11-25 00:00:00.000000","2016-11-25 00:00:00.000000","2016-11-25 00:00:00.000000","2017-02-03 00:00:00.000000","2017-02-03 00:00:00.000000"],"y":[25,25,25,25,3,11,11,11,7,10,10,10,10,9,9,9,12,12],"mode":"lines+markers","type":"scatter","name":"625 8 AVENUE","marker":{"color":"rgba(207,225,28,1)","line":{"color":"rgba(207,225,28,1)"}},"textfont":{"color":"rgba(207,225,28,1)"},"error_y":{"color":"rgba(207,225,28,1)"},"error_x":{"color":"rgba(207,225,28,1)"},"line":{"color":"rgba(207,225,28,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":["2014-06-12 00:00:00.000000","2014-06-12 00:00:00.000000","2014-06-12 00:00:00.000000","2015-06-09 00:00:00.000000","2016-07-15 00:00:00.000000","2016-07-15 00:00:00.000000","2017-01-27 00:00:00.000000","2017-01-27 00:00:00.000000"],"y":[11,11,11,7,10,10,10,10],"mode":"lines+markers","type":"scatter","name":"80 PINE STREET","marker":{"color":"rgba(253,231,37,1)","line":{"color":"rgba(253,231,37,1)"}},"textfont":{"color":"rgba(253,231,37,1)"},"error_y":{"color":"rgba(253,231,37,1)"},"error_x":{"color":"rgba(253,231,37,1)"},"line":{"color":"rgba(253,231,37,1)"},"xaxis":"x","yaxis":"y","frame":null}],"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.2,"selected":{"opacity":1},"debounce":0},"shinyEvents":["plotly_hover","plotly_click","plotly_selected","plotly_relayout","plotly_brushed","plotly_brushing","plotly_clickannotation","plotly_doubleclick","plotly_deselect","plotly_afterplot","plotly_sunburstclick"],"base_url":"https://plot.ly"},"evals":[],"jsHooks":[]}</script>
448
449</div>
450</div>
451
452
453
454
455</div>
456
457<script>
458
459// add bootstrap table styles to pandoc tables
460function bootstrapStylePandocTables() {
461  $('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
462}
463$(document).ready(function () {
464  bootstrapStylePandocTables();
465});
466
467
468</script>
468
469
470<!-- tabsets -->
471
472<script>
473$(document).ready(function () {
474  window.buildTabsets("TOC");
475});
476
477$(document).ready(function () {
478  $('.tabset-dropdown > .nav-tabs > li').click(function () {
479    $(this).parent().toggleClass('nav-tabs-open');
480  });
481});
482</script>
482
483
484<!-- code folding -->
485<script>
486$(document).ready(function () {
487  window.initializeCodeFolding("hide" === "show");
488});
489</script>
489
490
491
492<!-- dynamically load mathjax for compatibility with self-contained -->
493<script>
494  (function () {
495    var script = document.createElement("script");
496    script.type = "text/javascript";
497    script.src  = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
498    document.getElementsByTagName("head")[0].appendChild(script);
499  })();
500</script>
500
501
502</body>
503</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.