This repository contains materials and instructions for participants of the Biodiversity Hackathon.
- Download Mambaforge from the official Conda-Forge page.
- During installation, choose "Yes" to add Mambaforge to your PATH environment variable.
- For Windows, open the Miniforge Prompt from the start menu. For macOS, open a terminal and type
mamba init.
Create a new environment called env_kids:
conda create -n env_kids python=3.11
mamba activate env_kidsconda install -n base mamba -c conda-forge
conda install ipykernel
python -m ipykernel install --user --name kids --display-name "Python (env_kids)"
conda install -c conda-forge geopandas
conda install -c conda-forge gdaljupyter notebook%pip install ipywidgets
%pip install matplotlib
%pip install alive-progress
Download the required shapefiles from the following GitHub repository:
After downloading, move the data from the data/GBIF folder into the following directory on your local machine like below or any folder you want to put in:
C:/KIDS/data2024_0321/GBIF_Parallel_GIS_group/demo/
- Copy the
biodiversity_demo.ipynbnotebook into your Jupyter Notebook. - Before running the notebook, change the paths to the shapefiles and data directories to match your local directory structure. Update the following code blocks in the notebook:
# Load the shapefiles
gdf_shp = gpd.read_file("C:\\Path\\To\\Your\\Shapefile\\WB_countries_Admin0_10m.shp")
# Folder for GBIF
directory = "C:\\Path\\To\\Your\\Data\\GBIF_Parallel_GIS_group\\demo\\"
# Location for output pivot table
output_dir = "C:\\Path\\To\\Your\\Output\\Directory\\species\\demo\\"