Skip to Content
使用 Python 和 JavaScript 进行数据可视化,第二版
book

使用 Python 和 JavaScript 进行数据可视化,第二版

by Kyran Dale
May 2025
Intermediate to advanced
568 pages
7h 31m
Chinese
O'Reilly Media, Inc.
Book available
Content preview from 使用 Python 和 JavaScript 进行数据可视化,第二版

第 IV 部分. 提供数据

在本书的这一部分,我们将了解如何将最近经过清理和探索的诺贝尔奖精选数据集传送到浏览器,由 JavaScript 和 D3 将其转化为引人入胜的交互式可视化(见图 IV-1)。

使用像 Python 这样的通用库的好处是,你可以用简洁的几行代码轻松地创建一个网络服务器,也可以用强大的数据处理库挖掘数据。

我们工具链中的关键服务器工具是 Flask,它是 Python 功能强大但轻量级的 Web 框架。在第 12 章中,我们将了解如何静态(提供系统文件)和动态(通常是请求中指定的数据库选择)提供数据。在第 13 章中,我们将看到两个基于 Flask 的库是如何让创建 RESTful Web API 成为几行 Python 代码的工作。

dpj2 p426
图 IV-1. 交付数据
提示

您可以在本书的 GitHub 代码库中找到这部分内容的代码。

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

使用 Python 的架构模式

使用 Python 的架构模式

Harry Percival, Bob Gregory
XPath and XPointer

XPath and XPointer

John Simpson

Publisher Resources

ISBN: 9798341659070