Created
December 17, 2017 02:07
-
-
Save hereismari/161c04aac21180b8c80bed0590df5836 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bibliotecas | |
library('dplyr'); | |
library('ggplot2'); | |
library('caret'); | |
# importando os dados | |
dados <- read.csv('~/Documents/eda.csv') | |
# renomear as colunas | |
colnames(dados) <- c("matricula", "id_reclamacao", "insatisfacao"); | |
# mudando matricula e id da reclamacao para factor | |
dados$matricula = as.factor(dados$matricula) | |
dados$id_reclamacao = as.factor(dados$id_reclamacao) | |
# contar numero de revisoes por reclamacao | |
dados %>% group_by(id_reclamacao) %>% | |
summarize(count=n()) %>% | |
ggplot(aes(x=reorder(id_reclamacao, count), y=count)) + geom_bar(stat = "identity") | |
# contar numero de revisoes por aluno | |
dados %>% group_by(matricula) %>% | |
summarize(count=n()) %>% | |
ggplot(aes(x=reorder(matricula, count), y=count)) + geom_bar(stat = "identity") | |
# visualizar mediana e quartis | |
dados %>% group_by(id_reclamacao) %>% | |
ggplot(aes(x=id_reclamacao, y=insatisfacao)) + geom_boxplot() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment