{ "cells": [ { "cell_type": "markdown", "id": "58f1e441", "metadata": {}, "source": [ "# Getting Started With GerryChain\n", "\n", "\n", "\n", "This guide will show you how to start generating ensembles with GerryChain." ] }, { "cell_type": "markdown", "id": "4ca7cc40", "metadata": {}, "source": [ "## What You'll Need\n", "\n", "Before we can start running Markov chains, you'll need to:\n", "\n", "* Install `gerrychain` from PyPI. See the [installation guide](./install.md) for instructions.\n", "* Download [this example json of Pennsylvania's VTDs](https://github.com/mggg/GerryChain/blob/main/docs/_static/PA_VTDs.json)\n", " (about 20 MB; use the download button on that page).\n", "* Open your preferred Python environment (e.g. JupyterLab, IPython, or a `.py` file\n", " in your favorite editor) in the directory containing the `PA_VTDs.json` file\n", " that you downloaded.\n", "\n", "Throughout this guide, we will assume that the user is working with a jupyter notebook\n", "or a python script file (a \\*.py file). We will also assume that the end user is working\n", "through this guide is familiar with, but still relatively new to Python.\n", "\n", "Also please note that, while this guide makes use of the \"propose_random_flip\" proposal\n", "function, this is not the only proposal function available in GerryChain (in fact, it is\n", "the one that we use the least). We are only using it here because it provides for\n", "a simple example of how to run a Markov chain.\n", "\n", "> Note\n", ">\n", "> If you are having any trouble getting the materials on this tutorial to work, please\n", "> consult the [installation guide](./install.md) first. Working through its\n", "> [installation checks](./install.md#checking-your-installation) will confirm that your\n", "> environment is set up the way this guide expects, and will usually pinpoint the problem.\n", ">\n", "> If you're still having issues, please\n", "> [open an issue](https://github.com/mggg/GerryChain/issues) so we can fix the guide for\n", "> the next person, or send us a message at code[at]mggg[dot]org." ] }, { "cell_type": "markdown", "id": "f33d75ef", "metadata": {}, "source": [ "## Setting Up the Chain\n", "\n", "