Skip to main content

cricsummary

cricsummary is built for performing cricket analysis on data provided by cricsheet.org. by converting the data in DataFrames or csv files that are better suited for analysis.

  • Convert json file to csv.
  • Creates DataFrames team-wise.
  • Vizualise or Perform your own transformations/analysis on the DataFrames.
  • Save the converted file (json to csv)
  • Plot Manhattan and Worm charts

This is a useful tool to get started with cricket analysis.

Installation

cricsummary requires python 3.5+ to run.

$ pip install cricsummary

How to Use

Download the data from cricsheet Use the txt file in downloaded folder to check name of the match you want to analyse

>>> from cricsummary import Duranz


>>> match = Duranz('12345.json')


### BUILT IN METHODS FOR ANAYSIS

# team parameter represent innings, team=1 for data of team batted in 1st inning 
>>> match.scorecard(team=1) 

>>> match.plot_worm() 

>>> match.plot_manhattan(team=2)

>>> match.match_info()

>>> match.extras(team=1)

>>> match.fall_of_wickets(team=2)

Do your Analysis

  • Access separate DataFrames of teams and do your Operations/Analysis
# returns dict of dataframe where keys are team name with _<innings> suffix 
match = Duranz('123.json')
>>> df_dict = match.teams_df

### CONVERT JSON TO CSV 
>>> from cricsummary import json_to_csv

# this will save the files of the innings <teamname>_<innings>.csv
>>> json_to_csv('123.json', output_file=True)

Development

Want to contribute? Great! pull request on https://github.com/KunalDuran/cricsummary

License

MIT

Metadata

Release files for cricsummary 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cricsummary 2.0.2
File Size Uploaded
cricsummary-2.0.2.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cricsummary 2.0.2
File Interpreter ABI Platform
cricsummary-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / cricsummary-2.0.2.tar.gz

Download URL cricsummary-2.0.2.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
52a1e3bc54cb58b641ba46c6530461f3c6245008ccdd6978694a6c2a0fe8a306
BLAKE2b-256 checksum
How to use checksums
7549ede0d57709d303e4529ec0e3cd19d9666e297430c6560a79b311ab6033df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

Release files / cricsummary-2.0.2-py3-none-any.whl

Download URL cricsummary-2.0.2-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11a5d08768b30c365fbcf8ea4781a383486015bd06dd8e60d53c438cac62dc88
BLAKE2b-256 checksum
How to use checksums
e5a79895a9aaefd6bde32496419e768813c2dde03d8d8f6dc7a5dc51516b496e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.0

1 release file

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page