This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git
The following commit(s) were added to refs/heads/master by this push:
new ebf00cb16c [GH-2002] Add params to KeplerGl constructor (#2003)
ebf00cb16c is described below
commit ebf00cb16cc0e3f4268f9a36331e27e6361bca3c
Author: Qiusheng Wu <[email protected]>
AuthorDate: Mon Jun 23 01:09:24 2025 -0400
[GH-2002] Add params to KeplerGl constructor (#2003)
---
python/sedona/spark/maps/SedonaKepler.py | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/python/sedona/spark/maps/SedonaKepler.py
b/python/sedona/spark/maps/SedonaKepler.py
index 00bff96210..50666a5eca 100644
--- a/python/sedona/spark/maps/SedonaKepler.py
+++ b/python/sedona/spark/maps/SedonaKepler.py
@@ -22,13 +22,25 @@ from sedona.spark.sql.types import RasterType
class SedonaKepler:
@classmethod
- def create_map(cls, df=None, name="unnamed", config=None):
+ def create_map(
+ cls,
+ df=None,
+ name="unnamed",
+ config=None,
+ height=600,
+ use_arrow=False,
+ show_docs=False,
+ ):
"""
Creates a map visualization using kepler, optionally taking a sedona
dataFrame as data input
:param df: [Optional] SedonaDataFrame to plot on the map
:param name: [Optional] Name to be associated with the given
dataframe, if a df is passed with no name, a default name of 'unnamed'
is set for it.
- param config: [Optional] A map config to be applied to the rendered
map :return: A map object
+ param config: [Optional] A map config to be applied to the rendered map
+ param height: [Optional] Height of the map in pixels, default is 600
+ param use_arrow: [Optional] Whether to use arrow for data transfer,
default is False
+ param show_docs: [Optional] Whether to show the documentation, default
is False
+ :return: A map object
"""
try:
@@ -37,7 +49,7 @@ class SedonaKepler:
msg = "Install apache-sedona[kepler-map] to convert sedona
dataframes to kepler maps."
raise ImportError(msg) from None
- kepler_map = KeplerGl()
+ kepler_map = KeplerGl(height=height, use_arrow=use_arrow,
show_docs=show_docs)
if df is not None:
SedonaKepler.add_df(kepler_map, df, name)