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
  • 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 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.3.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.3-py3.9.egg (4.1 kB view details)

Uploaded Egg

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: shotpointscraper-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 9e36a43a41ca35fdda98b63bc28c785e133e943897cf6661977f40057dc04b6a
MD5 4ec52b3c73748e90a3506008dbcdb37f
BLAKE2b-256 1731b0c9a228a7ced3857a76c37f24210bca6fa96f4d85e05feae38167d511b1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shotpointscraper-0.0.3-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.3-py3.9.egg
Algorithm Hash digest
SHA256 273ad1357e8a7547c96dfb9102f29ac6427bc54c63f813e412086d0c721564ff
MD5 4749e37be6340c483196139a04dc72fd
BLAKE2b-256 c4546b78a0e070302a3a2525f50223031c422f6f3d155cba2f9db64b80fd3ee5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shotpointscraper-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 40ab319234fbd4a47ccfc0dfacf53a666ee5137ead814e7301e87e879f008e9b
MD5 d05e7454c9203695741c9b097299de6a
BLAKE2b-256 007edecd389dfc872eea883d5baeae1791513e3193f9ccd2e1161417b00a323b

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