-
Notifications
You must be signed in to change notification settings - Fork 1
Getting started
To get started on doing data analysis in Python, you'll first need to install some software on your computer. You'll install Python along with several packages that will be useful for data analysis. Specifically, we'll install packages for numerical and scientific computing packages (numpy, scipy, pandas, and xarray), for plotting and visualization (matplotlib, seaborn, and arviz), and for Bayesian inference (emcee and pymc). These packages also have several other packages that they depend on, which will be installed when you follow the instructions linked below. With these packages installed you'll be all set to do all of the assignments in the course.
You'll also install git, which keeps track of changes and revisions to your code. You'll use git extensively during your final project, but we'll install it now so you can get started using it.
Proceed to Installation for detailed instructions.
If the installation was successful, you'll be able to run JupyterLab, a program that lets you write Python code in a notebook format. A notebook can contain code as well as text, plots, and equations. It's a nice way to annotate your code and present your results in a self-contained format. All of your assignments will be submitted as JupyterLab notebooks.
To run JupyterLab, first open a Miniforge Prompt (Windows) or a terminal (MacOS and Linux), then activate your phys201 environment, which should have been set up during installation:
conda activate phys201
Then run
jupyter-lab
A new tab or window should open in your web browser with the JupyterLab interface. If you accidentally close the tab, you should be able to get back to JupyterLab by going to http://localhost:8888/lab. If you accidentally exit your web browser completely, you'll need to enter a token to get back to JupyterLab when you restart your browser. The token is listed in your Miniforge Prompt (Windows) or terminal (MacOS and Linux) from which you started JupyterLab. You might have to scroll back a bit to find it.
Download and save the test notebook. Then in JupyterLab, navigate to the folder where you saved it and execute all of the cells (you can do this by hitting shift-return on each notebook cell). The notebook tests most of the software you will use in the course. You're not expected to understand all the code or methods in the test notebook at this stage, but by the end of the course you will.
Take note of any errors that occur while you are executing it and report them to the course staff (or file an issue on GitHub!).
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
