Skip to main content

A package for scrap shot data from Understats

Project description

shot_point_scraper 

"shot_point_scraper" is a library for scraping shot positions and their information for one game from Understats.

Features

shot_point_scraper supports csv files, excel files, and sql files as output file formats.

Requirement

  • python 3.9
  • beautifulsoup4 4.10.0
  • pandas 1.3.5
  • openpyxl 3.0.9

Installation

Install shot_point_scraper with pip command.

pip install shotpointscraper

Usage

  1. Check the ID of the match you want to retrieve from Understats ID You can check the ID of the match in the URL section.(https://understat.com/match/ID)

2.In the environment where shot_point_scraper is installed, execute the following command

  shotpointscraper

3.You will be asked for your ID, so fill in the ID that you just checked.

4.When scraping is finished, you will be asked what file you want to create, so enter the file you want to create (csv excel,sql).

5.If you select csv or excel, you will be asked for a file name, please enter your file name of choice. (Do not enter the file format, as it will be added automatically.) The file will then be generated.

6.If you choose "sql", you will be asked what format you would like the shoot position information to be in. xy: Describe the chute coordinates using two columns, x and y. point: Write the chute coordinates in one column using commas and parentheses for x and y.

example: xy:

x y
112.07 43.4
115.15 38.9

point:

point
(112.07,43.4)
(115,15,38.9)

7.You will be asked for the name of the file to be generated and the name of the database table to be filled in the sql file. The file will then be generated.

Note

I don't test environments under Linux and Windows.

For the shoot position information, I use the statbomb type.(0<=x<=120,0<=y<=80)

Author

License

"shot_point_scraper" is under MIT license.

I hope this library will be useful to you. Thank you!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shotpointscraper-0.0.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

shotpointscraper-0.0.2-py3.9.egg (4.1 kB view details)

Uploaded Egg

shotpointscraper-0.0.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file shotpointscraper-0.0.2.tar.gz.

File metadata

  • Download URL: shotpointscraper-0.0.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4

File hashes

Hashes for shotpointscraper-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0f2a930c9dc2c63329bdeb1d8e954c034041ca124d8dc948e9e854ba9fcbff38
MD5 f1f5302b7ad8d76d6fe201d27bfa7984
BLAKE2b-256 3e8e796a38f763cadf5f9c8b26ebaa89715ba85389bbd2520a6c14f4607540ec

See more details on using hashes here.

File details

Details for the file shotpointscraper-0.0.2-py3.9.egg.

File metadata

  • Download URL: shotpointscraper-0.0.2-py3.9.egg
  • Upload date:
  • Size: 4.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4

File hashes

Hashes for shotpointscraper-0.0.2-py3.9.egg
Algorithm Hash digest
SHA256 f644ea50fb73e4c2073463b626301f531021cfca933318de4070ec4d32901884
MD5 583584d34e9a2a28b1295784fcf96883
BLAKE2b-256 751b0a4fb5ccb95d39e6b9990615839f24e9c006e95467e82a06cdad3095b8b7

See more details on using hashes here.

File details

Details for the file shotpointscraper-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: shotpointscraper-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4

File hashes

Hashes for shotpointscraper-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 385d2368d7049f98f14af7da5b893ba62451dc711be5a3aa541b5b815088d751
MD5 4e01a7dfcd393a8c86cf3a5cdf9dc3aa
BLAKE2b-256 240c607cc994d02c7296587c97f6a046e41aa1a953f9de962106ad672033e6de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page