如何使用D3.js在地图上绘制点?

时间:2023-02-09 14:53:00

Ok, before saying that this question is too "opinion based" and voting it down, hear me out. I have a geo visualization project in which I'm trying to plot air crash locations on a world map with a hover/mouse over function. I have a map ready. In fact I have two maps ready, a globe one and a flat one. I also have a CSV file with 5000 observations. They do not have longitudes and latitudes. How would I go about plotting the locations in the CSV onto the map?

好吧,在说这个问题太“基于意见”并投票之前,请听我说。我有一个地理可视化项目,我正试图在世界地图上用悬停/鼠标悬停功能绘制空袭事故位置。我准备好了地图。事实上,我准备好了两张地图,一张是地球仪,另一张是扁平的。我还有一个包含5000个观察值的CSV文件。他们没有经度和纬度。我如何将CSV中的位置绘制到地图上?

I'm not looking for code, I'm asking the community for tutorials and ideas. If you can guide me to someone's blog or description or videos on how to do this, that will be awesome. Again, before down voting as "too broad" or "too opinion based" or as some other thing, please read the question again. If you still think the question isn't properly asked, throw in a comment and I'll edit it. Globe Map and Flat map with hover function

我不是在寻找代码,我在向社区询问教程和想法。如果您可以引导我访问某人的博客或描述或视频,了解如何执行此操作,那将非常棒。再次,在投票“太宽泛”或“过于基于意见”或其他事情之前,请再次阅读该问题。如果您仍然认为问题没有被正确询问,请发表评论然后我会对其进行编辑。全球地图和平面地图与悬停功能

1 个解决方案

#1


0  

Here is a way to geocode your place names to latitudes and longitudes.

这是一种将您的地名地理编码为纬度和经度的方法。

More importantly, do you really need D3.js for this? Is this just for practicing? If yes, then these video tutorials are a great place to start.

更重要的是,你真的需要D3.js吗?这只是为了练习吗?如果是,那么这些视频教程是一个很好的起点。

If not, and if you care about displaying information on hover, why not use a simple solution like CartoDB? It will serve your purpose pretty well. You can customize the colors, basemaps, tooltips, fonts and most other things you'd care about in a map.

如果没有,如果您关心在悬停时显示信息,为什么不使用像CartoDB这样的简单解决方案?它很适合你的目的。您可以自定义地图中您关注的颜色,底图,工具提示,字体和大多数其他内容。

#1


0  

Here is a way to geocode your place names to latitudes and longitudes.

这是一种将您的地名地理编码为纬度和经度的方法。

More importantly, do you really need D3.js for this? Is this just for practicing? If yes, then these video tutorials are a great place to start.

更重要的是,你真的需要D3.js吗?这只是为了练习吗?如果是,那么这些视频教程是一个很好的起点。

If not, and if you care about displaying information on hover, why not use a simple solution like CartoDB? It will serve your purpose pretty well. You can customize the colors, basemaps, tooltips, fonts and most other things you'd care about in a map.

如果没有,如果您关心在悬停时显示信息,为什么不使用像CartoDB这样的简单解决方案?它很适合你的目的。您可以自定义地图中您关注的颜色,底图,工具提示,字体和大多数其他内容。