| Title: | Generate Pizza Chart: Player Stats 0-100 | 
| Version: | 1.0.0 | 
| Description: | Create an interactive pizza chart visualizing a specific player's statistics across various attributes in a sports dataset. The chart is constructed based on input parameters: 'data', a dataframe containing player data for any sports; 'player_stats_col', a vector specifying the names of the columns from the dataframe that will be used to create slices in the pizza chart, with statistics ranging between 0 and 100; 'name_col', specifying the name of the column in the dataframe that contains the player names; and 'player_name', representing the specific player whose statistics will be visualized in the chart, serving as the chart title. | 
| License: | MIT + file LICENSE | 
| Encoding: | UTF-8 | 
| RoxygenNote: | 7.3.1 | 
| Imports: | dplyr, ggplot2, ggtext, magrittr, tidyr | 
| NeedsCompilation: | no | 
| Packaged: | 2024-05-25 19:23:12 UTC; lucifer | 
| Author: | Amal Panwar | 
| Maintainer: | Amal Panwar <panwar.amal1995@gmail.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2024-05-27 14:00:02 UTC | 
Create a pizza chart for sports player.
Description
Create a pizza chart for sports player.
Usage
player_pizza_chart(data, player_stats_col, name_col, player_name)
Arguments
| data | an input dataframe containing the player data. | 
| player_stats_col | a vector specifying the names of the columns from the dataframe that will be used to create slices in the pizza chart. Stats must be between 0 to 100. | 
| name_col | specifies the name of the column in the dataframe that contains the player names. | 
| player_name | specifies the name of the player (or the value of 'name_col' parameter) whose statistics will be visualized in the chart. | 
Value
an interactive pizza chart for a player.
Examples
# Create a generic dataframe for the example
player_data <- data.frame(
  Name = c('Player1', 'Player2', 'Player3'),
  Crossing = c(70, 80, 85),
  Finishing = c(75, 85, 80),
  Volleys = c(65, 70, 75),
  FK_Accuracy = c(70, 75, 80)
)
player_pizza_chart(player_data,
player_stats_col=c('Crossing', 'Finishing', 'Volleys', 'FK_Accuracy'),
                   name_col = 'Name', player_name = 'Player1')