admin管理员组文章数量:1309963
I want to use kepler.gl and have config for this However it doesnt works for all parametrs correctly It only works for "fields to show paramegtr" But I want to use it for "ColorField"
Here is my config
how should i chnge it or add or remove something&
config={
"version": "v1",
"config": {
"visState": {
"filters": [],
"layers": [
{
# "id": "lvrvaf5",
"type": "geojson",
"config": {
"dataId": ["data_1"],
"columnMode": "geojson",
"label": "data_1",
"color": [
248,
149,
112
],
"highlightColor": [
252,
242,
26,
255
],
"columns": {
"geojson": "_geojson"
},
"isVisible": True,
"visConfig": {
"opacity": 0.8,
"strokeOpacity": 0.8,
"thickness": 0.5,
"strokeColor": [
130,
154,
227
],
"colorRange": {
"name": "Global Warming",
"type": "sequential",
"category": "Uber",
"colors": [
"#4C0035",
"#880030",
"#B72F15",
"#D6610A",
"#EF9100",
"#FFC300"
]
},
"strokeColorRange": {
"name": "Global Warming",
"type": "sequential",
"category": "Uber",
"colors": [
"#4C0035",
"#880030",
"#B72F15",
"#D6610A",
"#EF9100",
"#FFC300"
]
},
"radius": 10,
"sizeRange": [
0,
10
],
"radiusRange": [
0,
50
],
"heightRange": [
0,
500
],
"elevationScale": 5,
"stroked": True,
"filled": True,
"enable3d": False,
"wireframe": False,
"fixedHeight": False
},
"hidden": False,
"textLabel": [
{
"field": None,
"color": [
255,
255,
255
],
"size": 18,
"offset": [
0,
0
],
"anchor": "start",
"alignment": "center",
"outlineWidth": 0,
"outlineColor": [
255,
0,
0,
255
],
"background": False,
"backgroundColor": [
0,
0,
200,
255
]
}
]
},
"visualChannels": {
"colorField": {
"name": "value_air",
"type": "integer"
},
"colorScale": "quantile",
"strokeColorField": None,
"strokeColorScale": "quantile",
"sizeField": None,
"sizeScale": "linear",
"heightField": None,
"heightScale": "linear",
"radiusField": None,
"radiusScale": "linear"
}
}
],
"effects": [],
"interactionConfig": {
"tooltip": {
"fieldsToShow": {
"data_1": [
{
"name": "name:ru",
"format": None
},
{
"name": "value_air",
"format": None
}
]
},
"compareMode": False,
"compareType": "absolute",
"enabled": True
},
"brush": {
"size": 0.5,
"enabled": False
},
"geocoder": {
"enabled": False
},
"coordinate": {
"enabled": False
}
},
"layerBlending": "normal",
"overlayBlending": "normal",
"splitMaps": [],
"animationConfig": {
"currentTime": None,
"speed": 1
},
"editor": {
"features": [],
"visible": True
}
},
"mapState": {
"bearing": 0,
"dragRotate": False,
"latitude": 43.222016880910616,
"longitude": 76.86878275993097,
"pitch": 0,
"zoom": 9.533473729586555,
"isSplit": False,
"isViewportSynced": True,
"isZoomLocked": False,
"splitMapViewports": []
},
"mapStyle": {
"styleType": "dark-matter",
"topLayerGroups": {},
"visibleLayerGroups": {
"label": True,
"road": True,
"border": False,
"building": True,
"water": True,
"land": True,
"3d building": False
},
"threeDBuildingColor": [
15.035172933000911,
15.035172933000911,
15.035172933000911
],
"backgroundColor": [
0,
0,
0
],
"mapStyles": {}
},
"uiState": {
"mapControls": {
"mapLegend": {
"active": False
}
}
}
}
}
# pip install keplergl
# pip install geopandas
import geopandas as gpd
# Чтение GeoJSON файла
df = gpd.read_file('алмата-сегодня.geojson')
# Load a map with data and config and height
from keplergl import KeplerGl
map_1 = KeplerGl(height=600, data={'data_1': df}, name='data_1', config=config)
# map_2 = KeplerGl(height=400, data={"data_2": df2})
# map_2
# Добавление данных
# map_1.add_data(data=df, name='data_1')
# map_1.config=config
# map_1.add_data(data=df2, name='data_2')
# Применение конфигурации
# map_1.config = config
# map_2.config = config
# Отображение карты
map_1.config
# map_1
# map_2`
]
after this i got only fields to show changed
i want it to work for all parametrs
本文标签: keplerglKepler gl config not working for all parametrsStack Overflow
版权声明:本文标题:kepler.gl - Kepler gl config not working for all parametrs - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741809323a2398697.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论