spr_heat_plot: Plot Sprint Heats

Description Usage Arguments Examples

View source: R/sprint_plot.R

Description

Various graphs for sprint race heats.

Usage

1
2
3
4
5
6
7
spr_heat_plot(
  data,
  type = c("rank", "path", "time", "centered", "grand_centered"),
  nation_col = NULL,
  name_col = NULL,
  offset.x = 0.03
)

Arguments

data

data.frame, as returned by parse_spr_pdf

type

character; one of "rank", "time" or "centered"; controls whether the y axis is heat rank, heat time or the times centered by round.

nation_col

character vector; if specified, highlight athletes from these nations. Use the three letter codes, all caps. e.g. nation_col = c("NOR","RUS")

name_col

character vector; if specified, highlight these. Must spell out each athlete's full name as it appears in data, exactly. e.g. name_col = c("HOFFMAN Noah","HARVEY Alex")

offset.x

numeric; amount to slide the names to the left/right

Examples

1
2
3
4
5
6
7
8
## Not run: 
require(ggplot2)
spr <- parse_spr_df(file = system.file("example_pdfs/spr_example1.pdf",
                                        package = "fispdfparsr"))
p <- spr_heat_plot(data = spr,type = "centered",nation_col = c("USA","CAN"))
print(p)

## End(Not run)

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