# Anaconda / Jupyter
**FILES**:
1. Brief intro to python: [intropy.ipynb](https://drive.google.com/file/d/1SD-MX939vDe2ipoAg2CwjC5DwCv_gIJ-/view?usp=sharing)
2. Intro to pandas & Cleaning data: [pandas_and_cleaning.zip](https://python.broholttrans.dk/pandas_and_cleaning.zip)
3. Visualising: (to be added)
### Useful shortcuts for using notebooks
* **Run a cell with ctrl + enter**
* Run a cell and start a new one with shift + enter
* Run a cell and insert a new one below with alt + enter
* **Toggle between edit and command mode with Esc and Enter, respectively**.
* Once **in command mode**:
* Scroll up and down your cells with your Up and Down keys.
* Press A or B to insert a new cell above or below the active cell.
* M will transform the active cell to a Markdown cell.
* Y will set the active cell to a code cell.
* **D + D (D twice) will delete the active cell.**
* Z will undo cell deletion.
* Hold Shift and press Up or Down to select multiple cells at once.
* With multiple cells selected, Shift + M will merge your selection.
* You can also click and Shift + Click in the margin to the left of your cells to select them.
* **You can use the "kernel" tab to interrumpt a process, and also to clean your outputs if you need to "start clean"**
## Anaconda (python)
* Anaconda is a package and environment manager, a data science distribution (for Python and R), and collection of already-included packages (libraries).
* Anaconda includes Jupyter, Pandas, and other software (e.g. spyder, a python IDE)
* Most packages we will be using (e.g. pandas) should come already installed. **If you need to install extra packages, you can do it through the navigator interface, instructions [here](https://docs.anaconda.com/en/latest/anaconda/navigator/getting-started/#managing-packages).**
### Anaconda installation
#### Please download and install from: [Anaconda Python website](https://www.anaconda.com/distribution/)
If you run into issues:
* Mac users, check [This](https://drive.google.com/file/d/1ZmW4gs3eWLsrcb7HDQkt6CN4KlwV3tWU/view?usp=sharing)
* Extended documentation [here](https://docs.anaconda.com/en/latest/anaconda/install/).
### Starting anaconda navigator:
**MacOS**
* Open Launchpad, then click the Anaconda-Navigator icon.
<img src="https://docs.anaconda.com/_images/Navigator_Launchpad_icon.png" width="200px">
* Or open Launchpad and click the terminal icon. Then in terminal, type `anaconda-navigator`.
**Windows**
* From the Start menu, click the Anaconda Navigator desktop app.
<img src="https://docs.anaconda.com/_images/win-navigator2.png" width="400px">
* Or from the Start menu, search for and open “Anaconda Prompt” and type the command `anaconda-navigator`.
**Linux**
* Open a terminal window and type `anaconda-navigator`.
Extended documentation in installation [here](https://docs.anaconda.com/en/latest/anaconda/install/).
## Jupyter lab/notebook
* open-source
* web-client app
Jupyter notebooks are quite useful tools for interactive, step-by-step data projects. They integrate text (markdown), code (commongly python or R), and code outputs, in the form of cells.
You can think of them as a digital notebook that can run code.
### To open a notebook:
1. Download the [intropy.ipynb](https://drive.google.com/file/d/1SD-MX939vDe2ipoAg2CwjC5DwCv_gIJ-/view?usp=sharing) file and place into your working folder
2. Download any other example files to the same folder (csv, excel, etc, depending on the session)
3. Open Anaconda Navigator
4. Launch Jupyter Lab (recommended) or Jupyter notebook
5. You will see a file structure from your computer
6. Navigate to your .ipynb file to open it
<!-- How does this computational frame (pandas) "solidify" (enhance the grammar of) -->