Introducción

R es un lenguaje de programación y un entorno de software diseñado específicamente para análisis estadístico, minería de datos, visualización de datos y cálculos científicos.

Librerias

Las librerias utilizadas para este proyecto son:

library(dslabs)
library(ggplot2)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.2.0     ✔ readr     2.2.0
## ✔ forcats   1.0.1     ✔ stringr   1.6.0
## ✔ lubridate 1.9.5     ✔ tibble    3.3.1
## ✔ purrr     1.2.1     ✔ tidyr     1.3.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(dplyr)
library(plotly)
## 
## Adjuntando el paquete: 'plotly'
## 
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## 
## The following object is masked from 'package:stats':
## 
##     filter
## 
## The following object is masked from 'package:graphics':
## 
##     layout

Dataset

data("murders")

Gráficas

murders %>% ggplot(aes(population, total))+geom_point()

Gráfico Interactivo

p <- ggplot(data=iris, aes(x = Sepal.Length, y = Sepal.Width)) +  geom_point(aes(color=Species, shape=Species)) +  labs(title = "Iris sepal width vs length")
p

ggplotly(p)