We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config on jupiter notebook doesnt work corectly for all parametrs,especially for "colorField" Only works for "fields to show parametr"
config={ "version": "v1", "config": { "visState": { "filters": [], "layers": [ { "id": "data_1", "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 } } } } }
import geopandas as gpd
df = gpd.read_file('алмата-сегодня.geojson')
from keplergl import KeplerGl map_1 = KeplerGl(height=600, data={'data_1': df}, name='data_1', config=config)
map_1.config map_1
Expected behavior Map must show different colors depending on value_air parametr However it stays same color
Screenshots
The text was updated successfully, but these errors were encountered:
heshan0131
No branches or pull requests
Config on jupiter notebook doesnt work corectly for all parametrs,especially for "colorField"
Only works for "fields to show parametr"
config={
"version": "v1",
"config": {
"visState": {
"filters": [],
"layers": [
{
"id": "data_1",
"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
Expected behavior
Map must show different colors depending on value_air parametr
However it stays same color
Screenshots
The text was updated successfully, but these errors were encountered: