Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Creamos nuevo dataframe para poder mostrar mejor el gráfico ensenando la corelacion entre resolucion y ctr
- res_data <- all_data[,c('Label', 'resolution')]
- res_data$Label <- as.factor(res_data$Label)
- res_data$resolution <- as.factor(res_data$resolution)
- res_data<-res_data[!is.na(res_data$Label),]
- res_data<-res_data[!is.na(res_data$resolution),]
- #Graficamos
- ggplot(res_data, aes(x=res_data$resolution, fill = Label)) +
- theme_bw() +
- #facet_wrap(~ Label) # adds dependency on another column
- geom_bar() +
- #scale_x_continuous(breaks = seq(0,65,2)) +
- #scale_y_continuous(breaks = seq(0,100,5)) +
- scale_fill_discrete(labels = c("Did not click", "Clicked")) +
- coord_cartesian(ylim = c(0,500000)) + #xlim = c(0,65),
- labs(y = "Count of people",
- x = "Resolution of an ad (in pixels)",
- title = "Conversion rate according to resolution of ad (detail)")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement