Skip to content

Commit

Permalink
[Fix] add_data() function in keplergl-jupyter (#2867)
Browse files Browse the repository at this point in the history
Publish Keplergl-jupyter 0.3.5
  • Loading branch information
lixun910 authored Dec 27, 2024
1 parent 3b46abd commit 2d1d8e5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bindings/kepler.gl-jupyter/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "keplergl-jupyter",
"version": "0.3.4",
"version": "0.3.5",
"description": "This is a simple jupyter widget for kepler.gl, an advanced geo-spatial visualization tool, to render large-scale interactive maps.",
"author": "Shan He",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions bindings/kepler.gl-jupyter/keplergl/_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT
# Copyright contributors to the kepler.gl project

version_info = (0, 3, 4, 'final', 0)
version_info = (0, 3, 5, 'final', 0)

_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''}

Expand All @@ -17,4 +17,4 @@
#
# The major version needs to match that of the JS package.
# Note: this follows the semver format, which is used to match the JS package version in keplergl-plugin.js
EXTENSION_SPEC_VERSION = '0.3.4'
EXTENSION_SPEC_VERSION = '0.3.5'
16 changes: 8 additions & 8 deletions bindings/kepler.gl-jupyter/keplergl/keplergl.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ def add_data(self, data, name="unnamed", use_arrow=False):
if use_arrow:
global g_use_arrow
g_use_arrow = use_arrow
try:
gdf = geopandas.read_file(data, driver='GeoJSON')
copy.update({name: gdf})
except Exception:
# if it fails, assume it is a csv string
# load csv string to a dataframe
df = pd.read_csv(data)
copy.update({name: df})
try:
gdf = geopandas.read_file(data, driver='GeoJSON')
copy.update({name: gdf})
except Exception:
# if it fails, assume it is a csv string
# load csv string to a dataframe
df = pd.read_csv(data)
copy.update({name: df})

self.data = copy

Expand Down

0 comments on commit 2d1d8e5

Please sign in to comment.