scale_y_log10() +
facet_wrap(~ Country)
ggplot(worldCupWinner, aes(x = Country, y = Factor, color = Source)) +
geom_point() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(worldCupWinner, aes(x = Source, y = Factor, color = Country)) +
geom_point() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(worldCupWinner, aes(x = Source, y = Factor, color = Source)) +
geom_point() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(worldCupWinner, aes(x = Country, y = factor, color = Country)) +
geom_area() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(worldCupWinner, aes(x = Source, y = Factor, color = Source)) +
geom_point() +
scale_y_log10() +
facet_wrap(~ Country)
theChart <- worldCupWinner %>% filter(Country %in% c("Mexico"))
ggplot(theChart, aes(x = Source, y = Factor, color = Source)) +
geom_point() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(theChart, aes(x = Source, y = Factor, color = Source)) +
geom_area() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(theChart, aes(x = Source, y = Factor, color = Source)) +
geom_boxplot() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(theChart, aes(x = Source, y = Factor)) +
geom_boxplot() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(theChart, aes(y = Factor)) +
geom_boxplot() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(theChart, aes(x = Source, y = Factor, color = Source)) +
geom_boxplot() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(theChart, aes(x = Country, y = Factor, color = Source)) +
geom_boxplot() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(theChart, aes(x = Country, y = Factor, color = Source)) +
geom_boxplot() +
facet_wrap(~ Country)
worldCupWinner$Country <- as.factor(worldCupWinner$Country)
theChart <- worldCupWinner %>% filter(Country %in% c("Mexico"))
ggplot(theChart, aes(x = Country, y = Factor, color = Source)) +
geom_boxplot() +
facet_wrap(~ Country)
ggplot(theChart, aes(x = Country, y = Factor)) +
geom_boxplot() +
facet_wrap(~ Country)
source('C:/Users/victo/Desktop/mexico_bets/main.R')
source('C:/Users/victo/Desktop/mexico_bets/chart.R')
ggplot(theChart, aes(x = Country, y = Factor)) +
geom_boxplot() +
facet_wrap(~ Country)
source('C:/Users/victo/Desktop/mexico_bets/chart.R')
theChart <- worldCupWinner %>% filter(Country %in% c("Mexico"))
ggplot(theChart, aes(x = Source, y = Factor, color = Source)) +
geom_point() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(theChart, aes(x = Country, y = Factor)) +
geom_boxplot() +
facet_wrap(~ Country)
theChart <- worldCupWinner %>% filter(Country %in% c("Germany"))
ggplot(theChart, aes(x = Source, y = Factor, color = Source)) +
geom_point() +
scale_y_log10() +
facet_wrap(~ Country)
ggplot(theChart, aes(x = Country, y = Factor)) +
geom_boxplot() +
facet_wrap(~ Country)
theChart <- worldCupWinner %>% filter(Country %in% c("Mexico", "Germany"))
ggplot(theChart, aes(x = Country, y = Factor)) +
geom_boxplot() +
facet_wrap(~ Country)
ggplot(theChart, aes(x = Country, y = Factor)) +
geom_boxplot()
ggplot(theChart, aes(x = Country, y = Factor)) +
geom_boxplot() +
scale_y_reverse()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_y_reverse()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_y_reverse()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_y_reverse()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_y_reverse() +
scale_x_discrete()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_y_reverse() +
scale_x_discrete()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_y_reverse() +
scale_x_discrete() +
theme_classic()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_y_reverse() +
scale_x_discrete() +
theme_dark()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_y_reverse() +
scale_x_discrete() +
theme_light()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_y_reverse() +
scale_x_discrete() +
theme_minimal()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_y_reverse() +
scale_x_discrete() +
theme_minimal()
source('C:/Users/victo/Desktop/mexico_bets/chart.R')
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
theme_minimal()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
theme_bw()
install.packages("ggthemes")
library(ggthemes)
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_excel()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_gdocs()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
source('C:/Users/victo/Desktop/mexico_bets/chart.R', encoding = 'UTF-8')
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
theChart <- worldCupWinner %>% filter(Country %in% c("Mexico", "Germany", "South Korea", "Sweden"))
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
ggplot_gtable() +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
ggplot_gtable(theChart) +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
rm(list = ls())
source('C:/Users/victo/Desktop/mexico_bets/main.R', encoding = 'UTF-8')
rm(list = ls())
source('C:/Users/victo/Desktop/mexico_bets/main.R', encoding = 'UTF-8')
theChart <- ggplot(theChartData, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
theGroup <- c("Mexico", "Germany", "South Korea", "Sweden")
theChartData <- worldCupWinner %>% filter(Country %in% theGroup)
theChart <- ggplot(theChartData, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
source('C:/Users/victo/Desktop/mexico_bets/main.R', encoding = 'UTF-8')
theGroup <- c("Mexico", "Germany", "South Korea", "Sweden")
theChartData <- worldCupWinner %>% filter(Country %in% theGroup)
theChart <- ggplot(theChartData, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
#Create a chart
theGroup <- c("Mexico", "Germany", "South Korea", "Sweden")
ggplot(theChartData, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
source('C:/Users/victo/Desktop/mexico_bets/main.R', encoding = 'UTF-8')
theChart <- ggplot(theChartData, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
View(theChartData)
theChart <- worldCupWinner %>% filter(Country %in% c("Mexico", "Germany", "South Korea", "Sweden"))
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
ggplot(theChart, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
theChart <- ggplot(theChartData, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
theChart <- ggplot(theChartData, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
theChart
rm(list = ls())
source('C:/Users/victo/Desktop/mexico_bets/main.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/main.R', encoding = 'UTF-8')
View(theChart)
rm(list = ls())
source('C:/Users/victo/Desktop/mexico_bets/main.R', encoding = 'UTF-8')
View(theChart)
theChart[["mapping"]]
ggplot(theChartData, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
View(theChart)
ggplot(theChartData, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle("¿Qué dicen las apuestas?") +
theme_economist()
rm(list = ls())
source('C:/Users/victo/Desktop/mexico_bets/main.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/main.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/main.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/main.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
rm(list = ls())
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
source('~/.active-rstudio-document', encoding = 'UTF-8')
source('~/.active-rstudio-document', encoding = 'UTF-8')
View(worldCupWinner)
View(worldCupWinner)
theChart <- ggplot(worldCupWinner, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle(paste("¿Qué dicen las apuestas? Última consulta:", Sys.time())) +
theme_economist()
print(theChart)
theChart <- ggplot(worldCupWinner, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle(paste("¿Qué dicen las apuestas? Última consulta:", Sys.time())) +
theme_economist()
facet_wrap(~Country)
theChart <- ggplot(worldCupWinner, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle(paste("¿Qué dicen las apuestas? Última consulta:", Sys.time())) +
theme_economist()
facet_wrap(~Country)
print(theChart)
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
View(theChart)
View(theChartData)
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
theGroup <- c("Mexico", "Germany", "South Korea", "Sweden")
theChartData <- worldCupWinner %>% filter(Country %in% theGroup)
theChart <- ggplot(theChartData, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle(paste("¿Qué dicen las apuestas? Última consulta:", Sys.time())) +
theme_economist()
print(theChart)
print(theChart)
View(theChartData)
library(stringr)
library(tidyr)
library(dplyr)
library(ggplot2)
library(ggthemes)
#Load function
source("getDataFromOddsChecker.R")
#Load World Cup Winner table
worldCupWinner <- oddschecker("football/world-cup/winner")
#Set row name as an additional column
worldCupWinner <- add_rownames(worldCupWinner)
names(worldCupWinner)[1] <- "Country"
View(worldCupWinner)
#Transpose data
worldCupWinner <- worldCupWinner %>% gather("Source", "Bet", 2:27)
View(worldCupWinner)
#Transpose data
worldCupWinner <- worldCupWinner %>% gather("Source", "Bet", 2:27)
View(worldCupWinner)
worldCupWinner <- worldCupWinner %>% gather("Source", "Bet", 2:27)
rm(list = ls())
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
View(worldCupWinner)
worldCupWinner <- worldCupWinner %>% gather("Source", "Bet", 2:27)
names(worldCupWinner)[1] <- "Country"
View(worldCupWinner)
glimpse(worldCupWinner)
#Transpose data
worldCupWinner <- worldCupWinner %>% gather("Source", "Bet", 2:25)
View(worldCupWinner)
#remove empty values
worldCupWinner <- worldCupWinner %>% filter(Bet != "")
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
View(theChartData)
theChartData %>% group_by(Country) %>% summarise(max(Factor))
ncol(worldCupWinner)
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
rm(list = ls())
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
theChartData %>% group_by(Country) %>% summarise(max(Factor))
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
theChartData %>% group_by(Country) %>% summarise(max(Factor))
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
theWorldCupWinner %>% group_by(Country) %>% summarise(max(Factor))
worldCupWinner %>% group_by(Country) %>% summarise(max(Factor))
worldCupWinner %>% group_by(Country) %>% summarise(Max_Factor = max(Factor)) %>% arrange(desc(Max_Factor))
worldCupWinner %>% group_by(Country) %>% summarise(Max_Factor = max(Factor)) %>% arrange((Max_Factor))
source('C:/Users/victo/Desktop/mexico_bets/execute.R', encoding = 'UTF-8')
rm(list = ls())
source('C:/Users/victo/Desktop/mexico_bets/mexico_Germany.R', encoding = 'UTF-8')
View(worldCupWinner)
View(worldCupWinner)
source('C:/Users/victo/Desktop/mexico_bets/mexico_Germany.R', encoding = 'UTF-8')
View(worldCupWinner)
View(worldCupWinner)
source('C:/Users/victo/Desktop/mexico_bets/mexico_Germany.R', encoding = 'UTF-8')
View(worldCupWinner)
source('C:/Users/victo/Desktop/mexico_bets/mexico_Germany.R', encoding = 'UTF-8')
print(theChart)
theChart <- ggplot(worldCupWinner, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle(paste("¿Qué dicen las apuestas? Última consulta:", Sys.time())) +
theme_economist()
theChart <- ggplot(worldCupWinner, aes(x = Country, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle(paste("¿Qué dicen las apuestas? Última consulta:", Sys.time())) +
theme_economist()
#Create a chart
theChartData <- worldCupWinner %>% group_by(Event)
View(theChartData)
ggplot(worldCupWinner, aes(x = Event, y = Factor, Color = Country)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle(paste("¿Qué dicen las apuestas? Última consulta:", Sys.time())) +
theme_economist()
ggplot(worldCupWinner, aes(x = Event, y = Factor, Color = Event)) +
geom_boxplot() +
scale_x_discrete() +
geom_jitter() +
ggtitle(paste("¿Qué dicen las apuestas? Última consulta:", Sys.time())) +
theme_economist()
source('C:/Users/victo/Desktop/mexico_bets/mexico_Germany.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/mexico_Germany.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/mexico_Germany.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/mexico_Germany.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/mexico_Germany.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/mexico_Germany.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/mexico_Sweden.R', encoding = 'UTF-8')
source('C:/Users/victo/Desktop/mexico_bets/mexico_SouthKorea.R', encoding = 'UTF-8')
rm(list = ls())
