dongtanzhu5417 2017-06-02 00:08 采纳率: 100%
浏览 172
已采纳

从数据库服务器端创建绘图并在客户端可视化它

I'm currently trying to find the best way of doing this:

We have a python program (client side) we use to upload metrics on a mySQL database on a server and later, via web check it and filter it, etc.

The problem arises when we try to plot any query from to the database. It's unclear to us what aproach to use. The main page was made with Joomla in php.

Currently I was looking into python alternatives to run on the server side, somehow capture the query, process the data, create the image and then return it to the client side as an image or as a string to be reconstructed on the client side. But as I have read it seems also possible (and maybe easier) to do the same in PHP or JavaScript which (as I understand it) run on the client side, leaving less to worry about.

Is it that so? Are my assumptions right? Which aproach would you use/pŕefear? Is there some link or info you could give me to continue my search?

I would prefer to do it on Python using something like matplotlib, plotly, bokeh, etc. but as I see it, the problem is not about creating the image, but about comunicating and sending the image information between server and client.

Thanks!

  • 写回答

1条回答 默认 最新

  • dtg78700 2017-06-02 14:50
    关注

    I think it possible to do what you want to with bokeh. I dont know joomla but it think its not that important.

    • Check out that part of the bokeh documentation Embedding Bockeh
    • then for the server parts in python i would recommend flask to start with.
    • You can just prototype your app with one of the bokeh server apps examples from the bokeh repo.. there are flask examples too.
    • Then you can start to extend the bokeh server app from the examples with a query to your database with sqlalchemy or mysql-flask
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