View source: R/fPercentileBarChart.R
fPercentileBarChart | R Documentation |
Each bar denotes the percentile the player is for that respective stat. This is a much better alternative to radar plots.
fPercentileBarChart(
dtDataset,
vcColumnsToIndex,
dtMetricCategorisation,
iPlayerId,
cTitle = NULL,
nColumnWidthByTwo = 0.25,
nBufferForTextHorizontal = 0.005,
nBufferForTextVertical = 0.05,
vnQuantileMarkers = NULL,
cForegroundColour = "red",
cBackgroundColour = "black",
cFontColour = "white",
bAddAbsoluteIndicator = F
)
vcColumnsToIndex |
The non-metric columns in your dataset, these are typically columns like name, age, team, position, etc. |
dtMetricCategorisation |
A table with metadata about the variables in dtPlayerMetrics. Refer to the dtMetricCategorisation object declared in the library for an example. |
iPlayerId |
The ID of the player you want visualised |
cTitle |
The title on the chart |
bAddAbsoluteIndicator |
Percentiles can be a little misleading if the underlying numbers aren't uniformly distributed. You can use the vertical dimension to add annotations for an indicator of the absolute spread of the values and where this particular player's values fall within that spread. |
dtPlayerMetrics |
A dataset with one row for each PlayerName, and various metrics about the PlayerName declared in separate columns. Refer to the dtPlayerMetrics dataset packaged with the library for an example |
fPercentileBarChart(
dtDataset = dtPlayerMetrics,
vcColumnsToIndex = c('playerId','PlayerName','TeamName'),
dtMetricCategorisation,
iPlayerId = 2,
cTitle = 'Sample'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.