Effective Data Visualization with R: Volume I – Base Graphics
by FRU Kingsly
- Length: 2353 pages
- Edition: 1
- Language: English
- Publication Date: 2021-07-22
- ISBN-10: B09B3WCZRM
- Sales Rank: #0 (See Top 100 Books)
If there is one thing R is famous and known about, is its graphics capabilities. There are many packages out there for producing plots in R, top amongst which is the base graphics package which comes with R preinstalled.
The goal of this book is to explore the nooks and crannies of chart production with base graphics and is the first in a series of books on data visualization with R.
This book is divided into four parts which are:
- Introduces you to data visualization in general and R in particular (Chapter 1)
- Chapter 1: Introduction to data visualization
- Introduces you to plotting with base graphics and plot elements (Chapter 2 and 3)
- Chapter 2: Introduction to plotting with base graphics
- Chapter 3: Plot elements
- Producing different chart types (Chapter 4 to 10)
- Chapter 4: One discrete variable charts
- Chapter 5: One continuous variable charts
- Chapter 6: Two discrete variables charts
- Chapter 7: One discrete and one continuous variable charts
- Chapter 8: Two continuous variables charts
- Chapter 9: Three variables charts
- Chapter 10: More than Three variables charts
- Map visualization with the maps package (Chapter 11 to 13)
- Chapter 11: Base maps with maps
- Chapter 12: Qualitative Maps
- Chapter 13: Quantitative maps
Effective Data Visualization with R: Volume I - Base Graphics Preface About the author Who is this book for How is this Book Structured Dedication 1 Introduction to data visualization Chapter Objectives 1.1 What is data visualization? 1.2 The importance of data visualization 1.3 Static versus interactive data visualization 1.4 Exploratory versus Explanatory data visualization 1.5 Chart types 1.5.1 Chart types classified by purpose 1.5.2 Chart types classified by the number and type of variables 1.6 Chart attributes 1.7 Plot elements 1.8 R data visualization packages 2 Introduction to plotting with base graphics Chapter Objectives 2.1 The plot() function 2.1.1 Filtering data 2.2 Shape 2.2.1 Shapes by groups (categories) 2.3 Size 2.3.1 Size as a variable 2.4 Colour 2.4.1 Gray colours 2.4.2 RGB 2.4.3 HSV 2.4.4 Converting between different colour models 2.4.5 Colouring points by groups (categories) 2.4.6 Colouring by a continuous variable 2.4.7 Transparency 2.5 Colour palettes 2.5.1 R’s default colour palette 2.5.2 The grDevices colour palettes 2.5.3 RcolorBrewer 2.5.4 The colorspace palette 2.5.5 Wes Anderson colour palettes 2.6 Plot type 2.7 Line width and style 2.7.1 Line width 2.7.2 Line style 2.7.3 Line end style 2.8 Controlling axes ranges (zooming) 2.9 Applying log transformation 2.10 Saving plots to variables names 2.11 Summary 3 Plot elements Chapter Objectives 3.1 Title, labels, and text 3.1.1 Adding a title and axis labels 3.1.2 Remove title and axis labels 3.1.3 Adding titles and axis labels using title() 3.1.4 Customizing title and labels 3.1.5 Adding a title and axis labels using mtext() 3.1.6 Adding data labels and comments 3.2 Controlling axes and tick marks 3.2.1 Removing borders 3.2.2 Removing axes 3.2.3 Adding axes 3.2.4 Customizing axis 3.3 Controlling plot elements using par 3.3.1 Get default setting 3.3.2 Controlling size 3.3.3 Restoring default settings 3.3.4 Controlling colours 3.3.5 Controlling font style 3.3.6 Font family 3.3.7 Controlling line style and width 3.3.8 Controlling box styles 3.3.9 Controlling background and foreground colours 3.3.10 Controlling plot margins 3.3.11 Axis interval 3.3.12 Tick marks length 3.3.13 Controlling margin line 3.4 Subplots (multiple plots on the same sheet) 3.4.1 Subplots with mfcol and mfrow 3.4.2 Subplots with layout() 3.5 Clipping region 3.6 Adding a legend 3.6.1 Legend position 3.6.2 Legend orientation 3.6.3 Legend title 3.6.4 Legend text 3.6.5 Legend shapes (boxes, lines, and points) 3.6.6 Legend body 3.7 Gridlines 3.8 Background and borders 3.8.1 Panel colour 3.8.2 Adding a box around the plot 3.9 Saving plot to computer 3.9.1 Saving plot using code 3.9.2 Saving plot using RStudio 4 One discrete variable charts Chapter Objectives 4.1 Bar chart 4.1.1 Bar width and space 4.1.2 Borders and colours 4.1.3 Shading lines 4.1.4 Column chart 4.1.5 Adding data labels 4.1.6 Adding error bars 4.2 Pie chart 4.2.1 Controlling size 4.2.2 Controlling direction 4.2.3 Adding a legend 4.3 3D pie chart 4.3.1 Adding labels 4.3.2 Exploding the pie chart 4.3.3 Height 4.3.4 Margins 4.4 Treemap 4.4.1 Colouring by a variable 4.4.2 Plotting hierarchical data 5 One continuous variable charts Chapter Objectives 5.1 Histogram 5.1.1 Bin size and number of breaks 5.1.2 Colour, border, and shading lines 5.1.3 Multiple histograms 5.1.4 Comparing two series 5.1.5 Converting to probability densities 5.2 Density plot 5.2.1 Multiple lines 5.2.2 Controlling smoothness 5.2.3 Kernel 5.2.4 Filling the area under the curve 5.2.5 Combining histogram and density plot 5.2.6 Adding rug 5.3 Q-Q plot 5.4 Stem-and-leaf plot 6 Two discrete variables charts Chapter Objectives 6.1 Mosaic plot 6.1.1 Colour and border 6.1.2 Controlling space 6.1.3 Horizontal mosaic plot 6.2 Spine plot 6.2.1 Colour and border 6.2.2 Controlling space 6.2.3 Adding a legend 6.3 Association plot 6.3.1 Spacing 7 One discrete and one continuous variable charts Chapter Objectives 7.1 Stacked bar chart 7.1.1 Adding data labels 7.1.2 Adding a legend 7.1.3 Stacked column chart 7.1.4 100% stacked bar chart 7.1.5 100% stacked column chart 7.2 Clustered Bar Chart 7.2.1 Adding space between bars 7.2.2 Adding vertical lines 7.2.3 Adding data labels 7.3 Dot Plot 7.3.1 Adding labels 7.3.2 Adding groups 7.3.3 Adding group values 7.3.4 Shapes 7.3.5 Dot sizes 7.3.6 Colour 7.4 Spinogram 7.4.1 Breaks 7.4.2 Reordering levels 7.5 Conditional Density Plots 7.6 Boxplot 7.6.1 Box width 7.6.2 Adding notch 7.6.3 Horizontal boxplot 7.6.4 Removing outliers 7.6.5 Log transformation 7.6.6 Grouped boxplot 7.6.7 Using two continuous variables 7.6.8 Grouping by two or more discrete variables 7.6.9 Plotting two or more continuous variables 7.6.10 Customizing boxplot 7.6.11 Box width 7.6.12 Boxplot annotated with the number of observations 7.7 Strip plot 7.7.1 Adding jitter 7.7.2 Vertical strip plot 7.7.3 Grouped strip plot 7.7.4 Using two continuous variables 7.7.5 Grouping by two or more discrete variables 7.7.6 Plotting two or more continuous variables 7.7.7 Combining boxplot and strip plot 7.8 Violin plot 7.8.1 Horizontal 7.8.2 Customizing 7.8.3 Combining violin and strip plot 8 Two continuous variables charts Chapter Objectives 8.1 Scatter plot 8.1.1 Adding jitter 8.1.2 Adding rug 8.1.3 Adding lines Adding a linear regression line Adding smooth 8.2 Grouped or clustered scatter plot 8.2.1 Using points() 8.2.2 Adding data labels 8.3 Using scatterplot() from the package car 8.3.1 3D scatterplot 8.3.2 Adding horizontal lines 8.4 Smooth scatter plot 8.4.1 Bin size 8.4.2 Colouring 8.4.3 Points 8.5 Combining scatter plot and other chart types 8.5.1 Scatter plot and violin plot 8.5.2 Combining scatter plot and histograms 8.6 Bubble plot 8.6.1 Controlling bubble size 8.7 Line and lollipop charts 8.8 Line chart by groups 8.8.1 Long data 8.8.2 Wide data 8.8.3 Margin labels 9 Three variables charts Chapter Objectives 9.1 Heat map 9.1.1 Normalization across columns or rows 9.1.2 Suppressing row and column dendrogram 9.1.3 Changing colours 9.1.4 Heat map for the English premier league (EPL) 2018/2019 9.1.5 Using the function image() to create a heat map 9.1.6 Using the function heatmap.2() from the gplots package 9.1.7 Using the function pheatmap() from the pheatmap package 9.2 Contour plot 9.2.1 Contour levels 9.2.2 Adding and removing data labels 9.2.3 Filled contour plots 9.2.4 Using the function image() 9.2.5 Combining a line and filled contour plot 10 More than Three variables charts Chapter Objectives 10.1 Scatter plot matrix 10.1.1 panel function 10.1.2 Using scatterplotMatrix() from car 10.1.3 Using corrgram() from corrgram 10.2 Parallel plot 10.2.1 Highlighting a particular group 10.3 Conditional Plots 10.3.1 Conditioning on categorical variables 10.3.2 Conditioning on continuous variables 10.3.3 Conditioning on continuous and categorical variables 10.3.4 Customizing the plot 10.3.5 panel function 10.4 Radar chart (spider plot) 10.4.1 Changing labels 10.4.2 Axis type 10.4.3 Colours 10.4.4 Adding polygons 10.4.5 Controlling lines 10.4.6 Shading lines 11 Base maps with maps Chapter Objectives 11.1 The map() function 11.2 The mapdata package 11.3 Plotting regions 11.4 Customising maps 11.4.1 Map projection 11.4.2 Controlling fill, interior and boundary lines 11.4.3 Gridlines 11.4.4 Zooming with xlim and ylim 11.4.5 Adding axes 11.4.6 City names 11.4.7 Combining maps 11.4.8 Adding points and text 11.4.9 Adding lines 11.4.10 Highlighting portions of a map 12 Qualitative Maps 12.1 Dot maps 12.1.1 Plotting dots 12.1.2 Adding base map 12.1.3 Zooming 12.1.4 Adding text 12.2 Radial flow maps 12.2.1 Adding lines with the function segments() 12.2.2 Adding lines with the function arrows() 12.3 Categorical map 13 Quantitative maps Chapter Objectives 13.1 Bubble (proportional symbols) map 13.1.1 Data transformation 13.2 Network flow maps 13.3 Choropleth maps 13.3.1 Using the function classIntervals() 13.3.2 Using the function findColours()
Donate to keep this site alive
To access the Link, solve the captcha.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.