stage_plot: Stage Results Plot

Description Usage Arguments Examples

View source: R/stage_plot.R

Description

Plot bumps chart for stage race results.

Usage

1
2
3
4
5
6
7
stage_plot(
  data,
  type = c("rank", "time", "percent"),
  nation_col = NULL,
  name_col = NULL,
  offset.x = 0.05
)

Arguments

data

data.frame; output from parse_stage_pdf

type

character; one of "rank", "time" or "percent" to plot overall rank, time back or percent back.

nation_col

character vector of nations to highlight

name_col

character vector of athletes to highlight

offset.x

numeric; amount to adjust the athlete labels on the left and right of the plot

Examples

1
2
3
4
5
6
7
8
## Not run: 
pdf <- system.file("example_pdfs/stage_example2.pdf",package = "fispdfparsr")
stg <- parse_stage_pdf(file = pdf)
require(ggplot2)
p <- stage_plot(data = stg,type = "rank")
print(p)

## End(Not run)

joranE/fispdfparsr documentation built on Sept. 6, 2021, 9:23 p.m.