Code Templates¶
Python is widely-used in the sciences. It has a wide array of external libraries which we can access by importing them into our code (via an import statement). A library is just a package of code written by somebody else, which contains usable functions for us to use. It is these libraries that give Python it’s notable versatility. It is with these libraries that we will explore some science-driven computational projects. In this bootcamp, we focus on the libraries:
- NumPy
- Provides various numerical computing tools (random number generators, mathematical functions, etc.)
- Matplotlib
- Provides various interactive, data visualization tools (histograms, errorbars, scatterplots, curve fitting, etc.)
- SciPy
- Provides varies resources for math, science, and engineering
On the Avenue course page for the Python bootcamp, there is a downloadable collection of code templates which guide students through common data analysis tasks, including:
- importing/exporting data from/to a file
- generating random data and plotting it using a histogram
- generating random data and fitting with a polynomial curve
- importing data from a file and fitting with any function
- importing data (with +/- errors) from a file and plotting with errorbars