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 binder
    pipenv --python 3.8
    
  5. Install dependencies
    cd binder
    pipenv install
    
  6. Install jupyter notebook kernel for pipenv
    pipenv install ipykernel
    pipenv shell
    
  7. In the pipenv shell, do
    python -m ipykernel install --user --name=apache-sedona
    
  8. Setup environment variables SPARK_HOME and PYTHONPATH if you didn't do it before. Read Install Sedona Python to learn.
  9. Launch jupyter notebook: jupyter notebook
  10. Select Sedona notebook. In your notebook, Kernel -> Change Kernel. Your kernel should now be an option.

Last update: November 11, 2023 03:16:06