Learn R Programming

ggcleveland

Gráficos para Análisis Exploratorio de Datos

Plots for Exploratory Data Analysis


Web: https://mpru.github.io/ggcleveland/


El libro Visualizing Data de William S. Cleveland es una pieza clásica en la literatura sobre Análisis Exploratorio de Datos (AED). Habiendo sido escrito algunas décadas atrás, su contenido sigue siendo relevante ya que propone herramientas útiles para descubrir patrones y relaciones en los datos estudiados, como así también para evaluar ajustes. Este paquete ofrece funciones que producen la versión en ggplot2 de las herramientas de visualización descriptas en este libro. Fue diseñado como material complementario en cursos sobre AED.


William S. Cleveland’s book ‘Visualizing Data’ is a classic piece of literature on Exploratory Data Analysis (EDA). Although it was written several decades ago, its content is still relevant as it proposes several tools which are useful to discover patterns and relationships among the data under study, and also to assess the goodness of fit o a model. This package provides functions to produce the ggplot2 versions of the visualization tools described in this book and is thought to be used in the context of courses on EDA.

Instalación / Instalation

Se puede instalar la versión en desarrollo del paquete ggcleveland desde GitHub con:

# install.packages("devtools")
devtools::install_github("mpru/ggcleveland")

Ejemplos / Examples

Podés ver ejemplos de cada una de los gráficos producidos con este paquete en las viñetas. Algunos de ellos son:


You can explore examples of each of the plots produced by this package in the vignettes. Some of them are:

Gráficos condicionales / Coplots:

library(ggcleveland)
library(dplyr)
library(ggplot2)
theme_set(theme_bw() + theme(panel.spacing = unit(0, "lines")))

data(rubber)

gg_coplot(rubber, x = tensile.strength, y = abrasion.loss, faceting = hardness,
  number_bins = 6, overlap = 3/4,
  ylabel = "Pérdida de abrasión (g/hp-hour))",
  xlabel = "Resistencia a la tracción (kg/cm2)",
  facet_label = "Dureza (grados Shore)", 
  loess_family = "symmetric", size = 2)

Residual-Fit plots:

data(futbol)

futbol <- 
  futbol %>% 
  group_by(longp) %>% 
  mutate(ajuste = mean(dist), res = dist - ajuste)

gg_rf(futbol, dist, ajuste, res, cen_obs = TRUE, ylabel = "Distancia (m)")

Gráfico Media-Diferencia de Tukey / Tukey’s MD Plot:

gg_tmd(futbol, dist, longp, size = 0.5)

Copy Link

Version

Install

install.packages('ggcleveland')

Monthly Downloads

249

Version

0.1.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Marcos Prunello

Last Published

August 16th, 2021

Functions in ggcleveland (0.1.0)

fly

Dataset fly
gg_coplot

Conditional plots
ganglion

Dataset ganglion
gg_rf

Residual-Fit plot
polarization

Dataset polarization
gg_sl

Spread-Location plot
gg_tmd

Tukey's Mean-Difference plot for one-way data
gg_tmd_paired

The gg_tmd_paired function
transf_pot

The trasf_pot function
rubber

Dataset rubber
playfair

Dataset playfair
gg_pt

Plots for power transformations
gg_quantiles

Quantile-Quantile plots
make_coplot_df

Creation of tibbles por coplots
ozone

Dataset ozone
equal_count

The equal count algorithm
galaxy

Dataset galaxy
futbol

Dataset futbol
dating

Dataset dating
fusion

Dataset fusion
etanol

Dataset etanol
environmental

Dataset environmental
food

Dataset food
bin

Dataset bin