kgschart
kgschart is a python pakcage for parsing KGS rank graphs into numeric data.
Visit this page for the overview of the package.
NEWS
Requirements
- Python
2.7+or3.4+ numpypillowscipypandasscikit-learnmatplotlib
Installation
The installation is the easiest with anaconda/miniconda python distribution, since it simplifies the setup process for scientific computation libraries such as numpy, scipy, and scikit-learn.
anaconda/miniconda users
If you use python distribution based on anaconda or miniconda based environment, first, install required packages by conda command:
$ conda install numpy pillow scipy pandas scikit-learn matplotlib pipThen, install kgschart package by:
$ git clone --depth 1 https://github.com/kota7/kgschart.git
$ pip install --no-deps kgschartNote that we should use --no-deps flag since required packages are already installed by conda.
Alternatively, download the package directly from GitHub
$ pip install --no-deps git+https://github.com/kota7/kgschartOfficial Python (non-conda) users
The kgschart package works also on official (non-conda) Python (provided that dependencies are installed properly).
The following command tries to install the package along with the dependencies.
$ git clone --depth 1 https://github.com/kota7/kgschart.git
$ pip install kgschartAlternatively, download the package directly from GitHub
$ pip install git+https://github.com/kota7/kgschartQuick Installation Check
If the installation is successful, following commands should run with no error.
>>> from kgschart import KgsChart
>>> from pkg_resources import resource_stream
>>> with resource_stream('kgschart', 'example/leela-ja_JP.png') as f:
.... k = KgsChart(f)
>>> k.parse()
>>> print(k.data.head())
# time rate
#0 2016-03-21 22:19:01.165048 1.762470
#1 2016-03-22 13:51:03.495146 1.762470
#2 2016-03-23 05:23:05.825242 1.776722
#3 2016-03-23 20:55:08.155340 2.040380
#4 2016-03-24 12:27:10.485436 2.232779See this page for more about the usage of the package.