
Lab 1: Era of Ecological Collapse Theresa Ong 12/23/2019 Coupled Human-Natural Systems ENVS 80.10/ EEES 181 Winter 2020 Dartmouth College Due: Wednesday 1/15/2020 at 4:30pm to Blackboard Your submission should be a single PDF or Word file (no need to submit your code). A printed copy of the answer key will be made available before the deadline. You will self-assess your assignment and post your edited version of the lab exercises to Blackboard by the due date. Please consult the syllabus for any accessibility concerns. Getting started Download and install RStudio from https://rstudio.com/ Download and install LaTex from https://www.latex-project.org/get/ Open RStudio and navigate to File> New File> R Markdown Fill in the Title as “Lab 1: Era of Collapse” and your name under author. A new tab will open in your R Studio window. Save the file to your computer as “Lab1_LastName.Rmd” R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed (insert>R) an R code chunk like this: summary(cars) ## speed dist ## Min. : 4.0 Min. : 2.00 ## 1st Qu.:12.0 1st Qu.: 26.00 ## Median :15.0 Median : 36.00 ## Mean :15.4 Mean : 42.98 ## 3rd Qu.:19.0 3rd Qu.: 56.00 ## Max. :25.0 Max. :120.00 You will submit the knitted pdf or word doc of this file to BlackBoard to receive credit for the lab. Make sure to save your progress regularly and show all of your work. 1 Including Plots You can also embed plots, for example: 800 600 400 pressure 200 0 0 50 100 150 200 250 300 350 temperature Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot. Since I would like to see your work, make sure to keep this set to echo = TRUE when adding pieces of code into your Rmd file. Headings are designated by the # symbol. A ## indicates a subheading. A ### indicates sub-sub heading, etc. Make sure you add a space after the #. Try it out: # Example heading ## Example subheading You will use R markdown to complete this and future laboratory exercises in this class. Create labeled subheadings for each exercise that you solve and submit your knitted pdf/doc to Blackboard for credit. I. Population functions: exponential growth, limits to growth. Now that we have the basics, let’s move on to the lab material. This week we introduced major environmental challenges facing the world today. This course will explore how people intersect with these challenges. Since coupled human-natural systems are complex and multi-faceted, we will approach them from a complex systems perspective. In 1826 Thomas Malthus predicted that humans would quickly reach carrying capacity since human population would grow faster than developments in food production could keep up with. Paul Erlich, a famous ecologist later revived this concern in his book, The Population Bomb, which predicted the collapse of the human population would occur by 1970 due to famine, war and social unrest. Let’s see how his predictions were realized by plotting the US population from 1790 to 1970. R has many databases stored on their servers that will be useful throughout this course. Explore the range of options by typing and executing: data() We can explore the contents of the dataset uspop 2 uspop ## Time Series: ## Start = 1790 ## End = 1970 ## Frequency = 0.1 ## [1] 3.93 5.31 7.24 9.64 12.90 17.10 23.20 31.40 39.80 50.20 ## [11] 62.90 76.00 92.00 105.70 122.80 131.70 151.30 179.30 203.20 The dataset is a series of numbers beginning in 1790 to 1970. Let’s see the metadata for the dataset. If you add a ? before a dataset or code function you will get a help file with information regarding that function/dataset. ?uspop We see that “This data set gives the population of the United States (in millions) as recorded by the decennial census for the period 1790–1970.” That gives us the necessary information for understanding the units and the source of the data. To plot the data, run the following plot(uspop, main = "uspop data", xlab = "Year", ylab = "U.S. Population (millions)", type="p") uspop data 200 150 100 50 U.S. Population (millions) U.S. Population 0 1800 1850 1900 1950 Year The plot function includes several options (arguments) which you can find detail on by asking for help: ?plot Exercise 1. Exploring plot arguments a.) For the last plot we used the arguments: type, main, xlab, ylab. You can edit the text in the quotes of each argument, rerun the script and see how different parts of the plot are affected. Use the information in 3 the help file to plot the same population growth curve with a solid line instead of points and title the graph, “U.S. Population Growth” Malthus predicted that the human population (N ) would reach carrying capcity, k, which describes the maximum number of people that the planet could support. The logistic model of population growth predicts that: dN N = rN 1 − (1) dt k We can solve this equation to give: rt kN0e Nt = rt (2) k + N0(e − 1) Where N0 = the initial population size. Let’s plot this function, assuming that we start with an N0 equal to the US population in 1790. logistic <- function(t, r, k, N0) { k * N0 * exp(r * t) / (k + N0 * (exp(r * t) - 1)) } plot(0:100, logistic(t =0 :100,r= 0.1,k= 150, N0 = uspop[1]), xlab = "Year", ylab = "US population size") 150 100 50 US population size 0 0 20 40 60 80 100 Year In contrast, the solution for exponential growth is simply: rt Nt = N0e (3) 4 Exercise 2. Population growth assessed a.) Write an R function for the exponential growth equation (eq. 3) and plot the predicted population growth curve over a 100 year period beginning with a population size equal to the US population in 1790. Compare this with the actual population changes in the US from 1790-1970. Does US population growth appear limited? Does the logistic or exponential function best describe these obervations? b.) How do you think these two different population functions would differentially influence coupled human- natural systems and sustainability? What are the ethical concerns? II. Complexity of discrete time: logistic maps, cobwebbing, pen-and-paper prac- tice Humans have found many ways to manage the environment, at both cost and benefit to human populations, biodiversity and ecosystem function. Delay between management practices and perceived consequences poses a major challenge for the development of effective management strategies. To illustrate this, let’s rewrite the logistic equation in discrete time. We can convert the continous time logistic differential equation (Eq. 1) into a discrete time logistic difference equation by noting that N N = N + rN 1 − t (4) t+1 t t k If we assume that k = 1 and consider only the new generation for each time step, we arrive at Robert May’s variation of the logistic function popularized in his 1976 manuscript: Nt+1 = rNt(1 − Nt) (5) Let’s create another R function for Eq. 5: logistic2 <- function(r, Nt) { r*Nt*(1-Nt) } Then make a vector of Nt, a sequence from 0 to 1 in 0.01 intervals: Nt<-seq(0,1,0.01) Now, let’s map Nt against Nt+1 by plotting our function for Nt+1 using our vector of Nt. We will have to specificy a value of r for our function so let’s start with r = 2.2: plot(Nt,logistic2(r = 2.2,Nt = Nt), type="l",col=rgb(0,0,0,1),asp=1,xlab= expression('N'[t]), ylab = expression('N'[t+1])) 5 0.5 0.4 1 + 0.3 t N 0.2 0.1 0.0 0.0 0.2 0.4 0.6 0.8 1.0 Nt We will also add a 1:1 line to see how Nt grows or declines at each time step: plot(Nt,logistic2(r = 2.2,Nt = Nt),type="l",col=rgb(0,0,0,1),asp=1, xlab=expression('N'[t]), ylab=expression('N'[t+1])) abline(a=0,b=1,lty=2) 0.5 0.4 1 + 0.3 t N 0.2 0.1 0.0 0.0 0.2 0.4 0.6 0.8 1.0 Nt Print or reproduce these curves by hand on a separate sheet of paper and place a marker at an initial starting value of 0.2. 6 0.5 0.4 1 + 0.3 t N 0.2 0.1 0.0 0.0 0.2 0.4 0.6 0.8 1.0 Nt Now travel vertically to the curve marking what value of Nt+1 the population should reach: 0.5 0.4 1 + 0.3 t N 0.2 0.1 0.0 0.0 0.2 0.4 0.6 0.8 1.0 Nt This is our next initial condition, so move horizontally to the 1:1 line where we should begin for the next growth iteration.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages11 Page
-
File Size-