Skip to content

owid/notebooks

Repository files navigation

Our World In Data Scripts & Notebooks

This repository contains scripts and notebooks used by the team at Our World In Data.

⚠️ Scripts and notebooks here are created by many different team members and for different purposes. The standards of quality inside each project will vary a lot in terms of code, data management, project architecture, etc.

The folder structure is sorted by author first, then by project. Some individual folders contain README files for more information.

See below how to install a local setup for running the notebooks.

To run and modify these notebooks from your browser, one of the easiest ways is using Nextjournal.com. Just open the This repository in nextjournal by clicking this link.

Local setup for running these notebooks

We are not yet using poetry or pipenv yet to standardize our jupyter setups precicely. Below is the recommended setup for running the notebooks in this repository.

MacOS

Whenever you are asked to paste something in the terminal from now on you can either do so in the terminal app or in a terminal window in VS Code.

You may have to restart your terminal session in between for newly installed packages to be found on your system

  • Install Homebrew
  • In a terminal run brew install pyenv xz
  • Configure some build details for python packages:
    • Run ps -p $$ to figure out which shell is configured for your system and open your profile file:
    • If your shell is bash
      • Open or create the file .bashrc in your user directory. You can show hidden files (those starting with a dot) by pressing CMD + SHIFT + .
    • If your shell is zsh
      • Open or create the file .zshrc in your user directory. You can show hidden files (those starting with a dot) by pressing CMD + SHIFT + .
    • Put this into into your profile file export PYTHON_CONFIGURE_OPTS="--enable-framework". (On some system not having this led to problems with installing some python libraries)
  • Install python 3.10 with pyenv: pyenv install 3.10.4
  • Make this the default python version so that typing python start this version: pyenv global 3.10.4
  • Install common libraries: pip install pandas matplotlib ipython jupyter jupyterlab ipywidgets altair parse

Windows

Whenever you are asked to paste something in the terminal from now on you can either do so in the Windows Terminal or in a terminal window in VS Code.

You may have to restart your terminal session in between for newly installed packages to be found on your system.

  • Install Miniconda (Use the Python 3.9 Windows 64-bit version unless you have a good reason to pick something else)
  • Install common libraries: conda install pandas matplotlib ipython jupyter jupyterlab ipywidgets altair - pip install should work well for most libraries but for some with compiled dependencies like pandas, conda is the easier way to get them installed
  • Install additional libraries not in conda pip install parse

About

Our World In Data jupyter notebooks

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published