V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
julf
V2EX  ›  Python

请教关于 python 获取的 API 数据如何数据可视化?

  •  
  •   julf · 2016-12-20 00:22:01 +08:00 · 3259 次点击
    这是一个创建于 2682 天前的主题,其中的信息可能已经有所发展或是发生改变。
    新人刚在自学 python ,语法刚刷几遍,目前在尝试一些小项目。现在遇到一个问题,想实现从网站提供的 api 接口获取的数据,对其中部分数据实现数据可视化,从而能否监控其数据变动。想请老手指点一下学习及实现的路径,感激不尽。如下是获取的数据类型,主要是想统计每天的数据变化,并生成柱状图或者曲线图。

    [
    {
    "id": "bitcoin",
    "name": "Bitcoin",
    "symbol": "BTC",
    "rank": "1",
    "price_usd": "573.137",
    "price_btc": "1.0",
    "24h_volume_usd": "72855700.0",
    "market_cap_usd": "9080883500.0",
    "available_supply": "15844176.0",
    "total_supply": "15844176.0",
    "percent_change_1h": "0.04",
    "percent_change_24h": "-0.3",
    "percent_change_7d": "-0.57",
    "last_updated": "1472762067"
    },
    {
    "id": "ethereum",
    "name": "Ethereum",
    "symbol": "ETH",
    "rank": "2",
    "price_usd": "12.1844",
    "price_btc": "0.021262",
    "24h_volume_usd": "24085900.0",
    "market_cap_usd": "1018098455.0",
    "available_supply": "83557537.0",
    "total_supply": "83557537.0",
    "percent_change_1h": "-0.58",
    "percent_change_24h": "6.34",
    "percent_change_7d": "8.59",
    "last_updated": "1472762062"
    },
    ...
    ]
    9 条回复    2016-12-21 15:30:03 +08:00
    UnisandK
        1
    UnisandK  
       2016-12-20 00:45:32 +08:00
    有专门做数据可视化服务的
    http://blog.oneapm.com/apm-tech/321.html
    比如这个
    simon7
        2
    simon7  
       2016-12-20 08:33:18 +08:00 via iPad
    bokeh
    stamaimer
        3
    stamaimer  
       2016-12-20 09:00:04 +08:00 via iPhone
    d3.js
    namco1992
        4
    namco1992  
       2016-12-20 12:05:37 +08:00
    plotly https://plot.ly/

    不过还是 c3.js 方便一点吧。
    316461465
        5
    316461465  
       2016-12-20 15:33:51 +08:00
    原生 python 的话推荐你用 Matplotlib ,如果是 web 的话,百度的 echarts 够你玩的了
    julf
        6
    julf  
    OP
       2016-12-20 16:23:52 +08:00
    @316461465 , Matplotlib 是可以实现可视化,我从 API 获取的数据是否需要导入数据库保存及提取
    mingyun
        7
    mingyun  
       2016-12-20 23:16:41 +08:00
    python highcharts
    dikT
        8
    dikT  
       2016-12-21 15:29:25 +08:00
    from pprint import pprint
    pprint(data)
    dikT
        9
    dikT  
       2016-12-21 15:30:03 +08:00
    晕,请无视.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5687 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 06:31 · PVG 14:31 · LAX 23:31 · JFK 02:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.