<commit_before>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Getting started\n",
    "Niche Vlaanderen can be used interactively in Python. For interactive use, we recommend using the [jupyter notebook](https://inbo.github.io/niche_vlaanderen/installation.html#running-niche). This allows one to save documentation, code and results in the same file.\n",
    "\n",
    "This file itself is a notebook, and can be accessed at: [getting_started.ipynb](https://github.com/inbo/niche_vlaanderen/blob/master/docs/getting_started.ipynb). If you download the [niche sourcecode](https://github.com/inbo/niche_vlaanderen/releases) you can run these notebooks from the `docs` folder, allowing you to tinker with them yourself.\n",
    "\n",
    "To calculate a Niche model one has to take the following steps:\n",
    "\n",
    " * Initialize the model (create a ``Niche`` object)\n",
    " * Add the different input grids (or constant values) to the model (``set_input`` method)\n",
    " * Run the model (``run`` method)\n",
    " * Optionally inspect the results using ``plot()`` and ``table``.\n",
    " * Save the results (``write`` method).\n",
    "\n",
    "These steps are mirrored in the design of the ``Niche`` class which is given below.\n",
    "\n",
    "Optionally the user can also create difference maps showing how much MHW/MLW has\n",
    "to change to allow a certain vegetation type. This is done using the ``deviation`` parameter of the ``run`` method.\n",
    "\n",
    "\n",
    "\n",
    "## Creating a simple NICHE model\n",
    "\n",
    "For our first example, we will be creating a [simple model](https://inbo.github.io/niche_vlaanderen/vegetatie.html#eenvoudig-niche-model), using only MHW, MLW and soil for the predictions.\n",
    "\n",
    "The first step is importing the `niche_vlaanderen` module. For convenience, we will be importing as `nv`. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [<commit_msg>Add extra installation on interactive usage<commit_after>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Getting started\n",
    "\n",
    "## Interactive usage\n",
    "\n",
    "Niche Vlaanderen can be used interactively in Python. For interactive use, we recommend using the [jupyter notebook](https://inbo.github.io/niche_vlaanderen/installation.html#running-niche). This allows one to save documentation, code and results in the same file.\n",
    "\n",
    "This file itself is a notebook, and if you want to reproduce our result this is possible:\n",
    "\n",
    " * Download the [niche sourcecode](https://github.com/inbo/niche_vlaanderen/releases) (use the zip file)\n",
    " * Extract the file and navigate to the `docs` folder from the anaconda prompt. Make sure you also extract the testcases directory, as this contains the data we will be using.\n",
    " * activate the niche environment: `activate niche` (not necessary if you used the alternative install)\n",
    " * run jupyter notebook: `jupyter notebook`. This should open a web page (similar or equal to http://localhost:8888 ) - check your anaconda prompt for a link if this is not the case.\n",
    " * Navigate your web browser to the `getting_started.ipynb` file (in the Files tab, which should be opened by default).\n",
    " * Any cell with code can be run by by pressing Ctrl+Enter. If you are unfamiliar with notebooks, you can take some time familiarizing yourself by taking the User interface tour from the `Help` menu.\n",
    "\n",
    "## Steps to create a Niche model\n",
    "To calculate a Niche model one has to take the following steps:\n",
    "\n",
    " * Initialize the model (create a ``Niche`` object)\n",
    " * Add the different input grids (or constant values) to the model (``set_input`` method)\n",
    " * Run the model (``run`` method)\n",
    " * Optionally inspect the results using ``plot()`` and ``table``.\n",
    " * Save the results (``write`` method).\n",
    "\n",
    "These steps are mirrored in the design of the ``Niche`` class which is given below.\n",
    "\n",
    "Optionally the user can also create difference maps showing how much MHW/MLW has\n",
    "to change to allow a certain vegetation type. This is done using the ``deviation`` parameter of the ``run`` method.\n",
    "\n",
    "\n",
    "\n",
    "## Creating a simple NICHE model\n",
    "\n",
    "For our first example, we will be creating a [simple model](https://inbo.github.io/niche_vlaanderen/vegetatie.html#eenvoudig-niche-model), using only MHW, MLW and soil for the predictions.\n",
    "\n",
    "The first step is importing the `niche_vlaanderen` module. For convenience, we will be importing as `nv`. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
{'fraction_non_alphanumeric': 0.1346663946133442, 'fraction_numerical': 0.0008161599673536013, 'mean_word_length': 3.408273381294964, 'pattern_counts': {'":': 18, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2613487', 'n_tokens_mistral': 1515, 'n_tokens_neox': 1473, 'n_words': 586}