Before 3.16.0, in the Opta Parser specifically, PLAYER_ON and PLAYER_OFF are used to describe a substitution with these two individual events.
In (currently officially not yet released) version 3.16.0 we add a breaking change to this by adding the SUBSTITUTION event. Where the SUBSTITUTION event is now the combination of PLAYER_ON and PLAYER_OFF events in case of a substitution. However, the PLAYER_ON and PLAYER_OFF events can also relate to players temporarily retiring from the pitch as shared by @DriesDeprest in #361.
Some ideas for behavior as discussed by @DriesDeprest @probberechts and me for the Kloppy EventData model should be:
- Make
PLAYER_ON and PLAYER_OFF more specific to mean PLAYER_RETIRES and PLAYER_RETURNS for any event that is unrelated to a substitution.
- In case of a substitution use the
SUBSTITUTION event and assign the replacement_player the Id of the player coming on. (This is implemented in a commit in #333
- Deprecate the use of
PLAYER_ON and PLAYER_OFF explicitly as they are confusing and ambiguous. Similarly to how we did away with HOME_AWAY orientation in favor of STATIC_HOME_AWAY and they were explicitly renamed.
Idea for the implementation in the dataframe representation:
- Set the
replacement_player in the receiving_player field for the SUBSTITUTION event.
- Remove the
GENERIC:player off and GENERIC:player on in favor of GENERIC:player retires and GENERIC: player returns events respectively.
Let me know if I forgot anything or if anyone has any suggestions on this!
Before 3.16.0, in the Opta Parser specifically,
PLAYER_ONandPLAYER_OFFare used to describe a substitution with these two individual events.In (currently officially not yet released) version 3.16.0 we add a breaking change to this by adding the
SUBSTITUTIONevent. Where theSUBSTITUTIONevent is now the combination ofPLAYER_ONandPLAYER_OFFevents in case of a substitution. However, thePLAYER_ONandPLAYER_OFFevents can also relate to players temporarily retiring from the pitch as shared by @DriesDeprest in #361.Some ideas for behavior as discussed by @DriesDeprest @probberechts and me for the Kloppy EventData model should be:
PLAYER_ONandPLAYER_OFFmore specific to meanPLAYER_RETIRESandPLAYER_RETURNSfor any event that is unrelated to a substitution.SUBSTITUTIONevent and assign thereplacement_playerthe Id of the player coming on. (This is implemented in a commit in #333PLAYER_ONandPLAYER_OFFexplicitly as they are confusing and ambiguous. Similarly to how we did away withHOME_AWAYorientation in favor ofSTATIC_HOME_AWAYand they were explicitly renamed.Idea for the implementation in the dataframe representation:
replacement_playerin thereceiving_playerfield for theSUBSTITUTIONevent.GENERIC:player offandGENERIC:player onin favor ofGENERIC:player retiresandGENERIC: player returnsevents respectively.Let me know if I forgot anything or if anyone has any suggestions on this!