Skip to content

Commit

Permalink
updated the website
Browse files Browse the repository at this point in the history
  • Loading branch information
eeholmes committed Mar 25, 2020
1 parent 758e62e commit 24e6ebc
Show file tree
Hide file tree
Showing 24 changed files with 53 additions and 61 deletions.
5 changes: 5 additions & 0 deletions CoV19.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate
2 changes: 1 addition & 1 deletion _site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ navbar:
- text: "All States"
icon: fa-bullhorn
href: state_plots.html
- text: "Epidemic States"
- text: "Select States"
icon: fa-bullhorn
href: epidemic_states.html
- text: "Lombardy Comparison"
Expand Down
29 changes: 11 additions & 18 deletions docs/data.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
<a href="epidemic_states.html">
<span class="fa fa-bullhorn"></span>

Epidemic States
Select States
</a>
</li>
<li>
Expand Down Expand Up @@ -334,35 +334,28 @@ <h1 class="title toc-ignore">Data</h1>


<p>Load the package.</p>
<pre><code>library(CoV19)</code></pre>
<pre class="r"><code>library(CoV19)</code></pre>
<p>The data are in the following objects. They have a few common columns: date, region, positive, death. Then there are some other columns depending on the source.</p>
<pre><code>states
italy
world</code></pre>
<p>Here is an example from <code>states</code>:</p>
<pre class="r"><code>head(states)</code></pre>
<pre><code>## date region positive negative pending hospitalized
## 1 2020-03-24 AK 36 986 NA 0
## 2 2020-03-24 AL 215 2106 NA NA
## 3 2020-03-24 AR 218 947 0 22
## 4 2020-03-24 AS 0 NA NA NA
## 5 2020-03-24 AZ 357 313 22 8
## 6 2020-03-24 CA 1733 12567 12100 NA
## death total.tests
## 1 NA 1022
## 2 0 2321
## 3 0 1165
## 4 0 0
## 5 5 692
## 6 27 26400</code></pre>
<pre><code>## date region positive negative pending hospitalized death total.tests
## 1 2020-03-24 AK 36 986 NA 0 NA 1022
## 2 2020-03-24 AL 215 2106 NA NA 0 2321
## 3 2020-03-24 AR 218 947 0 22 0 1165
## 4 2020-03-24 AS 0 NA NA NA 0 0
## 5 2020-03-24 AZ 357 313 22 8 5 692
## 6 2020-03-24 CA 1733 12567 12100 NA 27 26400</code></pre>
<div id="subsetting-data" class="section level1">
<h1>Subsetting data</h1>
<pre class="r"><code># Just WA
x &lt;- subset(states, region==&quot;WA&quot;)
# Two states
x &lt;- subset(states, region %in% c(&quot;WA&quot;,&quot;CA&quot;))
# All areas in China
x &lt;- subset(world, str_detect(region, &quot;China&quot;))</code></pre>
x &lt;- subset(world, stringr::str_detect(region, &quot;China&quot;))</code></pre>
</div>
<div id="merging-data" class="section level1">
<h1>Merging Data</h1>
Expand All @@ -378,7 +371,7 @@ <h1>Merging Data</h1>
x$region &lt;- as.factor(&quot;WA + CA + OR&quot;)</code></pre>
<p>We can pass this data object to <code>plot2</code> to plot.</p>
<pre class="r"><code>plot2(x)</code></pre>
<p><img src="data_files/figure-html/unnamed-chunk-4-1.png" width="672" /></p>
<p><img src="data_files/figure-html/unnamed-chunk-9-1.png" width="672" /></p>
</div>


Expand Down
8 changes: 3 additions & 5 deletions docs/epidemic_states.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
<a href="epidemic_states.html">
<span class="fa fa-bullhorn"></span>

