我的Google热图不会出现在jupyter笔记本中 [英] My google heat map wont appear in jupyter notebook

查看:72
本文介绍了我的Google热图不会出现在jupyter笔记本中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Jupyter Notebook的新手,并且想根据位置创建一个热图.我已经创建了一个Google API密钥,我的代码如下所示:唯一的错误是,它指出糟糕的情况!"

I am new to jupyter notebook and want to create a heatmap based on locations. I have created a google API key and my code looks like the following: The only thing wrong is that it states "Ooops something went wrong!"

import gmaps
import math
gmaps.configure(api_key="My API Key")
location_columns = df[['latitude', 'longitude']]
location_tuples = [tuple(x) for x in location_columns.values]
fig = gmaps.figure()
fig.add_layer(gmaps.heatmap_layer(location_tuples))
fig

如果有人能帮助我,我将不胜感激

I would really appreciate if anyone could help me out

推荐答案

之前有同样的问题,只是重新启动了计算机,地图才出现了:)

Got the same problem earlier, just restarted my computer and the map appeared :)

这篇关于我的Google热图不会出现在jupyter笔记本中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