動機

因為很少看到民主制度探討與運動相關的議題,想藉由這次機會,分析民主指數與運動表現的相關程度。

分析過程

導入使用工具

library(devtools)
## Loading required package: usethis
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)
library(readr)
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
library(ggthemes)
library(d3heatmap)
library(magrittr)

將我們所需要的資料匯入

athlete_all <- read.csv('./athlete_all.csv')

依照國家民主程度分資料

tb <- athlete_all %>% 
  select(democracy_score,Medal) %>% 
  filter(Medal=="Gold") %>% 
  na.omit()

計算各民主程度貢獻之金牌數量

result <- tb %>% 
  group_by(democracy_score) %>% 
  summarise(number=n())

以各國運動員所處地區之民主指數進行資料分類,並取該地獲得金牌之數量為代表畫圖

result %>% ggplot(aes(x=democracy_score)) + geom_col(aes(y=number))

以長條圖分析民主程度與金牌數量之關係。結果發現民主程度-7和程度10在金牌的貢獻度上特別突出所以將該兩群資料過濾出來,不民主國家中獎牌貢獻最多的是中國,而民主國家中獎牌貢獻最多的是美國。

r1 = athlete_all %>% 
  select(democracy_score,country) %>% 
  filter(democracy_score=="-7") %>% 
  na.omit() %>% 
  group_by(country) %>% 
  summarise(number=n())
r1 %>% 
  arrange(desc(number)) %>% 
  head(10)
## # A tibble: 10 x 2
##    country  number
##    <fct>     <int>
##  1 China      3823
##  2 Hungary    2888
##  3 Poland     2457
##  4 Bulgaria   2151
##  5 Cuba       1975
##  6 Romania    1521
##  7 Belarus    1310
##  8 Spain       957
##  9 Egypt       346
## 10 Mongolia    315
r2 = athlete_all %>% 
  select(democracy_score,country) %>% 
  filter(democracy_score=="10") %>% 
  na.omit() %>% 
  group_by(country) %>% 
  summarise(number=n())
r2 %>% arrange(desc(number)) %>% head(10)
## # A tibble: 10 x 2
##    country       number
##    <fct>          <int>
##  1 United States  16146
##  2 Canada          7910
##  3 Italy           7544
##  4 Japan           6551
##  5 Sweden          6549
##  6 Australia       6404
##  7 Germany         6034
##  8 Switzerland     5359
##  9 Netherlands     4743
## 10 Finland         4495

另外也將民主國家中和不民主國家中,各國對金牌的貢獻度過濾出來,結果不民主國家中金牌貢獻度最高的就不是中國了

ea = athlete_all %>% 
  select(democracy_score,country, Medal) %>% 
  filter(democracy_score=="-7" & Medal == "Gold") %>% 
  na.omit() %>% 
  group_by(country) %>% 
  summarise(number=n())
ea %>% arrange(desc(number)) %>% head(10)
## # A tibble: 10 x 2
##    country    number
##    <fct>       <int>
##  1 Hungary       217
##  2 China         211
##  3 Cuba          148
##  4 Poland         68
##  5 Bulgaria       39
##  6 Pakistan       29
##  7 Romania        24
##  8 Belarus        15
##  9 Kenya          11
## 10 Azerbaijan      4
cy = athlete_all %>% select(democracy_score,country,Medal) %>% 
  filter(democracy_score=="10", Medal == "Gold") %>% 
  na.omit() %>% 
  group_by(country) %>% 
  summarise(number=n())
cy %>% arrange(desc(number)) %>% head(10)
## # A tibble: 10 x 2
##    country       number
##    <fct>          <int>
##  1 United States   2190
##  2 Germany          399
##  3 Canada           329
##  4 Italy            313
##  5 Australia        297
##  6 Sweden           294
##  7 Norway           266
##  8 Netherlands      234
##  9 Japan            201
## 10 Finland          166

結論

由上述資料得知,民主制度雖不完全影響金牌獲得數量,但金牌獲得數以民主指數超過8以上之國家為大宗,故民主制度能對體育發展有一定優勢,民主仍是國家的發展王道,民主萬歲!!