Getting Started
Here you’ll find various notebooks created by Sparkgeo. Navigate to the notebooks on the left. To view the source code visit the github repo
Installation
First clone
this repository to your local environment.
To run the notebooks locally you need to install the environments for R
, Quarto
and Python
.
Python
Conda or Mamba
To build the environment from a yml
file using mamba (recommended)
mamba env create -f environment.yml
Usage
Once activating your conda environment:
conda activate wb-spk-env
You should be able to run the .ipynb
notebooks.
For the provided example applications, activate the virtual environment and then run one in this fashion:
python src/count_cars.py --detection-file data/processed/test_cars.gpkg --intersect-file data/processed/beitbridge_road_mask_v2.gpkg --output-json cars.geojson
Please see the Readme in the notebooks directory for their usage.
R Projects
To replicate the R environment, you can simply install.packages('renv')
and open up the R Project file and run renv::restore()
to restore the renv
lockfile to load in all the appropriate libraries.
Usage
Restoring the renv
above will allow you to run any .qmd
notebooks.
Quarto
Quarto is an open-source scientific and technical publishing system.
Review Quarto’s Quickstart for installation instructions.
To regenerate outputs from Quarto:
quarto render hello.ipynb --to html
quarto render hello.ipynb --to docx