【问题标题】:Is there a way of clustering Latitude and longitude to the nearest town in power BI without being given the town names?有没有办法在不给出城镇名称的情况下将纬度和经度聚类到 Power BI 中最近的城镇?
【发布时间】:2021-07-08 14:39:28
【问题描述】:

我有一个包含 12000 个用户 ID 及其纬度和经度的列表。

我需要在 Power Bi 中制作地图可视化,显示城镇及其在用户数量方面的密度。当我按原样可视化它时,我会得到散布在地图上的单个点。

关于如何实现这一点的任何帮助。目前数据在excel中。

【问题讨论】:

    标签: powerbi maps gis


    【解决方案1】:

    如果你熟悉Python语言,可以使用GeoPy库来查找一组坐标对应的地址。

    • 示例:

    输入

    from geopy.geocoders import Nominatim
    geolocator = Nominatim(user_agent="specify_your_app_name_here")
    location = geolocator.geocode("175 5th Avenue NYC")
    

    输出

    Flatiron Building, 175, 5th Avenue, Flatiron, New York, NYC, New York, ...
    

    然后你可以使用Pandas库来读取CSV文件和Excel

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多