Jonathan Brooks/

Ecology Notebooks


Ecological Impact Focus

As a student of Environmental Science & Management at Portland State University, data management and modeling are required skills, and I find it incredibly helpful to work through what I'm learning in code. Jupyter Notebooks are an awesome tool for that!

After coding through a problem, my comprehension is a lot more thorough and my logic is far more firmly founded; also, my coding skills grow and stay sharp in the process.

This workspace is the notebook repo for my ESM projects. Due to DataCamp workspace server design, only one 'notebook.ipynb' is publicly visble per workspace, and organizing projects is easiest if I group by workspace; ergo, new projects are kept invisible and presentable projects are cyclicly featured here.

Applied Environmental Studies

ESM 221 with Professor Arick Rouhe

TA Christian Heisler

Linear Regression Model

Line of Best Fit (Ordinary Least Squares)

Hidden code

Research Methods for Environmental Science

ESM 340 with Professor Amy Larson

TA Christian Heisler

Binomial Distributions

Here is a binomial table class constructor in Python with a method to check test statistics and an example setup for running a list of test values against a list of sample sizes. It uses combinations from the Python math module to calculate associated probability.

Hidden code

Statistical Functions are available in many modules

Here the binom methods of the scipy.stats model are given the same inputs.

The critical values are the values as close to the Expected Relative Frequencies mean average with enough statistical significance to reject the null hypothesis at 0.05 alpha, meaning just a 5% chance of getting a value farther from the mean if the distribution being observed is actually no different than the expected distribution (50% probability in a binomial test).

Obtaining critical values (or more extreme values) indicates the variability being investigated is significantly defying the odds of random chance.

If the null hypothesis is rejected, an alternative hypothesis (a possible cause of the nonchance occurence) is advanced; hypotheses can be disproven and cannot be proven.

Scientific consensus advances by disproving hypotheses rather than proving them; the process leaves best guesses (theories), after scrutinous tests, and disproves lesser guesses.

Hidden code

The Random Module in Python

This generates a number of random numbers in a range.

Hidden code

This demonstrates random sampling of a pandas DataFrame.

Hidden code

  • AI Chat
  • Code