如何创建基于值(而不是频率)的热图?
我正在做一个项目,该项目基于一组数据创建热图,其中包括 4 个内容:时间戳、经度、纬度、一个特定值。
我使用 heatmap.py 读取数据并创建 KML 文件和 png 文件,然后将它们放在 google 上地图。然而,这会创建一个基于“点击”的热图,但我想将地图强度基于特定值,而不是该值的出现频率。我怎样才能做到这一点?
I am doing a project which is creating a heat map based on a set of data that includes 4 things: timestamp, longitude, latitude, one specific value.
I use heatmap.py to read the data and create a KML file and png file, and then put them on google maps. However, this creates a heatmap based on the "hits", but I want to base the map intensity on the specific value, not the frequency of occurrence of that value. How can I do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看来这个问题有你的答案: 从给定的数据集 [纬度、经度、密度] 生成 KML 热图
答案是 JJ,heatmap.py 的创建者。截至 2010 年,他计划在 heatmap.py 中实现该功能,但似乎还没有抽出时间。但在 他的答案 他给出了一些关于如何自己编码的提示。 。 。
It looks like this question has your answer: Generating a KML heatmap from given data set of [lat, lon, density]
And the answer is by J.J., the creator of heatmap.py. As of 2010, he was planning to get around to implementing that functionality in heatmap.py, but it seems he hasn't gotten around to it yet. But in his answer he gives some hints on how to code it yourself . . .
这是一个黑客,但如果你的值可以缩放到较小的整数,你可以只创建你的点的副本。也就是说,如果您有点
[a,b,c]
且值为[2,1,4]
,则可以制作[a ,a,b,c,c,c,c]
。It's a hack, but if your values can be scaled to smallish integers, you could just create copies of your points. That is, if you have points
[a,b,c]
with values[2,1,4]
, you could make a heat map of[a,a,b,c,c,c,c]
.