CoordinateSystem
kloppy.domain.CoordinateSystem
Bases: ABC
Base class for coordinate systems.
A coordinate system defines how coordinates are represented in a dataset.
ATTRIBUTE | DESCRIPTION |
---|---|
origin |
The location of the origin.
TYPE:
|
vertical_orientation |
The orientation of the y-axis.
TYPE:
|
pitch_dimensions |
The dimensions of the pitch.
TYPE:
|
normalized |
Whether the pitch dimensions are normalized. This means that the coordinates are mapped to a fixed range, e.g. from 0 to 1. In contrast, non-normalized coordinates correspond to the real-world dimensions of the pitch.
TYPE:
|
pitch_length |
The real length of the pitch.
TYPE:
|
pitch_width |
The real width of the pitch.
TYPE:
|
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.CustomCoordinateSystem
Bases: CoordinateSystem
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.ProviderCoordinateSystem
Bases: CoordinateSystem
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.KloppyCoordinateSystem
Bases: ProviderCoordinateSystem
Kloppy's default coordinate system.
Uses a normalized pitch with the origin at the top left and the y-axis oriented from top to bottom. The coordinates range from 0 to 1.
If no pitch length and width are provided, the default pitch dimensions are 105m x 68m.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.DatafactoryCoordinateSystem
Bases: ProviderCoordinateSystem
Datafactory coordinate system.
Uses a normalized pitch with the origin at the top left and the y-axis oriented from top to bottom. The coordinates range from -1 to 1.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.HawkEyeCoordinateSystem
Bases: ProviderCoordinateSystem
HawkEye coordinate system.
Uses a pitch with the origin at the center and the y-axis oriented from bottom to top. The coordinates are in meters.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.MetricaCoordinateSystem
Bases: KloppyCoordinateSystem
Metrica coordinate system.
Uses a normalized pitch with the origin at the top left and the y-axis oriented from top to bottom. The coordinates range from 0 to 1.
If no pitch length and width are provided, the default pitch dimensions are 105m x 68m.
Notes
The Metrica coordinate system is the same as the
KloppyCoordinateSystem
.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.OptaCoordinateSystem
Bases: ProviderCoordinateSystem
Opta coordinate system.
Uses a normalized pitch with the origin at the bottom left and the y-axis oriented from bottom to top. The coordinates range from 0 to 100.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.PFFCoordinateSystem
Bases: ProviderCoordinateSystem
PFF coordinate system.
Uses a pitch with the origin at the center and the y-axis oriented from bottom to top. The coordinates are in meters.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.SecondSpectrumCoordinateSystem
Bases: ProviderCoordinateSystem
Second Spectrum coordinate system.
Uses a pitch with the origin at the center and the y-axis oriented from bottom to top. The coordinates are in meters.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.SkillCornerCoordinateSystem
Bases: ProviderCoordinateSystem
SkillCorner coordinate system.
Uses a pitch with the origin at the center and the y-axis oriented from bottom to top. The coordinates are in meters.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.SportVUCoordinateSystem
Bases: ProviderCoordinateSystem
StatsPerform SportVU coordinate system.
Uses a pitch with the origin at the top left and the y-axis oriented from top to bottom. The coordinates are in meters.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.SportecEventDataCoordinateSystem
Bases: ProviderCoordinateSystem
Sportec event data coordinate system.
Uses a pitch with the origin at the bottom left and the y-axis oriented from top to bottom. The coordinates are in meters.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.SportecTrackingDataCoordinateSystem
Bases: ProviderCoordinateSystem
Sportec tracking data coordinate system.
Uses a pitch with the origin at the center and the y-axis oriented from bottom to top. The coordinates are in meters.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.StatsBombCoordinateSystem
Bases: ProviderCoordinateSystem
StatsBomb coordinate system.
Uses a normalized pitch with the origin at the top left and the y-axis oriented from top to bottom. The x-coordinates range from 0 to 120 and the y-coordinates range from 0 to 80.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.TracabCoordinateSystem
Bases: ProviderCoordinateSystem
Tracab coordinate system.
Uses a pitch with the origin at the center and the y-axis oriented from bottom to top. The coordinates are in centimeters.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
kloppy.domain.WyscoutCoordinateSystem
Bases: ProviderCoordinateSystem
Wyscout coordinate system.
Uses a normalized pitch with the origin at the top left and the y-axis oriented from top to bottom. The coordinates range from 0 to 100.
Source code in kloppy/domain/models/common.py
to_mplsoccer
"Convert the coordinate system to a mplsoccer BaseDims object.
Example:
from kloppy.domain import KloppyCoordinateSystem from mplsoccer import Pitch coordinate_system = KloppyCoordinateSystem() pitch = Pitch(dimensions=coordinate_system.to_mplsoccer())
Note
This method is experimental and may change in the future.
Source code in kloppy/domain/models/common.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|