Metadata-Version: 2.1
Name: accessible_space
Version: 0.1.5
Summary: Implementation of the Dangerous Accessible Space (DAS) passing model for football analytics.
Home-page: https://github.com/jonas-bischofberger/accessible-space
Author: Jonas Bischofberger
Author-email: Jonas Bischofberger <jonas.bischofberger@univie.ac.at>
License: MIT License
        
        Copyright (c) 2024 Jonas Bischofberger
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Repository, https://github.com/jonas-bischofberger/accessible-space
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib
Requires-Dist: pandas<2.0.0
Requires-Dist: numpy<1.25.0
Requires-Dist: scipy

# Accessible space

This package implements the Dangerous Accessible Space (DAS) model for football analytics.


### Install package

```
pip install accessible-space
```

### Usage example

```
# Declare example data
import accessible_space.tests.resources
df_passes = accessible_space.tests.resources.df_passes
df_tracking = accessible_space.tests.resources.df_tracking

# Add expected completion to passes
df_passes["xc"], df_passes["matrix_index"], simulation_result_xc = accessible_space.get_expected_pass_completion(df_passes, df_tracking)
print(df_passes)

# Add Dangerous Accessible Space to tracking frames
df_tracking["AS"], df_tracking["DAS"], df_tracking["matrix_index"], simulation_result_as, simulation_result_das = accessible_space.get_dangerous_accessible_space(df_tracking)
print(df_tracking)
```


### Run tests

```
python -m pytest --doctest-modules path/to/accessible_space/
```

