小编Tim*_*Tim的帖子

如何使用 geopandas 显示特定参数的热图?

在我非常简单的情况下,我想显示pointsGeoJSON 文件中点的热图,但显示地理密度(纬度、经度)。文件中points每个点都有一个confidence属性(0到1之间的值),如何根据该参数显示热图?weight=points.confidence似乎不起作用。

\n

举个例子:

\n
#points.geojson\n{\n"type": "FeatureCollection",\n"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },\n"features": [\n{ "type": "Feature", "properties": {"confidence": 0.67}, "geometry": { "type": "Point", "coordinates": [ 37.703471404215918, 26.541625492300192 ] } },\n{ "type": "Feature", "properties": {"confidence": 0.76}, "geometry": { "type": "Point", "coordinates": [ 37.009744331225093, 26.710090585532761 ] } },\n{ "type": "Feature", "properties": {"confidence": 0.94}, "geometry": { "type": "Point", "coordinates": [ 37.541708538306224, 26.160111944646022 ] } },\n{ "type": "Feature", "properties": {"confidence": 0.52}, …
Run Code Online (Sandbox Code Playgroud)

python geopandas geoplot

5
推荐指数
1
解决办法
1847
查看次数

通过值列表获取键

我有一本字典和一个值列表,例如:

dictionary = {'a': 1, 'b': 2, 'c': 3, 'd': 4}

liste = [2, 3]
Run Code Online (Sandbox Code Playgroud)

我想:

result = ['b', 'c']
Run Code Online (Sandbox Code Playgroud)

如果我有一本非常大的字典,那么最好的方法是什么?

键具有唯一值。

python

0
推荐指数
1
解决办法
52
查看次数

标签 统计

python ×2

geopandas ×1

geoplot ×1