common dynamic data visualization framework for python
Project description
pgdancer:一个python的通用动态数据可视化框架
介绍
这是一个python的动态数据可视化项目,基于pygame游戏引擎。能够将pandas的Dataframe数据结构使用动态的方法展示。
Requirements
- Anaconda-python 3.61+ and pygame 1.95+
- Works on Linux, windows, Mac OSX
效果展示
快速开始
pip install pgdancer
打开命令行终端
pgdancer startproject my_project
cd my_project
在项目目录中,会生成 settings.py 文件作为设置文件,当你需要它的时候
下载示例csv文件,点我下载
把文件放在命令行终端的文件夹路径中
vim demo.py
写入以下内容并保存
import pandas as pd
from pgdancer import histogram
if __name__ == '__main__':
# example code
df = pd.read_csv("brands_data.csv", index_col="brands", thousands=",").fillna(0)
df = df.astype("int")
h = histogram.Histogram(df, 1600, 900, window_type=0)
h.run("pgdancer", "Top 15 Best Global Brands Ranking", "---Datasource:https://www.interbrand.com", \
"Top 15 Best Global Brands Ranking", "Brand Value:$m")
运行python脚本
python demo.py
使用文档
文档正在编写中
特别说明
字体问题: pygame默认字体是英文的,显示中文或特殊文字会出现框框, 以下方法可以获取系统字体列表,增加histogram.py源码中getFontStyle函数中的font_list列表可以解决 PS:后续版本会解决字体问题
import pygame
pygame.font.get_fonts()
颜色问题: pgdancer内置了31种颜色,Dataframe.index 超过31个则会报错 PS:后续版本会解决颜色问题
未来的版本
- 加入有图片的动态样式
- 加入背景音乐功能
- 组件化
- 更漂亮
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pgdancer-0.1.tar.gz.
File metadata
- Download URL: pgdancer-0.1.tar.gz
- Upload date:
- Size: 61.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7590c49d4faf87465da6687df90f72c9defb2412db1d50a673afa2b05e9b34da
|
|
| MD5 |
74e35b3eac679ca8c1222022b96806c8
|
|
| BLAKE2b-256 |
8a11f1b1e09fefefd64b84d3ca2906881c62ced8ca77416a99fb9985a16e4ec2
|
File details
Details for the file pgdancer-0.1-py3-none-any.whl.
File metadata
- Download URL: pgdancer-0.1-py3-none-any.whl
- Upload date:
- Size: 63.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76bb28fe3a0746d71ead39d1ce9d856ec7e87e958826efee5e7bdfd3956265eb
|
|
| MD5 |
ffef078476e3738b8c26e93a25efba9a
|
|
| BLAKE2b-256 |
5be300dbd4bfa7a46aad5a29dbcc99ebad7d566daea4dd149ddfbc3f7fe7c996
|