Skip to content

Commit

Permalink
Merge pull request #98 from JosephBARBIERDARNAL/patch
Browse files Browse the repository at this point in the history
patch issues
  • Loading branch information
holtzy authored Jun 18, 2024
2 parents 30c0684 + 5f8720d commit 831a238
Show file tree
Hide file tree
Showing 63 changed files with 14,735 additions and 2,999 deletions.
Binary file modified story/IMG/Surfer_position.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion story/NestedValueForConnection.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ data %>%
plot.margin=grid::unit(c(0,0,0,0), "cm"),
) +
ggplot2::annotate("text", x = -150, y = -45, hjust = 0, size = 11, label = paste("Where surfers live."), color = "Black") +
ggplot2::annotate("text", x = -150, y = -51, hjust = 0, size = 8, label = paste("data-to-viz.com | 200,000 #surf tweets recovered"), color = "black", alpha = 0.5) +
ggplot2::annotate("text", x = -150, y = -60, hjust = 0, size = 8, label = paste("data-to-viz.com | 200,000 #surf tweets recovered"), color = "black", alpha = 0.5) +
xlim(-180,180) +
ylim(-60,80) +
scale_x_continuous(expand = c(0.006, 0.006)) +
Expand Down
2 changes: 1 addition & 1 deletion story/NestedValueForConnection.html
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ <h1>A dot density map</h1>
<span id="cb2-13"><a href="#cb2-13" tabindex="-1"></a> <span class="at">plot.margin=</span>grid<span class="sc">::</span><span class="fu">unit</span>(<span class="fu">c</span>(<span class="dv">0</span>,<span class="dv">0</span>,<span class="dv">0</span>,<span class="dv">0</span>), <span class="st">&quot;cm&quot;</span>),</span>
<span id="cb2-14"><a href="#cb2-14" tabindex="-1"></a> ) <span class="sc">+</span></span>
<span id="cb2-15"><a href="#cb2-15" tabindex="-1"></a> ggplot2<span class="sc">::</span><span class="fu">annotate</span>(<span class="st">&quot;text&quot;</span>, <span class="at">x =</span> <span class="sc">-</span><span class="dv">150</span>, <span class="at">y =</span> <span class="sc">-</span><span class="dv">45</span>, <span class="at">hjust =</span> <span class="dv">0</span>, <span class="at">size =</span> <span class="dv">11</span>, <span class="at">label =</span> <span class="fu">paste</span>(<span class="st">&quot;Where surfers live.&quot;</span>), <span class="at">color =</span> <span class="st">&quot;Black&quot;</span>) <span class="sc">+</span></span>
<span id="cb2-16"><a href="#cb2-16" tabindex="-1"></a> ggplot2<span class="sc">::</span><span class="fu">annotate</span>(<span class="st">&quot;text&quot;</span>, <span class="at">x =</span> <span class="sc">-</span><span class="dv">150</span>, <span class="at">y =</span> <span class="sc">-</span><span class="dv">51</span>, <span class="at">hjust =</span> <span class="dv">0</span>, <span class="at">size =</span> <span class="dv">8</span>, <span class="at">label =</span> <span class="fu">paste</span>(<span class="st">&quot;data-to-viz.com | 200,000 #surf tweets recovered&quot;</span>), <span class="at">color =</span> <span class="st">&quot;black&quot;</span>, <span class="at">alpha =</span> <span class="fl">0.5</span>) <span class="sc">+</span></span>
<span id="cb2-16"><a href="#cb2-16" tabindex="-1"></a> ggplot2<span class="sc">::</span><span class="fu">annotate</span>(<span class="st">&quot;text&quot;</span>, <span class="at">x =</span> <span class="sc">-</span><span class="dv">150</span>, <span class="at">y =</span> <span class="sc">-</span><span class="dv">60</span>, <span class="at">hjust =</span> <span class="dv">0</span>, <span class="at">size =</span> <span class="dv">8</span>, <span class="at">label =</span> <span class="fu">paste</span>(<span class="st">&quot;data-to-viz.com | 200,000 #surf tweets recovered&quot;</span>), <span class="at">color =</span> <span class="st">&quot;black&quot;</span>, <span class="at">alpha =</span> <span class="fl">0.5</span>) <span class="sc">+</span></span>
<span id="cb2-17"><a href="#cb2-17" tabindex="-1"></a> <span class="fu">xlim</span>(<span class="sc">-</span><span class="dv">180</span>,<span class="dv">180</span>) <span class="sc">+</span></span>
<span id="cb2-18"><a href="#cb2-18" tabindex="-1"></a> <span class="fu">ylim</span>(<span class="sc">-</span><span class="dv">60</span>,<span class="dv">80</span>) <span class="sc">+</span></span>
<span id="cb2-19"><a href="#cb2-19" tabindex="-1"></a> <span class="fu">scale_x_continuous</span>(<span class="at">expand =</span> <span class="fu">c</span>(<span class="fl">0.006</span>, <span class="fl">0.006</span>)) <span class="sc">+</span></span>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion story/NestedValueForLinks.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ data %>%
plot.margin=grid::unit(c(0,0,0,0), "cm"),
) +
ggplot2::annotate("text", x = -150, y = -45, hjust = 0, size = 11, label = paste("Where surfers live."), color = "Black") +
ggplot2::annotate("text", x = -150, y = -51, hjust = 0, size = 8, label = paste("data-to-viz.com | 200,000 #surf tweets recovered"), color = "black", alpha = 0.5) +
ggplot2::annotate("text", x = -150, y = -60, hjust = 0, size = 8, label = paste("data-to-viz.com | 200,000 #surf tweets recovered"), color = "black", alpha = 0.5) +
xlim(-180,180) +
ylim(-60,80) +
scale_x_continuous(expand = c(0.006, 0.006)) +
Expand Down
2 changes: 1 addition & 1 deletion story/NestedValueForLinks.html
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ <h1>A dot density map</h1>
<span id="cb2-13"><a href="#cb2-13" tabindex="-1"></a> <span class="at">plot.margin=</span>grid<span class="sc">::</span><span class="fu">unit</span>(<span class="fu">c</span>(<span class="dv">0</span>,<span class="dv">0</span>,<span class="dv">0</span>,<span class="dv">0</span>), <span class="st">&quot;cm&quot;</span>),</span>
<span id="cb2-14"><a href="#cb2-14" tabindex="-1"></a> ) <span class="sc">+</span></span>
<span id="cb2-15"><a href="#cb2-15" tabindex="-1"></a> ggplot2<span class="sc">::</span><span class="fu">annotate</span>(<span class="st">&quot;text&quot;</span>, <span class="at">x =</span> <span class="sc">-</span><span class="dv">150</span>, <span class="at">y =</span> <span class="sc">-</span><span class="dv">45</span>, <span class="at">hjust =</span> <span class="dv">0</span>, <span class="at">size =</span> <span class="dv">11</span>, <span class="at">label =</span> <span class="fu">paste</span>(<span class="st">&quot;Where surfers live.&quot;</span>), <span class="at">color =</span> <span class="st">&quot;Black&quot;</span>) <span class="sc">+</span></span>
<span id="cb2-16"><a href="#cb2-16" tabindex="-1"></a> ggplot2<span class="sc">::</span><span class="fu">annotate</span>(<span class="st">&quot;text&quot;</span>, <span class="at">x =</span> <span class="sc">-</span><span class="dv">150</span>, <span class="at">y =</span> <span class="sc">-</span><span class="dv">51</span>, <span class="at">hjust =</span> <span class="dv">0</span>, <span class="at">size =</span> <span class="dv">8</span>, <span class="at">label =</span> <span class="fu">paste</span>(<span class="st">&quot;data-to-viz.com | 200,000 #surf tweets recovered&quot;</span>), <span class="at">color =</span> <span class="st">&quot;black&quot;</span>, <span class="at">alpha =</span> <span class="fl">0.5</span>) <span class="sc">+</span></span>
<span id="cb2-16"><a href="#cb2-16" tabindex="-1"></a> ggplot2<span class="sc">::</span><span class="fu">annotate</span>(<span class="st">&quot;text&quot;</span>, <span class="at">x =</span> <span class="sc">-</span><span class="dv">150</span>, <span class="at">y =</span> <span class="sc">-</span><span class="dv">60</span>, <span class="at">hjust =</span> <span class="dv">0</span>, <span class="at">size =</span> <span class="dv">8</span>, <span class="at">label =</span> <span class="fu">paste</span>(<span class="st">&quot;data-to-viz.com | 200,000 #surf tweets recovered&quot;</span>), <span class="at">color =</span> <span class="st">&quot;black&quot;</span>, <span class="at">alpha =</span> <span class="fl">0.5</span>) <span class="sc">+</span></span>
<span id="cb2-17"><a href="#cb2-17" tabindex="-1"></a> <span class="fu">xlim</span>(<span class="sc">-</span><span class="dv">180</span>,<span class="dv">180</span>) <span class="sc">+</span></span>
<span id="cb2-18"><a href="#cb2-18" tabindex="-1"></a> <span class="fu">ylim</span>(<span class="sc">-</span><span class="dv">60</span>,<span class="dv">80</span>) <span class="sc">+</span></span>
<span id="cb2-19"><a href="#cb2-19" tabindex="-1"></a> <span class="fu">scale_x_continuous</span>(<span class="at">expand =</span> <span class="fu">c</span>(<span class="fl">0.006</span>, <span class="fl">0.006</span>)) <span class="sc">+</span></span>
Expand Down
Binary file modified story/NestedValueForLinks_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.
22 changes: 13 additions & 9 deletions story/OneCatSevOrderedNum.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,19 @@ Line charts tend to be too cluttered as soon as more than a few groups are displ

```{r, fig.align="center", fig.width=10, message=FALSE, warning=FALSE}
data %>%
mutate( highlight=ifelse(name=="Amanda", "Amanda", "Other")) %>%
ggplot( aes(x=year, y=n, group=name, color=highlight, linewidth=highlight)) +
geom_line() +
scale_color_manual(values = c("#69b3a2", "lightgrey")) +
scale_size_manual(values=c(1.5,0.2)) +
theme(legend.position="none") +
ggtitle("Popularity of American names in the previous 30 years") +
theme_ipsum() +
geom_label(x = 1990, y = 55000, label = "Amanda reached 3550\nbabies in 1970", size = 4, color = "#69b3a2")
mutate(highlight = ifelse(name == "Amanda", "Amanda", "Other")) %>%
ggplot(aes(x = year, y = n, group = name, color = highlight, size = highlight)) +
geom_line() +
scale_color_manual(values = c("#69b3a2", "lightgrey")) +
scale_size_manual(values = c(1.5, 0.2)) +
theme(legend.position = "none") +
ggtitle("Popularity of American names in the previous 30 years") +
theme_ipsum() +
geom_label(x = 1990, y = 55000, label = "Amanda reached 3550\nbabies in 1970", size = 4, color = "#69b3a2") +
theme(
legend.position = "none",
plot.title = element_text(size = 14)
)
```

This is a good way to describe the behavior of a specific group in the dataset.
Expand Down
36 changes: 20 additions & 16 deletions story/OneCatSevOrderedNum.html

Large diffs are not rendered by default.

Binary file added story/OneCatSevOrderedNum_files/.DS_Store
Binary file not shown.
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.
1 change: 1 addition & 0 deletions story/RegionWithValue.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ output:
<br><br><br>This document gives a few suggestions to analyse a dataset composed by a unique numeric variable.<br> It considers the night price of about 10,000 [Airbnb](https://www.airbnb.fr) appartements on the French Riviera in France.<br>This example dataset has been downloaded from the [Airbnb website](http://insideairbnb.com/get-the-data.html) and is available on this [Github repository](https://github.com/holtzy/data_to_viz/tree/master/Example_dataset). Basically it looks like the table beside.
</div>
<div class = "col-md-4">

```{r, warning=FALSE, message=FALSE}
# Libraries
library(tidyverse)
Expand Down
Loading

0 comments on commit 831a238

Please sign in to comment.