Blog

Exploring Population Growth And Chaos Theory With The Logistic Map, In Google Sheets

In this post, I want to show you something amazing: how a simple equation the logistic map can lead to incredible outcomes, and even to chaos.

And we’ll explore this with Google Sheets so you can follow along (please download the template at end of the post).

But first, we begin our story in a field far, far away, where two bunnies are getting down to, erm, business, shall we say, as they start a fluffle* of rabbits…

* collective noun for wild rabbits

Two rabbits in a field

Provided the growth rate is greater than one, the population grows until it becomes constrained by limited resources (for example, food). Then it settles into a stable population, neither increasing nor decreasing year on year.

But as the growth rate increases weird things start happening.

The rabbit population grows faster but it doesn’t settle down to a single equilibrium (stable population) anymore. No. In fact, the population oscillates between two equilibrium values. One year high, one year low, then back to the high value again, then low, and so on, to infinity.

Keep increasing the growth rate, however, and suddenly the population oscillates between four equilibriums. Then eight. Then sixteen.

And if it increases past the specific growth rate of 3.57, well all bets are off the table!

The population becomes chaotic and never settles into any equilibrium at all. It bounces around randomly, some years high, others low, others in the middle, with no pattern.

Except that’s not the end of the story.

Incredibly, within this region of chaotic behavior lie “islands of stability”. Short windows at specific growth rates where order re-establishes itself.

Out of the chaos, a periodic pattern emerges! 🤯

The Logistic Map

Here is the logistic map with a changing growth rate to illustrate how the population changes:

Logistic Map Iterations in Grid

Contents:

  1. The Logistic Map Equation
  2. Comparing Populations At Different Growth Rates
  3. The Bifurcation Diagram
  4. How To Create The Logistic Map In Google Sheets
  5. How To Create An Interactive Population Model With Grid
  6. How To Create The Bifurcation Diagram
  7. Displaying The Logistic Map Equation In Google Sheets
  8. Logistic Map Template In Google Sheets
  9. Further Reading

Continue reading Exploring Population Growth And Chaos Theory With The Logistic Map, In Google Sheets

API Authentication Apps Script Reference

This post is a summary of common authentication protocols for API authentication with Apps Script.

I got fed up digging around in my Drive folder for old scripts to refresh my memory on the syntax, so I created this reference.

It’s not a comprehensive post on how to connect to APIs, instead, it’s a short summary of common protocols for easy reference.(If you’re new to APIs, start with my Apps Script API tutorial for beginners.)

This post looks at four different API authentication methods:

  1. No API authentication
  2. Requires API key in query string
  3. Requires API key in header
  4. OAuth2: Secure API authentication

Continue reading API Authentication Apps Script Reference

How To Use The Choose Function In Google Sheets

The CHOOSE Function in Google Sheets lets you choose between different options.

It’s a lookup function, akin to a limited VLOOKUP rather than an alternative to the IF function.

It takes an index number and returns a value at that numbered position from the list of possible options.

Here’s a simple example:

=CHOOSE(1,"A","B")

which will output:

CHOOSE Function in Google Sheets

The first argument is the index number: 1.

Subsequent arguments are possible choices. The CHOOSE function returns the value at index position 1 in this case, i.e. “A”.

If I changed the index number to 2, the CHOOSE function would output “B”.

🔗 Get this example and others in the template at the bottom of this article.

Continue reading How To Use The Choose Function In Google Sheets

A Behind The Scenes Look At How I Create A Technical Video Course

Last week I launched a new Google Sheets course — The QUERY Function In Google Sheets — so I thought it would be interesting and helpful to share how such a course comes about.

It’s my 14th online course and my 19th launch. Along the way, I’ve made just about every mistake in the book, but I’ve now settled on a reliable framework for online course creation, the outline of which I share below.

Online Course Screenshot

I think about technical video course creation in six distinct phases:

  1. Ideation
  2. Research
  3. Planning
  4. Course Creation
  5. Launch
  6. Post-launch

Continue reading A Behind The Scenes Look At How I Create A Technical Video Course

How To Create A Heat Map In Google Sheets

Heat maps in Google Sheets are a great way to add context to your data.

They bring attention to the high and low values in your data, to outliers that demand attention.

Best of all, heat maps in Google Sheets are easy to create.

Consider this dataset showing monthly temperatures for Washington D.C.:

Temperature Data In Google Sheets

Without any formatting, it’s boring to look at, doesn’t convey any immediate takeaways, and it’s hard to spot trends such as which years were hotter than others.

Now compare that to the same dataset with a heat map overlay (click to enlarge):

Temperature Heat Map In Google Sheets

Wow! The stories jump off the page at you now. You can easily compare the years and see which years had longer winters, or hotter summers.

Let’s see how to create a heat map in Google Sheets.

Continue reading How To Create A Heat Map In Google Sheets