fStripChart | R Documentation |
Those charts with normailsed metric values and a bright mark indicating where the PlayerName of interest lies
fStripChart(
dtPlayerMetrics,
vcColumnsToIndex,
dtMetricCategorisation,
iPlayerId,
cTitle,
cFontFamily = "arial",
cPlayerColour = "red",
cBackgroundColour = "black",
cComparisonColour = "white",
cNeutralColour = "grey50",
vnExpand = c(-0.25, -0.03, 1.03, 1.1, 1.15),
bShrinkOtherPlayerPoints = T,
compareWith = "median",
bDisplayCategories = T,
bDisplayValue = T
)
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 |
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 'CodaBonito::dtMetricCategorisation' object declared in the library for an example. |
iPlayerId |
The ID of the player you want visualised |
cTitle |
The title on the chart |
vnExpand |
The X axis stretches between 0 and 1 but you need space on both sides to fit the annotations. Specify what values the category label, the stat value, and the comparison stat value should come at |
compareWith, |
either 'median', another playerId, or NULL. If not null, will add a second set of points for either the median or another player to have some reference for the player you're looking at. |
fStripChart (
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.