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.4.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.4-py3.9.egg (4.2 kB view details)

Uploaded Egg

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: shotpointscraper-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 aed2ebb930a0ffc37709059085bae085381bdb8fe3985376751a458862c216be
MD5 3437671ed94c09e2cfb2e324b33724f2
BLAKE2b-256 45802734493135516a5bd01e5ea10be5df68c7da76ad0be65c49edf9518832c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shotpointscraper-0.0.4-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.4-py3.9.egg
Algorithm Hash digest
SHA256 cba81fafa2633124aeedc6418e70188be15d657b7285a6addf6999e49ab13dc7
MD5 e0f9451a25de3d2bd226448a03042268
BLAKE2b-256 3ee2f0182a6ad3a05ab192ba43338b92782cf57a1664f33a3f2e2b3afd58297b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shotpointscraper-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 27d2786ec2c313f08faa9182b16756a1a9f3b55d40051419f68dcbd6d1fed909
MD5 03006669b00cd9657101470982ab3ccb
BLAKE2b-256 4204592c44c8ca1de12b59a7b1a5a61ab99bc3924f16e77422d4850ea1e27236

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