{"id":16851839,"url":"https://github.com/amauryval/gdf2bokeh","last_synced_at":"2026-02-10T07:32:48.189Z","repository":{"id":49411631,"uuid":"262372464","full_name":"amauryval/gdf2bokeh","owner":"amauryval","description":"Gdf2Bokeh, a library to map quickly your geographic data with the bokeh library","archived":false,"fork":false,"pushed_at":"2025-01-02T13:14:32.000Z","size":91685,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-03T06:47:08.225Z","etag":null,"topics":["bokeh","data-visualization","geometry","geopandas","gis-development","map","mapping","pandas","python","shapely"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amauryval.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-08T16:25:26.000Z","updated_at":"2025-01-02T13:13:38.000Z","dependencies_parsed_at":"2022-09-17T20:00:42.142Z","dependency_job_id":null,"html_url":"https://github.com/amauryval/gdf2bokeh","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amauryval%2Fgdf2bokeh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amauryval%2Fgdf2bokeh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amauryval%2Fgdf2bokeh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amauryval%2Fgdf2bokeh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amauryval","download_url":"https://codeload.github.com/amauryval/gdf2bokeh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238195065,"owners_count":19432095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bokeh","data-visualization","geometry","geopandas","gis-development","map","mapping","pandas","python","shapely"],"created_at":"2024-10-13T13:33:42.040Z","updated_at":"2025-10-25T18:31:04.541Z","avatar_url":"https://github.com/amauryval.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gdf2Bokeh\nAn easy way to map your geographic data (from a GeoDataFrame, a DataFrame and a list of dictionaries containing wkt or shapely geometries).\n\nYeah! Because it's boring to convert shapely geometry to bokeh format each time I need to map something !!\n\nAlso, this library let you to build complex Bokeh dashboard: no limitations to use Bokeh mecanisms.\n\n[![CI](https://github.com/amauryval/gdf2bokeh/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/amauryval/gdf2bokeh/actions/workflows/main.yml)\n[![codecov](https://codecov.io/gh/amauryval/gdf2bokeh/branch/master/graph/badge.svg)](https://codecov.io/gh/amauryval/gdf2bokeh)\n\n[![Anaconda-Server Badge](https://anaconda.org/amauryval/gdf2bokeh/badges/version.svg)](https://anaconda.org/amauryval/gdf2bokeh)\n[![Anaconda-Server Badge](https://anaconda.org/amauryval/gdf2bokeh/badges/latest_release_date.svg)](https://anaconda.org/amauryval/gdf2bokeh)\n[![Anaconda-Server Badge](https://anaconda.org/amauryval/gdf2bokeh/badges/platforms.svg)](https://anaconda.org/amauryval/gdf2bokeh)\n\n[![PyPI version](https://badge.fury.io/py/gdf2bokeh.svg)](https://badge.fury.io/py/gdf2bokeh)\n\nCheck the demo [here](https://amauryval.github.io/gdf2bokeh/)\n\n\n## How to install it ?\n\n### with pip\n\n```bash\npip install gdf2bokeh\n```\n\n### With Anaconda\n\n```bash\nconda install -c amauryval gdf2bokeh\n```\n\n## How to use it ?\n\nGdf2Bokeh is able to map your data from various format. About data, you must be aware to use compliant geometry types:\n\nIt supports Geo/DataFrame/List of dict/List of geometry containing these 4 geometries families:\n\n* Point data with Point geometry\n* MultiPoint data with MultiPoint geometry\n* Line data with LineString and/or MultiLineString geometries\n* Polygon data with Polygon and/or MultiPolygon geometries\n\nGeometryCollection data are not supported, so explode it to use it. So the best practice consists to split your input \ndata by geometry type. \n\nAnd you'll be able, optionally, to style your data thanks to the bokeh arguments :\nCheck bokeh documentation in order to style your data :\n    \n* Point / MultiPoint families: [bokeh marker style options](https://docs.bokeh.org/en/latest/docs/reference/models/markers.html)\n* Line family: [bokeh multi_line style options](https://docs.bokeh.org/en/latest/docs/reference/plotting.html?highlight=multi_polygons#bokeh.plotting.figure.Figure.multi_line)\n* Polygon family: [bokeh multi_polygon style options](https://docs.bokeh.org/en/latest/docs/reference/plotting.html?highlight=multi_polygons#bokeh.plotting.figure.Figure.multi_polygons)\n\n\n### A simple example\n\n```python\nfrom bokeh.plotting import show\nimport geopandas as gpd\nimport paandas as pd\nfrom gdf2bokeh import Gdf2Bokeh\n\nmap_session = Gdf2Bokeh()\n\n# add your layer from your data\n\n# Map a points GeoDataFrame. You can see marker style arguments, so we suppose that input_data contains Point geometry\nmap_session.add_layer_from_geodataframe(\"layer1\", gpd.GeoDataFrame.from_file(\"your_poins_data.geojson\"),\n                                        size=6, fill_color=\"red\", line_color=\"blue\")\n\n# Map from a DataFrame. Style parameters are not required\nmap_session.add_layer_from_dataframe(\"layer2\", pd.DataFrame.from_file(\"your_data.json\"),\n                                     geom_column=\"geometry\", geom_format=\"shapely\")\n\n# Map from a list of dictionnaries\nmap_session.add_layer_from_dict_list(\"layer3\", \n                                     [\n                                         {\"geometry\": \"POINT(0 0)\", \"col1\": \"value1\"},\n                                         {\"geometry\": \"POINT(1 1)\", \"col1\": \"value2\"}\n                                     ],\n                                     geom_column=\"geometry\", geom_format=\"wkt\")\n\n# Map from a geometry (shapely, wkt...) list\nmap_session.add_layer_from_geom_list(\"layer4\", [\"Point(0 0)\", \"Point(5 5)\"], geom_format=\"wkt\")\n\n# Let's go to register them on bokeh\nmap_session.add_layers_on_map()\n\n# Next, the map is displayed\nshow(map_session.figure)\n```\n\n\nHere a bokeh basic example.\nOn the terminal, run :\n\n```bash\npython examples/bokeh_simple_case_example.py\n```\n\nOr you can use the jupyter notebook 'example.ipynb'\n\n### An advanced example\n\nHere a bokeh serve example with a slider widget.\nOn the terminal, run :\n\n```bash\nbokeh serve --show examples/bokeh_serve_example.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famauryval%2Fgdf2bokeh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famauryval%2Fgdf2bokeh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famauryval%2Fgdf2bokeh/lists"}