好的机器学习挖掘离不开可视化工具的帮助,这方面有两个比较好用的工具,一个是superset,一个是tableau。
superset现在是Apache顶级开源项目;tableau则是一个收费软件。
super版本 0.30.1
一、虚拟环境及工具准备
pip install virtualenv
python3 -m venv venv-superset
pip install --upgrade setuptools pip
二、superset安装
1、superset Python包安装
pip install superset
2、superset依赖Python包安装
依次使用pip安装如下Python包:wtforms_json、flask_compress、celery、flask_migrate、flask_talisman、flask_caching、sqlparse、bleach、markdown、numpy、pandas、parsedatetime、pathlib2、simplejson,humanize,python-geohash,polyline,geopy,cryptography,backoff,msgpack,pyarrow,contextlib2,croniter,retry,selenium,isodate
3、创建用户
superset fab create-admin
4、更新superset db
superset db upgrade
5、加载样例
superset load_examples
6、superset初始化
superset init
7、启动服务
superset run -p 8088
停止服务按ctrl+c
8、登录superset
http://127.0.0.1:8088
输入步骤3中创建的用户名及密码,即可看到步骤5中加载的样例。


9、连接MySQL
需要在Mac上先安装MySQL
brew install mysql
export PATH=$PATH:/usr/local/mysql/bin
pip3 install mysqlclient
之后即可在Sources菜单中添加Databases源。
数据源连接URL参见 https://superset.apache.org/docs/databases/mysql

三、参考资料
https://mayalin.home.blog/2019/07/16/%E5%AE%89%E8%A3%85superset%E5%88%B0mac%E7%94%B5%E8%84%91/
https://zhuanlan.zhihu.com/p/111295100
https://blog.youkuaiyun.com/wust_zzwh/article/details/102709851
https://superset.apache.org/docs/installation/installing-superset-from-scratch

本文提供了一个详细的步骤来安装和配置Apache Superset, 这是一款强大的开源数据可视化平台。包括设置虚拟环境、安装依赖包、创建管理员账户、更新数据库、加载示例数据、连接MySQL等关键操作。
937





