A data set from the Internationl Chess Federation is provided indicating transfer of players 2000-2017. Is there a consistent increase in transfer of chess players from 2000 to 2017 to the United States?
library(ggplot2)
Transfer_Data <- read.csv('https://raw.githubusercontent.com/engine2031/Data-607/main/Week%201%20Transfers.csv')
names(Transfer_Data)[4] <- "Transfer.From"
names(Transfer_Data)[5] <- "Transfer.Date"
Transfer_Data$Transfer.Date <- as.Date(Transfer_Data$Transfer.Date, format = "%m/%d/%y")
Transfer_Data$Transfer.Year <- format(as.Date(Transfer_Data$Transfer.Date, format="%d/%m/%Y"), "%Y")
Transfer_Data$Transfer.Year <- as.numeric(Transfer_Data$Transfer.Year)
head(Transfer_Data)
## url ID Federation
## 1 https://ratings.fide.com/fedchange.phtml?year=2000 2019221 USA
## 2 https://ratings.fide.com/fedchange.phtml?year=2000 14401754 BIH
## 3 https://ratings.fide.com/fedchange.phtml?year=2000 14401762 BIH
## 4 https://ratings.fide.com/fedchange.phtml?year=2000 2019221 USA
## 5 https://ratings.fide.com/fedchange.phtml?year=2000 14401754 BIH
## 6 https://ratings.fide.com/fedchange.phtml?year=2000 14401762 BIH
## Transfer.From Transfer.Date Transfer.Year
## 1 PHI 2000-12-15 2000
## 2 CRO 2000-01-31 2000
## 3 YUG 2000-01-31 2000
## 4 PHI 2000-12-15 2000
## 5 CRO 2000-01-31 2000
## 6 YUG 2000-01-31 2000
Transfer_Data2 <- subset(Transfer_Data, select=c( Federation, Transfer.From, Transfer.Year))
Transfer_DataUS <- subset(Transfer_Data, Federation=="USA", select=c( Federation, Transfer.From, Transfer.Year))
head(Transfer_Data2)
## Federation Transfer.From Transfer.Year
## 1 USA PHI 2000
## 2 BIH CRO 2000
## 3 BIH YUG 2000
## 4 USA PHI 2000
## 5 BIH CRO 2000
## 6 BIH YUG 2000
head(Transfer_DataUS)
## Federation Transfer.From Transfer.Year
## 1 USA PHI 2000
## 4 USA PHI 2000
## 11 USA AZE 2001
## 15 USA GEO 2001
## 24 USA RUS 2001
## 30 USA AZE 2001
ggplot(Transfer_DataUS, aes(x=Transfer.Year))+
geom_bar(stat="count", width=0.7, fill="steelblue")+
theme_minimal()
Although the author outlines data to demonstrate the increase in player tranfer to the US, taking a granular analysis on a per year perspective gives a different perspective. From 2007 to 2012 there was a significant decrease in player transfer. Further analysis targeting the years where there was a spike in tranfers could lead to more consistency.