Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use python Visualization large screen Library big_screen

2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

这篇文章主要介绍了python可视化大屏库big_screen怎么用,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。

对于从事数据领域的小伙伴来说,当需要阐述自己观点、展示项目成果时,我们需要在最短时间内让别人知道你的想法。我相信单调乏味的语言很难让别人快速理解。最直接有效的方式就是将数据如上图所示这样,进行可视化展现。

具体如下:

big_screen 特点

便利性工具, 结构简单, 你只需传数据就可以实现数据大屏展示。

安装环境pip install -i https://pypi.tuna.tsinghua.edu.cn/simple flask输入数据

在文件夹 data.py 中更新你需要展示的数据即可,如下为部分数据展示:

self.echart1_data = { 'title': '行业分布', 'data': [ {"name": "商超门店", "value": 47}, {"name": "教育培训", "value": 52}, {"name": "房地产", "value": 90}, {"name": "生活服务", "value": 84}, {"name": "汽车销售", "value": 99}, {"name": "旅游酒店", "value": 37}, {"name": "五金建材", "value": 2}, ] } self.echart2_data = { 'title': '省份分布', 'data': [ {"name": "浙江", "value": 47}, {"name": "上海", "value": 52}, {"name": "江苏", "value": 90}, {"name": "广东", "value": 84}, {"name": "北京", "value": 99}, {"name": "深圳", "value": 37}, {"name": "安徽", "value": 150}, ] } self.echarts3_1_data = { 'title': '年龄分布', 'data': [ {"name": "0岁以下", "value": 47}, {"name": "20-29岁", "value": 52}, {"name": "30-39岁", "value": 90}, {"name": "40-49岁", "value": 84}, {"name": "50岁以上", "value": 99}, ] } self.echarts3_2_data = { 'title': '职业分布', 'data': [ {"name": "电子商务", "value": 10}, {"name": "教育", "value": 20}, {"name": "IT/互联网", "value": 20}, {"name": "金融", "value": 30}, {"name": "学生", "value": 40}, {"name": "其他", "value": 50}, ] }本地运行cd big_screen-master;python app.py;在线部署

你可以直接像在本地一样运行脚本,这样可以运行成功,如果我们想让它一直运行,我们可以在线部署。使用命令如下:

nohup python app.py

这时你可以查看进程

ps -ef | grep python

就会看到我们刚才 app.py 代码已经运行起来了,这个就是在后台运行,关闭连接之后一样会运行,这下就放心了。

但是,如果发生错误的话,我们是无法知道哪里出错的,这时我们指定日志输出文件

nohup python -u app.py > robot.log 2>&1 &

还有一个问题,我想停止在线运行怎么办?可以使用这个命令

kill PID感谢你能够认真阅读完这篇文章,希望小编分享的"python可视化大屏库big_screen怎么用"这篇文章对大家有帮助,同时也希望大家多多支持,关注行业资讯频道,更多相关知识等着你来学习!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report