class: center, middle, inverse, title-slide .title[ # Data Visualization ] .subtitle[ ## Chapter 3. Data Visualization in R ] .author[ ### Iñaki Úcar ] .institute[ ### Department of Statistics | uc3m-Santander Big Data Institute ] .institute[ ### Master in Computational Social Science ] .date[ ###
Licensed under Creative Commons Attribution
CC BY 4.0
Last generated: 2023-01-25
] --- class: base24 # Directory of Visualizations .footnote[Based on [The R Graph Gallery](https://r-graph-gallery.com/)] .pull-left[ - .distribution[[Distribution](ch3_1.html#3)].icons[ ![:scale 10%](assets/img/section/Violin150.png) ![:scale 10%](assets/img/section/Density150.png) ![:scale 10%](assets/img/section/Histogram150.png) ![:scale 10%](assets/img/section/Box1150.png) ![:scale 10%](assets/img/section/Joyplot150.png) ] - .correlation[[Correlation](ch3_2.html#3)].icons[ ![:scale 10%](assets/img/section/ScatterPlot150.png) ![:scale 10%](assets/img/section/Heatmap150.png) ![:scale 10%](assets/img/section/Correlogram150.png) ![:scale 10%](assets/img/section/BubblePlot150.png) ![:scale 10%](assets/img/section/ScatterConnected150.png) ![:scale 10%](assets/img/section/2dDensity150.png) ] - .ranking[[Ranking](ch3_3.html#3)].icons[ ![:scale 10%](assets/img/section/Bar150.png) ![:scale 10%](assets/img/section/Spider150.png) ![:scale 10%](assets/img/section/Wordcloud150.png) ![:scale 10%](assets/img/section/Parallel1150.png) ![:scale 10%](assets/img/section/Lollipop150.png) ![:scale 10%](assets/img/section/CircularBarplot150.png) ] - .part[[Part of a Whole](ch3_4.html#3)].icons[ ![:scale 10%](assets/img/section/GroupedRed150.png) ![:scale 10%](assets/img/section/Tree150.png) ![:scale 10%](assets/img/section/Doughnut150.png) ![:scale 10%](assets/img/section/Pie150.png) ![:scale 10%](assets/img/section/Dendrogram150.png) ![:scale 10%](assets/img/section/CircularPacking150.png) ] ] .pull-right[ - .evolution[[Evolution](ch3_5.html#3)].icons[ ![:scale 10%](assets/img/section/Line150.png) ![:scale 10%](assets/img/section/Area150.png) ![:scale 10%](assets/img/section/StackedArea150.png) ![:scale 10%](assets/img/section/Stream150.png) ![:scale 10%](assets/img/section/Time150.gif) ] - .map[[Map](ch3_6.html#3)].icons[ ![:scale 10%](assets/img/section/Map150.png) ![:scale 10%](assets/img/section/Choropleth150.png) ![:scale 10%](assets/img/section/MapHexbin150.png) ![:scale 10%](assets/img/section/Cartogram150.png) ![:scale 10%](assets/img/section/ConnectedMap150.png) ![:scale 10%](assets/img/section/BubbleMap150.png) ] - .flow[[Flow](ch3_7.html#3)].icons[ ![:scale 10%](assets/img/section/Chord150.png) ![:scale 10%](assets/img/section/Network150.png) ![:scale 10%](assets/img/section/Sankey150.png) ![:scale 10%](assets/img/section/Arc150.png) ![:scale 10%](assets/img/section/Bundle150.png) ] - .other[[Other resources](ch3_8.html#3)].icons[ ![:scale 10%](assets/img/section/anim150.gif) ![:scale 10%](assets/img/section/Interactive150.png) ![:scale 10%](assets/img/section/Bad150.png) ![:scale 10%](assets/img/section/DataArt1150.png) ] ] --- class: other # Other Resources .footnote[[< Contents](#2)] [![:scale 15%](assets/img/section/anim150.gif)](https://r-graph-gallery.com/animation.html) [![:scale 15%](assets/img/section/Interactive150.png)](https://r-graph-gallery.com/interactive-charts.html) [![:scale 15%](assets/img/section/Bad150.png)](https://www.data-to-viz.com/caveats.html) [![:scale 15%](assets/img/section/DataArt1150.png)](https://www.data-to-art.com/) .bottom[Animation] .bottom[Interactive] .bottom[Caveats] .bottom[Data Art] <br> .black.font120[ ] --- class: other # Other Resources ![:scale 6%](assets/img/section/anim150.gif) Animation .footnote[[< Contents](#2)] .pull-left-mod[ ```r ggplot(gapminder::gapminder) + aes(gdpPercap, lifeExp) + geom_point(aes(size=pop, color=continent), alpha=0.7) + scale_size(range=c(2, 12), guide=NULL) + scale_x_log10() + theme(legend.position=c(1, 0), legend.justification=c(1, 0)) + * gganimate::transition_time(year) + * gganimate::ease_aes("linear") + * labs(title="Year: {frame_time}") ``` ] .pull-right-mod[ <img src="ch3_files/animation-1.gif" style="display: block; margin: auto;" /> ] --- class: other # Other Resources ![:scale 6%](assets/img/section/Interactive150.png) Interactivity .footnote[[< Contents](#2)] .pull-left-mod[ ```r ggplot(gapminder::gapminder) + aes(gdpPercap, lifeExp) + geom_point(aes(size=pop, color=continent), alpha=0.7) + scale_size(range=c(2, 12), guide=NULL) + scale_x_log10() + theme_gray(base_size=10) + * aes(frame=year, text=country) -> p *plotly::ggplotly(p) |> plotly::layout(legend=list( x=1, y=0, xanchor="right")) ``` ] .pull-right-mod[
] --- class: other # Other Resources ![:scale 6%](assets/img/section/Bad150.png) Caveats .footnote[[< Contents](#2)] <iframe src="https://www.data-to-viz.com/caveats.html" style="position:relative;left:0;top:0;width:100%;height:100%" frameborder="0" scrolling="yes"></iframe> --- class: other # Other Resources ![:scale 6%](assets/img/section/DataArt1150.png) Inspiration .footnote[[< Contents](#2)] <iframe src="https://www.dataviz-inspiration.com/" style="position:relative;left:0;top:0;width:100%;height:100%" frameborder="0" scrolling="yes"></iframe> --- class: other # Other Resources ![:scale 6%](assets/img/section/DataArt1150.png) Data Art .footnote[[< Contents](#2)] <iframe src="https://www.data-to-art.com/" style="position:relative;left:0;top:0;width:100%;height:100%" frameborder="0" scrolling="yes"></iframe> --- class: other # Other Resources | Chart selection .footnote[[< Contents](#2)] <iframe src="https://www.data-to-viz.com/#explore" style="position:relative;left:0;top:0;width:100%;height:100%" frameborder="0" scrolling="yes"></iframe> --- class: other # Other Resources | Chart selection .footnote[[< Contents](#2)] <iframe src="https://datavizproject.com/" style="position:relative;left:0;top:0;width:100%;height:100%" frameborder="0" scrolling="yes"></iframe> --- class: other # Other Resources | Chart selection .footnote[[< Contents](#2)] <iframe src="https://visualizationuniverse.com/charts/" style="position:relative;left:0;top:0;width:100%;height:100%" frameborder="0" scrolling="yes"></iframe> --- class: other # Other Resources | Extensions .footnote[[< Contents](#2)] <iframe src="https://exts.ggplot2.tidyverse.org/gallery/" style="position:relative;left:0;top:0;width:100%;height:100%" frameborder="0" scrolling="yes"></iframe>