You can explore the Seshat data in an interactive Jupyter notebook. This folder contains examples of how to use it. First, follow these steps:
-
Ensure you have a working installation of Python 3 and Conda. If not, download Anaconda, which should give you both
- Note: you can use a different tool for creating a Python virtual environment than conda (e.g. venv) if you prefer
-
Set up a virtual environment with conda.
conda create --name seshat_api python=3.11 conda activate seshat_api
-
Install the seshat_api package into the venv.
git clone https://github.com/Seshat-Global-History-Databank/seshat_api cd seshat_api pip install .
-
You can then open the notebook with Jupyter (or another application that can run notebooks such as VSCode). First go to this examples dir and install any packages required by the notebook into the venv, then create a kernel and finally open the Jupyter notebook application:
cd examples pip install -r requirements.txt python -m ipykernel install --user --name=seshat_api --display-name="Python (seshat_api)" jupyter notebook
- Note: if Jupyter wants to to set a password, use
Ctrl-C
to escape and runjupyter notebook --generate-config
before runningjupyter notebook
again and entering a blank password.
- Note: if Jupyter wants to to set a password, use
-
From the Jupyter notebook interface in your browser, choose an
.ipynb
file to open, then choose the Kernel that you created calledPython (seshat_api)
in the top right. -
Follow the instructions in the notebook.