plot_heatmap | R Documentation |
This function allows you to plot various types of heatmaps of starting x and y coordinates: hex binwidth heatmap, density heatmap, and binwidth heatmap
plot_heatmap(
data,
type = "",
data_type = "statsbomb",
binwidth = 20,
theme = ""
)
data |
The dataframe that stores your data. Dataframe must contain atleast the following columns: |
type |
indicates the type of heatmap to plot. "hex" indicates hex bins, "density" indicates density (default), "binwidth" indicates binwidth heatmap pass, and "jdp" indicates a binned heatmap according jdp pitch markings. |
data_type |
Type of data that is being put in: opta or statsbomb. Default set to "statsbomb" |
binwidth |
indicates the size of the bin width to construct heatmap for type "binwidth". The same argument name as the underlying call to |
theme |
indicates what theme the map must be shown in: dark (default), white, rose, almond |
returns a ggplot2 object
## Not run:
plot <- plot_heatmap(data = touchData, type = "hex")
plot
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.