Skip to content

Python Jupyter Notebook Examples

Click Binder and play the interactive Sedona Python Jupyter Notebook immediately!

Sedona Python provides a number of Jupyter Notebook examples.

Please use the following steps to run Jupyter notebook with Pipenv on your machine

  1. Clone Sedona GitHub repo or download the source code
  2. Install Sedona Python from PyPI or GitHub source: Read Install Sedona Python to learn.
  3. Prepare spark-shaded jar: Read Install Sedona Python to learn.
  4. Setup pipenv python version. Please use your desired Python version.
cd docs/usecases
pipenv --python 3.8
  1. Install dependencies
cd docs/usecases
pipenv install
  1. Install jupyter notebook kernel for pipenv
pipenv install ipykernel
pipenv shell
  1. In the pipenv shell, do
python -m ipykernel install --user --name=apache-sedona
  1. Setup environment variables SPARK_HOME and PYTHONPATH if you didn't do it before. Read Install Sedona Python to learn.
  2. Launch jupyter notebook: jupyter notebook
  3. Select Sedona notebook. In your notebook, Kernel -> Change Kernel. Your kernel should now be an option.

Last update: April 14, 2024 03:28:23