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.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: shotpointscraper-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 1799f27e7729f52e7a63319216dcd42156077436bb63cbbdfae5fc1972b87b5a
MD5 43f2fcb2acedef9cc2ba7e52d67867ac
BLAKE2b-256 59c5b9b3cdfd1811119b08180aaa06d8e9296e1edda7f2976b1d8a1cdbb448a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shotpointscraper-0.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0afbba92a01ca0d5fb0328a10a40283954c7b30b6778ca52e529a39b37717b30
MD5 3024e7ccb66b5a0f83c7a3bf2ff91370
BLAKE2b-256 b20423a8b5649bd290845401e8748b0250ab7af22b60f2114386b7770fc2f8b5

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