cargar librerias
library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.1.3
## Warning: package 'tibble' was built under R version 4.1.3
## Warning: package 'readr' was built under R version 4.1.3
## Warning: package 'forcats' was built under R version 4.1.3
## -- Attaching core tidyverse packages ------------------------ tidyverse 2.0.0 --
## v dplyr 1.1.4 v readr 2.1.4
## v forcats 1.0.0 v stringr 1.5.1
## v ggplot2 3.5.2 v tibble 3.2.1
## v lubridate 1.9.4 v tidyr 1.3.1
## v purrr 1.0.4
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
## i Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(plotly)
##
## 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
library(ggplot2)
library(shiny)
carga de dataset
tiktok <- read.csv("C:/Users/David Espinoza/Downloads/tiktok_dataset.csv")
visualizacion de dataset
glimpse(tiktok)
## Rows: 19,382
## Columns: 12
## $ X. <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14~
## $ claim_status <chr> "claim", "claim", "claim", "claim", "claim", ~
## $ video_id <dbl> 7017666017, 4014381136, 9859838091, 186684799~
## $ video_duration_sec <int> 59, 32, 31, 25, 19, 35, 16, 41, 50, 45, 47, 3~
## $ video_transcription_text <chr> "someone shared with me that drone deliveries~
## $ verified_status <chr> "not verified", "not verified", "not verified~
## $ author_ban_status <chr> "under review", "active", "active", "active",~
## $ video_view_count <chr> "343296", "140877", "902185", "437506", "5616~
## $ video_like_count <chr> "19425", "77355", "97690", "239954", "34987",~
## $ video_share_count <chr> "241", "19034", "2858", "34812", "4110", "623~
## $ video_download_count <chr> "1", "1161", "833", "1234", "547", "4293", "8~
## $ video_comment_count <chr> "0", "684", "329", "584", "152", "1857", "544~