Imports
options(repos="https://cran.rstudio.com" )
install.packages("readr")
install.packages("dplyr")
library(readr)
library (dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
COVID-19 Cases Evolution in Bogota
bd <- read_csv2("covid28092020.csv")
## Using ',' as decimal and '.' as grouping mark. Use read_delim() for more control.
## Parsed with column specification:
## cols(
## FechaInicioSx = col_character(),
## FechaDx = col_character(),
## Ciudad = col_character(),
## Residencia = col_character(),
## Edad = col_double(),
## Sexo = col_character(),
## TipoCaso = col_character(),
## Ubicacion = col_character(),
## Estado = col_character()
## )
casos<- as.data.frame(table(bd$FechaDx))
casos$Var1<- as.Date(casos$Var1, "%d/%m/%y")
arrange(casos, Var1)
install.packages("plotly")
library(plotly)
## Loading required package: ggplot2
##
## Attaching package: '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
COVID-19 Deaths Cases Evolution in Bogota
c<- filter(bd, Estado=="Fallecido")
muertes <- as.data.frame(table(c$FechaDx))
muertes$Var1<- as.Date(muertes$Var1, "%d/%m/%y")
arrange(muertes, Var1)