Code Monkey home page Code Monkey logo

Comments (3)

JanVanHaaren avatar JanVanHaaren commented on August 24, 2024

I believe the Opta coordinates don't really have a unit. According to their documentation, Opta uses values on a 0 to 100 scale for the z coordinate and distinguishes between three zones to which different scaling factors apply to obtain coordinates in meters. They assume the crossbar is 12 centimeters wide.

  • Zone 1; below crossbar: 0 <= z < 38 - 2.44 / 38.
  • Zone 2; crossbar: 38 <= z < 42 - 0.12 / 4.
  • Zone 3; above crossbar: 42 <= z < 100 - 5.04 / 58.

from kloppy.

DriesDeprest avatar DriesDeprest commented on August 24, 2024

Thanks for sharing.

Should the result coordinates z value of events in our kloppy events dataset be in the same unit regardless of the data provider we used as input? Or do we by default just take over the values used by the provider and only if the user specifies what unit (or provider) he wants to use, the values are adapted?

from kloppy.

probberechts avatar probberechts commented on August 24, 2024

I implemented it like this on purpose. By default, all coordinates are in the data provider's standard coordinate system. Typically, this means that the x, y and z-coordinates are all in the same unit. Obviously, this breaks as soon as you apply a transformation since the CoordinateSystem currently does not have a z-axis. It seems logical to me to add a z-axis to the coordinate system.

The alternative, that is using a default unit for the z-coordinate, could have strange side effects. For example, having x-and y-coordinates in yards, but z-coordinates in meters would be confusing.

Also, this applies both to goalmouth coordinates in event data and ball z-coordinates in tracking data.

from kloppy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.