Epidemic States
Select States
</a>
</li>
<li>
Expand Down Expand Up @@ -336,11 +336,9 @@ <h1 class="title toc-ignore">Epidemic State Plots</h1>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;NY&quot;, &quot;NJ&quot;))</code></pre>
<p><img src="epidemic_states_files/figure-html/unnamed-chunk-1-1.png" width="672" /></p>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;WA&quot;, &quot;CA&quot;))</code></pre>
<pre class="r"><code>plot2(states, c(&quot;WA&quot;, &quot;CA&quot;))</code></pre>
<p><img src="epidemic_states_files/figure-html/unnamed-chunk-2-1.png" width="672" /></p>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;FL&quot;, &quot;CO&quot;))</code></pre>
<pre class="r"><code>plot2(states, c(&quot;FL&quot;, &quot;CO&quot;))</code></pre>
<p><img src="epidemic_states_files/figure-html/unnamed-chunk-3-1.png" width="672" /></p>


Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
<a href="epidemic_states.html">
<span class="fa fa-bullhorn"></span>

Epidemic States
Select States
</a>
</li>
<li>
Expand Down
2 changes: 1 addition & 1 deletion docs/plots.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
<a href="epidemic_states.html">
<span class="fa fa-bullhorn"></span>

Epidemic States
Select States
</a>
</li>
<li>
Expand Down
50 changes: 20 additions & 30 deletions docs/state_plots.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
<a href="epidemic_states.html">
<span class="fa fa-bullhorn"></span>

Epidemic States
Select States
</a>
</li>
<li>
Expand All @@ -333,59 +333,49 @@ <h1 class="title toc-ignore">State Plots</h1>
</div>


