name club position market_value
1 Erling Haaland Man City Centre-Forward 2.0e+08
2 Bukayo Saka Arsenal Right Winger 1.5e+08
3 Cole Palmer Chelsea Attacking Midfield 1.3e+08
4 Rodri Man City Defensive Midfield 1.3e+08
5 Phil Foden Man City Right Winger 1.3e+08
image
1 https://img.a.transfermarkt.technology/portrait/header/418560-1709108116.png?lm=1
2 https://img.a.transfermarkt.technology/portrait/header/433177-1684155052.jpg?lm=1
3 https://img.a.transfermarkt.technology/portrait/header/568177-1712320986.jpg?lm=1
4 https://img.a.transfermarkt.technology/portrait/header/357565-1682587890.jpg?lm=1
5 https://img.a.transfermarkt.technology/portrait/header/406635-1668524492.jpg?lm=1
name club position market_value
1 Wayne Hennessey Nottm Forest Goalkeeper 175000
2 John Ruddy Newcastle Goalkeeper 200000
3 Tom King Wolves Goalkeeper 200000
4 Kaden Rodney Crystal Palace Defensive Midfield 200000
5 Scott Carson Man City Goalkeeper 200000
image
1 https://img.a.transfermarkt.technology/portrait/header/45494-1668070425.jpg?lm=1
2 https://img.a.transfermarkt.technology/portrait/header/29712-1736421115.jpg?lm=1
3 https://img.a.transfermarkt.technology/portrait/header/215810-1621592912.jpg?lm=1
4 https://img.a.transfermarkt.technology/portrait/header/860078-1737712510.jpg?lm=1
5 https://img.a.transfermarkt.technology/portrait/header/14555-1666733622.jpg?lm=1
club total_market_value
1 Man City 1305200000
2 Arsenal 1127000000
3 Liverpool 993500000
4 Chelsea 922000000
5 Tottenham 836100000
6 Man Utd 694250000
7 Newcastle 635000000
8 Aston Villa 627500000
9 Brighton 555600000
10 West Ham 453300000
club_to total_fee
1 Chelsea 1577900000
2 Man City 1318950000
3 Man Utd 999620000
4 Arsenal 825550000
5 Tottenham 823450000
6 Liverpool 736675000
7 Newcastle 666350000
8 Wolves 556536000
9 Aston Villa 527449999
10 Brighton 493080000
name total_minutes
1 Marcus Rashford 1426
2 James Ward-Prowse 1201
3 Julio Enciso 1004
4 Harry Wilson 999
5 Christian Eriksen 992
image
1 https://img.a.transfermarkt.technology/portrait/header/258923-1674473054.jpg?lm=1
2 https://img.a.transfermarkt.technology/portrait/header/181579-1684751045.jpg?lm=1
3 https://img.a.transfermarkt.technology/portrait/header/660867-1669388786.jpg?lm=1
4 https://img.a.transfermarkt.technology/portrait/header/279455-1668070758.jpg?lm=1
5 https://img.a.transfermarkt.technology/portrait/header/69633-1718628122.jpg?lm=1
#sebaran asal negara pemain world <-ne_countries(scale ="medium", returnclass ="sf")world_map <-left_join(world, result_country, by =c("name"="country"))ggplot(data = world_map) +geom_sf(aes(fill = total_players), color ="white", size =0.1) +scale_fill_viridis_c(option ="plasma", na.value ="gray90") +coord_sf(ylim =c(-65, 90), expand =FALSE) +labs(title ="Sebaran Asal Negara Pemain EPL",fill ="Jumlah Pemain" ) +theme_void() +theme(legend.position ="none",legend.key.height =unit(0.5, "cm"),plot.title =element_text(hjust =0.5, face ="bold", size =16, margin =margin(b =5)),plot.margin =margin(0, 0, 0, 0, unit ="cm") )
# Top 10 asal negara pemaintop10_country <- result_country %>%slice_max(total_players, n =10)ggplot(top10_country, aes(x =reorder(country, total_players), y = total_players, fill = country)) +geom_col() +geom_text(aes(label = total_players), hjust =-0.1, fontface ="bold", size =3.8) +coord_flip(clip ="off") +labs(title ="Top 10 Negara Asal Pemain EPL",x ="Negara",y ="Jumlah Pemain" ) +theme_minimal() +theme(legend.position ="none",plot.title =element_text(hjust =0.5, face ="bold", size =16),plot.margin =margin(5, 20, 5, 5) )
ggplot(result_age_pos, aes(x =factor(age), y = position, fill = total_players)) +geom_tile(color ="white") +scale_fill_viridis_c(option ="plasma") +labs(title ="Distribusi Pemain Berdasarkan Usia dan Posisi",x ="Usia",y ="Posisi",fill ="Jumlah" ) +theme_minimal() +theme(plot.title =element_text(hjust =0.5, face ="bold"),axis.text.x =element_text(angle =45, hjust =1) )
# Rata-rata usia pemain setiap posisiresult_age_pos %>%group_by(position) %>%summarise(avg_age =weighted.mean(age, total_players)) %>%ggplot(aes(x =reorder(position, avg_age), y = avg_age, fill = position)) +geom_col() +geom_text(aes(label =round(avg_age, 1)), hjust =1.5, fontface ="bold") +coord_flip() +labs(title ="Rata-Rata Usia Pemain per Posisi",x ="Posisi",y ="Rata-Rata Usia" ) +theme_minimal() +theme(legend.position ="none")
#Top 5 market value tertinggiresult_max_value$label <-paste0(" ", result_max_value$name, "\n(", result_max_value$club, ", ", result_max_value$position, ")")ggplot(result_max_value, aes(x =reorder(label, market_value), y = market_value, fill = name)) +geom_col() +geom_image(aes(image = image), size =0.13, by ="width", nudge_y =10000000) +geom_text(aes(label =comma(market_value, big.mark =".", decimal.mark =",")),hjust =1.2,fontface ="bold",size =3.8 ) +coord_flip(clip ="off") +scale_fill_brewer(palette ="Set3") +scale_y_continuous(labels =comma_format(big.mark =".", decimal.mark =",")) +labs(title ="Top 5 Pemain dengan Market Value Tertinggi",x =NULL,y ="Market Value (€)" ) +theme_minimal() +theme(legend.position ="none",axis.text.y =element_text(lineheight =1.2, size =10),plot.title =element_text(hjust =0.5, face ="bold", size =16),plot.margin =margin(5, 20, 5, 5) )
#Top 5 Market value terendahresult_min_value$label <-paste0(" ", result_min_value$name, "\n(", result_min_value$club, ", ", result_min_value$position, ")")ggplot(result_min_value, aes(x =reorder(label, market_value), y = market_value, fill = name)) +geom_col() +geom_image(aes(image = image), size =0.09, by ="width", nudge_y =5e5) +geom_text(aes(label =comma(market_value, big.mark =".", decimal.mark =",")),hjust =1,fontface ="bold",size =3.8 ) +coord_flip(clip ="off") +scale_fill_brewer(palette ="Set3") +# atau Set2, Paired, Pastel1labs(title ="Top 5 Pemain dengan Market Value Terendah",x =NULL,y ="Market Value (€)" ) +scale_y_continuous(labels =comma_format(big.mark =".", decimal.mark =",")) +theme_minimal() +theme(legend.position ="none",axis.text.y =element_text(lineheight =1.2, size =10),plot.title =element_text(hjust =0.5, face ="bold", size =16),plot.margin =margin(5, 20, 5, 5) )
#Top 10 total market value tertinggiggplot(result_market, aes(x =reorder(club, total_market_value), y = total_market_value)) +geom_col(fill ="steelblue") +geom_text(aes(label =comma(total_market_value, big.mark =".", decimal.mark =",")),hjust =1.2,fontface ="bold",size =3.8 ) +coord_flip(clip ="off") +labs(title ="Top 10 Klub dengan Market Value Tertinggi",x ="",y ="Total Market Value (€)" ) +scale_y_continuous(labels =comma_format(big.mark =".", decimal.mark =",")) +theme_minimal() +theme(plot.title =element_text(hjust =0.5, size =16, face ="bold"),plot.margin =margin(5, 20, 5, 5) )
#history 5 pemain market value tertinggi dalam 5 tahun terakhirggplot(result_history, aes(x = date, y = market_value, color = name)) +geom_line(size =1) +geom_point(size =0.2) +scale_y_continuous(labels =comma_format(big.mark =".", decimal.mark =",")) +labs(title ="Market Value History Top 5 Pemain Termahal",x ="Tahun",y ="Market Value (€)",color ="Pemain" ) +theme_minimal() +theme(plot.title =element_text(hjust =0.5, face ="bold", size =16),legend.position ="top" )
Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` instead.
#Rata- rata market value setiap posisiggplot(result_pos, aes(x =reorder(position, avg_value), y = avg_value)) +geom_col(fill ="purple") +geom_text(aes(label =comma(avg_value, big.mark =".", decimal.mark =",")),hjust =1, fontface ="bold", size =3.8) +coord_flip(clip ="off") +labs(title ="Rata-Rata Market Value per Posisi",x ="Posisi", y ="Rata-Rata (€)") +scale_y_continuous(labels =comma_format(big.mark =".", decimal.mark =",")) +theme_minimal()
#Top 5 pemain dengan achievement terbanyakresult_achieve$label <-paste0(" ", result_achieve$name)ggplot(result_achieve, aes(x =reorder(label, jumlah), y = jumlah, fill = name)) +geom_col() +geom_image(aes(image = image), size =0.13, by ="width", nudge_y =0.5) +geom_text(aes(label = jumlah), hjust =1.6, fontface ="bold", size =4) +coord_flip(clip ="off") +scale_fill_brewer(palette ="Set3") +scale_y_continuous(labels =comma_format(big.mark =".", decimal.mark =",")) +labs(title ="Top 5 Pemain dengan Jumlah Achievement Terbanyak",x =NULL,y ="Jumlah Achievement" ) +theme_minimal() +theme(legend.position ="none",axis.text.y =element_text(size =10, lineheight =1.2),plot.title =element_text(hjust =0.5, face ="bold", size =14),plot.margin =margin(5, 20, 5, 5) )
#Total transfer fee masuk setiap klubggplot(result_transfers, aes(x =reorder(club_to, total_fee), y = total_fee)) +geom_col(fill ="tomato") +geom_text(aes(label =comma(total_fee, big.mark =".", decimal.mark =",")),hjust =1.2, fontface ="bold", size =3.8) +coord_flip(clip ="off") +labs(title ="Top 10 Klub dengan Total Fee Transfer Tertinggi",x ="Klub", y ="Total Biaya Transfer (€)") +scale_y_continuous(labels =comma_format(big.mark =".", decimal.mark =",")) +theme_minimal()