Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
大风xp committed Jun 25, 2020
0 parents commit 6d59b14
Show file tree
Hide file tree
Showing 34 changed files with 5,683 additions and 0 deletions.
129 changes: 129 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 13kay

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include src/pyg2/g2/*
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# pyg2 <img src="./docs/_media/whale.128.png" align="right" width="128" />

## 概览

[G2Plot](https://g2plot.antv.vision/) 是开箱即用、易于配置、具有良好视觉和交互体验的通用统计图表库, pyg2由此而来。

* API 设计简洁, 默认好看
* 响应式图表 保证图表在任何显示尺寸、任何数据状态下的可读性
* 使用 pandas DataFrame 作为作图的数据源格式
* 支持20+以上的图表类型
* 支持**迷你图表**
* 支持 Jupyter Notebook(IPython Notebook)

![logo](./docs/_media/cover.png)

## 安装

see https://github.com/13kay/pyg2/releases/tag/0.1b

## 1 分钟上手

``` python
import pandas as pd
from pyg2 import bar

df = pd.DataFrame.from_records([
{ 'action': '浏览', 'pv': 50000 },
{ 'action': '加购', 'pv': 35000 },
{ 'action': '下单', 'pv': 25000 },
{ 'action': '支付', 'pv': 15000 },
{ 'action': '成交', 'pv': 8500 },
])
cfg = {
'width':600,
'conversionTag': {'visible': True}
}
bar(df,'pv','action',cfg=cfg).title(title='店铺转化率',description='浏览->加购->下单->支付->成交').render()
```

<img src="./docs/_media/quickstart.png" width="639" />
12 changes: 12 additions & 0 deletions docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- _coverpage.md -->

![logo](_media/whale.128.png ':size=128')

# pyg2 <small>1.0</small>

- 默认好看
- 开箱即用 配置优化精简
- 使用 DataFrame 直接作图

[GitHub](https://github.com/feng5/pyg2/)
[Get Started](/zh-cn/)
Binary file added docs/_media/chart-component.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/quickstart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/treemap.data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/whale.128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/whale.16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/whale.32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/whale.48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/whale.64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/whale.640.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/_navbar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- _navbar.md -->

* [首页](/)
* Language
* [简体中文](/zh-cn/)
19 changes: 19 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- docs/_sidebar.md -->

- 概览
- [简介](zh-cn/introduction)
- [快速上手](zh-cn/getting-started)
- 基本使用
- [图表类型 API](zh-cn/chart-api)
- [图表组件 API](zh-cn/component)
- [图表演示](zh-cn/example.md)
- 进阶
- 混合图表
- [双折线混合图](zh-cn/dual-line)
- [柱线混合土](zh-cn/column-line)
- [堆叠柱+折线混合图表](zh-cn/stacked-column-line)
- [分组柱+折线混合图表](zh-cn/grouped-column-line)
- [图表通用配置](zh-cn/xxx)
- [高级功能尝鲜](zh-cn/xxx)


31 changes: 31 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="_media/whale.16.png">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css">
<style>
.markdown-section {max-width:90% !important}
</style>
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
repo: 'feng5/pyg2',
loadSidebar: true,
loadNavbar: true,
coverpage: true,
onlyCover: true,
subMaxLevel: 2,
logo: '/_media/whale.32.png',
name: 'pyg2',
}
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-json.min.js"></script>
</body>
</html>
6 changes: 6 additions & 0 deletions docs/zh-cn/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# pyg2

[G2Plot](https://g2plot.antv.vision/) 是开箱即用、易于配置、具有良好视觉和交互体验的通用统计图表库, pyg2由此而来。

![logo](../_media/cover.png)

Loading

0 comments on commit 6d59b14

Please sign in to comment.