{{ message }}

paulhurleyuk / WorldCup2006

World Cup 2006 Score data and analysis

Files

Failed to load latest commit information.
Type
Name
Commit time

WorldCup2006

World Cup 2006 Score data and analysis

A set of R scripts to scrape the fifa website for the 2006 games to produce stats of team scores.

Used as a topic dataset for a UK Maths school lesson

The following scripts scrape some data from the fifa website, process it and produce graphs.

# source('/home/paul/workspace/world_cup/R/1_getData.R')
# source('/home/paul/workspace/world_cup/R/2_processData.R')
source("/home/paul/workspace/world_cup/R/3_producePlots.R")

here is a sample of the graphs

qplot(Timen, data = firstgoal, geom = "histogram", binwidth = 10)

qplot(Timen, data = firstgoal, geom = "freqpoly")
## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust
## this.

qplot(factor(Team), Timen, data = firstgoal, geom = "boxplot") + geom_jitter()
## Warning: Removed 12 rows containing non-finite values (stat_boxplot).
## Warning: Removed 12 rows containing missing values (geom_point).

qplot(factor(Team), Timen, data = world.cup.2006, geom = "boxplot") + geom_jitter()
## Warning: Removed 18 rows containing non-finite values (stat_boxplot).
## Warning: Removed 18 rows containing missing values (geom_point).

qplot(Timen, data = top5firstgoal, geom = "histogram", binwidth = 1)

qplot(Timen, data = top5firstgoal, geom = "histogram", binwidth = 5)

ggplot(top5firstgoal, aes(Timen, fill = Team)) + geom_density(alpha = 0.2)

qplot(factor(Team), Timen, data = top5firstgoal, geom = "boxplot") + geom_jitter()

qplot(factor(Team), Timen, data = top5, geom = "boxplot") + geom_jitter()

World Cup 2006 Score data and analysis

Releases

No releases published

Packages 0

No packages published

Languages

You can’t perform that action at this time.