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 Understat.

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
  • requests 2.27.1
  • lxml

Installation

Install shot_point_scraper with pip command.

pip install shotpointscraper

Usage

  1. Check the ID of the match you want to retrieve from Understat 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.5.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.5-py3.9.egg (4.2 kB view details)

Uploaded Egg

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: shotpointscraper-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 e80f342aa4be98b45436c6262d621da55c962169bf0c94facb2b5ebe1b74a2cd
MD5 ef932d74eb10edbe07b19e7ae9d7c9d4
BLAKE2b-256 3e793292408ffc588b4f0c4a64601205deb8d5acc41777e6c7c1d5248ff55412

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shotpointscraper-0.0.5-py3.9.egg
  • Upload date:
  • Size: 4.2 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.5-py3.9.egg
Algorithm Hash digest
SHA256 62206b9f919ea58f8f803a78f5a47bb409b005ebc44eedd9d1200f8d81c9a68f
MD5 88b87bd7c90059d18f5d78c53ee90f93
BLAKE2b-256 60a6f33b94af6311924d0208f8dadef92611fa9d59a25a9c01d196f2ee19e656

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shotpointscraper-0.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8291773c352fe02e2e0d4265ac861c5e0edc46937f013f280f5ae2a34851d3b8
MD5 a014ce6c37a5ec1a693ea83f52def0c7
BLAKE2b-256 fc6570c8d6eb5ed01ec9464eb46a29b4417eaa90140d95d4738bb0680eb2d8b1

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