
GoPUP 支持Python 3.7+,旨在使获取数据尽可能方便,主要用于学术研究目的。
GoPUP 项目所采集的数据皆来自公开的数据源,不涉及任何个人隐私数据和非公开数据。 同时本项目提供的数据接口及相关数据仅用于学术研究,任何个人、机构及团体使用本项目的数据接口及相关数据请注意商业风险。
部分接口需要TOKEN,官网注册获取TOKEN
文档:中文文档
官网:www.gopup.cn
Git:ttps://github.com/justinzm/gopup
pip install gopuppip install gopup --upgradeimport matplotlib.pyplot as plt
import gopup as gp
df_index = gp.weibo_index(word="疫情", time_type="3month")
print(df_index)
plt.figure(figsize=(15, 5))
plt.title("微博「疫情」热度走势图")
plt.xlabel("时间")
plt.ylabel("指数")
plt.plot(df_index.index, df_index['疫情'], '-', label="指数")
plt.legend()
plt.grid()
plt.show()"C:\Program Files\Python36\python.exe" D:/PycharmPorject/plot.py
疫情
index
2022-09-13 3424389
2022-09-14 3035099
2022-09-15 3709136
2022-09-16 3932097
2022-09-17 1807128
... ...
2022-12-09 4147625
2022-12-10 3391550
2022-12-11 3112344
2022-12-12 4456798
2022-12-13 2832196
[92 rows x 1 columns]
进程已结束,退出代码0