Data Frame Summary
gp_covid
Dimensions: 3678 x 2
Duplicates: 3569
Variable |
Stats / Values |
Freqs (% of Valid) |
Graph |
Missing |
education_cat
[numeric] |
Mean (sd) : 2.5 (0.7)
min < med < max:
1 < 3 < 3
IQR (CV) : 1 (0.3) |
1 | : | 412 | ( | 11.2% | ) | 2 | : | 1125 | ( | 30.6% | ) | 3 | : | 2141 | ( | 58.2% | ) |
|
 |
0
(0.0%) |
sum_trust
[numeric] |
Mean (sd) : 29 (13.7)
min < med < max:
0 < 34 < 45
IQR (CV) : 12 (0.5) |
40 distinct values |
 |
0
(0.0%) |
Generated by summarytools 0.9.9 (R version 4.1.0)
2021-08-04
]
---
## Correlation plots I
.pull-left[
```r
library(correlation)
library(ggraph)
gp_covid %>%
select(hzcy044a:hzcy052a) %>%
correlation() %>%
plot()
```
]
.pull-right[
<img src="data:image/png;base64,#3_2_Data_Visualization_Part_1_files/figure-html/unnamed-chunk-43-1.png" style="display: block; margin: auto;" />
]
---
## Correlation plots II
.pull-left[
```r
library(GGally)
gp_covid %>%
select(hzcy044a:hzcy052a) %>%
ggcorr(
label = TRUE,
label_round = 2
)
```
]
.pull-right[
<img src="data:image/png;base64,#3_2_Data_Visualization_Part_1_files/figure-html/unnamed-chunk-44-1.png" style="display: block; margin: auto;" />
]
---
## Some additional resources
- [ggplot2 - Elegant Graphics for Data Analysis](https://www.springer.com/gp/book/9783319242750) by Hadley Wickham
- [Chapter 3](https://r4ds.had.co.nz/data-visualisation.html) in *R for Data Science*
- [Fundamentals of Data Visualization](https://serialmentor.com/dataviz/) by Claus O. Wilke
- [Data Visualization - A Practical Introduction](https://press.princeton.edu/titles/13826.html) by Kieran Healy
- [data-to-viz](https://www.data-to-viz.com/)
- [R Graph Gallery](https://www.r-graph-gallery.com/)
- [BBC Visual and Data Journalism cookbook for R graphics](https://bbc.github.io/rcookbook/#how_to_create_bbc_style_graphics)
- [List of `ggplot2` extensions](https://exts.ggplot2.tidyverse.org/)
---
class: center, middle
# [Exercise](https://jobreu.github.io/r-intro-gesis-2021/exercises/Exercise_3_2_4_GGood_Plots.html) time 🏋️♀️💪🏃🚴
## [Solutions](https://jobreu.github.io/r-intro-gesis-2021/solutions/Exercise_3_2_4_GGood_Plots.html)