getpositioncategory: This function returns the players' id and 1 of 6 position categories based on when they play in each most often.
Description
For use with the all StatsBomb data. After StatsBomb data is read in from the JSON file, this function will return a dataframe of all of the player ids and their position category.
Usage
get.positioncategory(events)
Arguments
events
Dataframe of event object gathered from the StatsBomb API, need the position.name and the player ids for all events.
Value
df
Returns a data frame with all of the player ids and position categories.