<pre class="r"><code>library(CoV19)</code></pre>
<div id="south" class="section level1">
<h1>South</h1>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;FL&quot;,&quot;LA&quot;,&quot;GA&quot;,&quot;MS&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-1-1.png" width="672" /></p>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;SC&quot;,&quot;NC&quot;,&quot;VA&quot;,&quot;WV&quot;))</code></pre>
<pre class="r"><code>plot2(states, c(&quot;FL&quot;,&quot;LA&quot;,&quot;GA&quot;,&quot;MS&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-2-1.png" width="672" /></p>
<pre class="r"><code>plot2(states, c(&quot;SC&quot;,&quot;NC&quot;,&quot;VA&quot;,&quot;WV&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-3-1.png" width="672" /></p>
</div>
<div id="northeast" class="section level1">
<h1>Northeast</h1>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;NY&quot;,&quot;NJ&quot;,&quot;PA&quot;,&quot;CT&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-3-1.png" width="672" /></p>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;VT&quot;,&quot;ME&quot;,&quot;NH&quot;,&quot;MA&quot;))</code></pre>
<pre class="r"><code>plot2(states, c(&quot;NY&quot;,&quot;NJ&quot;,&quot;PA&quot;,&quot;CT&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-4-1.png" width="672" /></p>
<pre class="r"><code>plot2(states, c(&quot;VT&quot;,&quot;ME&quot;,&quot;NH&quot;,&quot;MA&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-5-1.png" width="672" /></p>
</div>
<div id="midwest" class="section level1">
<h1>Midwest</h1>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;OH&quot;,&quot;IN&quot;,&quot;IL&quot;,&quot;MI&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-5-1.png" width="672" /></p>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;WI&quot;,&quot;MN&quot;,&quot;IA&quot;,&quot;MO&quot;))</code></pre>
<pre class="r"><code>plot2(states, c(&quot;OH&quot;,&quot;IN&quot;,&quot;IL&quot;,&quot;MI&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-6-1.png" width="672" /></p>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;ND&quot;,&quot;SD&quot;,&quot;NE&quot;,&quot;KS&quot;))</code></pre>
<pre class="r"><code>plot2(states, c(&quot;WI&quot;,&quot;MN&quot;,&quot;IA&quot;,&quot;MO&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-7-1.png" width="672" /></p>
<pre class="r"><code>plot2(states, c(&quot;ND&quot;,&quot;SD&quot;,&quot;NE&quot;,&quot;KS&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-8-1.png" width="672" /></p>
</div>
<div id="north-rockies" class="section level1">
<h1>North Rockies</h1>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;ID&quot;,&quot;WY&quot;,&quot;MT&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-8-1.png" width="672" /></p>
<pre class="r"><code>plot2(states, c(&quot;ID&quot;,&quot;WY&quot;,&quot;MT&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-9-1.png" width="672" /></p>
</div>
<div id="four-corners" class="section level1">
<h1>Four Corners</h1>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;AZ&quot;,&quot;UT&quot;,&quot;CO&quot;,&quot;NM&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-9-1.png" width="672" /></p>
<pre class="r"><code>plot2(states, c(&quot;AZ&quot;,&quot;UT&quot;,&quot;CO&quot;,&quot;NM&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-10-1.png" width="672" /></p>
</div>
<div id="texas-and-company" class="section level1">
<h1>Texas and company</h1>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;TX&quot;,&quot;OK&quot;,&quot;AR&quot;,&quot;LA&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-10-1.png" width="672" /></p>
<pre class="r"><code>plot2(states, c(&quot;TX&quot;,&quot;OK&quot;,&quot;AR&quot;,&quot;LA&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-11-1.png" width="672" /></p>
</div>
<div id="west" class="section level1">
<h1>West</h1>
<pre class="r"><code>library(CoV19)
plot2(states, c(&quot;CA&quot;,&quot;OR&quot;,&quot;WA&quot;,&quot;NV&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-11-1.png" width="672" /></p>
<pre class="r"><code>plot2(states, c(&quot;CA&quot;,&quot;OR&quot;,&quot;WA&quot;,&quot;NV&quot;))</code></pre>
<p><img src="state_plots_files/figure-html/unnamed-chunk-12-1.png" width="672" /></p>
</div>


Expand Down
Binary file not shown.
Binary file modified docs/state_plots_files/figure-html/unnamed-chunk-10-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/state_plots_files/figure-html/unnamed-chunk-11-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/state_plots_files/figure-html/unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/state_plots_files/figure-html/unnamed-chunk-3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/state_plots_files/figure-html/unnamed-chunk-4-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/state_plots_files/figure-html/unnamed-chunk-5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/state_plots_files/figure-html/unnamed-chunk-6-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/state_plots_files/figure-html/unnamed-chunk-7-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/state_plots_files/figure-html/unnamed-chunk-8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/state_plots_files/figure-html/unnamed-chunk-9-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 11 additions & 5 deletions docs/walomb_plot.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
<a href="epidemic_states.html">
<span class="fa fa-bullhorn"></span>

Epidemic States
Select States
</a>
</li>
<li>
Expand All @@ -333,11 +333,17 @@ <h1 class="title toc-ignore">Lombardy vs WA Plots</h1>
</div>


<pre class="r"><code>library(CoV19)
my_plot(italy, &quot;Lombardia&quot;, &quot;2020-03-10&quot;)</code></pre>
<p><img src="walomb_plot_files/figure-html/unnamed-chunk-1-1.png" width="672" /></p>
<pre class="r"><code>my_plot(states, &quot;WA&quot;, &quot;2020-03-16&quot;)</code></pre>
<pre class="r"><code>library(CoV19)</code></pre>
<pre class="r"><code>my_plot(italy, &quot;Lombardia&quot;, &quot;2020-03-10&quot;)</code></pre>
<p><img src="walomb_plot_files/figure-html/unnamed-chunk-2-1.png" width="672" /></p>
<pre class="r"><code>x &lt;- subset(states, region==&quot;WA&quot;)
x &lt;- rbind(x, data.frame(date=as.Date(&quot;2020-03-25&quot;), region=&quot;WA&quot;, positive=2469, negative=NA, pending=NA, hospitalized=NA, death=123, total.tests=NA))
my_plot(x, &quot;WA&quot;, &quot;2020-03-16&quot;)</code></pre>
<p><img src="walomb_plot_files/figure-html/unnamed-chunk-3-1.png" width="672" /></p>
<pre class="r"><code>x &lt;- world
x[x$date==&quot;2020-02-12&quot;,&quot;positive&quot;]=NA
x[x$date==&quot;2020-02-13&quot;,&quot;positive&quot;]=NA
p &lt;- my_plot(x, &quot;Hubei China&quot;, &quot;2020-01-23&quot;)</code></pre>



Expand Down
Binary file not shown.
Binary file modified docs/walomb_plot_files/figure-html/unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 24e6ebc

Please sign in to comment.