The goal of this project is to model estimated quality of life from 2000 to 2100 based on the effects of climate change (a focus on the change in the frequency of natural disasters).
What is the motivating question?
How does climate change consequences affect quality of life in the future?
What type of question is this?
Why is this an important or interesting question?
Our question speaks to the future of humanity and the consequences of our own actions. It speaks to the lack of action we currently show towards the potential stringent living conditions in a future where climate change has reached worst case scenario, and asks us if we really want to live in a world like that.
What will we learn by asking this question?
By asking this question, we can begin to understand how the simple change in temperature over a long period of time will affect other factors -- such as the frequency of natural disasters -- which ultimately will affect our quality of life. As such, we would be able to visualize quality of life over time, dependent on factors that relate to climate change.
How are you going to answer your proposed question?
We will model the number of natural disasters per year to quality of life at different changes of temperature.
What assumptions are you making? Are these good or bad assumptions?
Some assumptions we made is that the earth will increase by 1-4C not taking into account the model from our data we collected since we are varying the graph. We’re assuming this change in temperature is just going to happen.
How did you develop and refine your model?
Initially, we were going to model deaths in population as temperature increases. However, technology advanced, warning systems, and government infrastructures all got better so people are dying less. As a result, there was no trend between deaths and temperature increase. Predicting calories spread over number of people decreases quality of life, not necessarily kills them, so we couldn’t model population change here either. As a result, we redefined and developped our model to the questions we have now.
How did you set the parameters of your model?
To set our parameters, we plotted the change in temperature from 1900-2018, and modeled it out to 2100. Next, we found a function that relates natural disaster frequency to change in temperature and found a function that relates quality of life to natural disaster frequency. Lastly, we plotted quality of life over time, which was dependent on input temperature model - watching the world warm by 1, 2, and 3 degrees Celsius by 2100 - which varied the natural disaster frequency which then varied the quality of life.
How did you validate your model?
To validate our model, we modeled quality of life on a scale of 0-10, 0 being we are all dead, and 10 being we all live fantastic lives. The quality of life as of today should be higher than any day in the future and that is how we will validate our model. It also should not be linear as from the of frequency vs dT graph, frequencies exponentially increase after change in 3C.
# Configure Jupyter so figures appear in the notebook%matplotlibinline# Configure Jupyter to display the assigned value after an assignment%configInteractiveShell.ast_node_interactivity='last_expr_or_assign'# import functions from the modsim library"frommodsimimport*
Change in Temperature vs. Time
"dT vs time"dTvst="tempvstime.csv"# file namedTvst_table=pd.read_csv(dTvst)# reading in fileprint(dTvst_table)#printing out the table to check it is reading the data correctlydTvst_table.columns=['year','dT']# naming the columns
dT=dTvst_table['dT']# y axisyear=dTvst_table['year']# x axisdTvsyear=plot(year,dT)# x,ydecorate(xlabel='year',ylabel='dT (C)',title='Change in Temp vs Time')#fig.savefig('Change in Temp vs Time.png')
defrun_sim_temp(system_temp,update_temp):"""Simulate the system using any update function. system: System object update_func: function that computes the temperature change the next year returns: TimeSeries """results_temp=TimeSeries()results_temp[system_temp.year_0]=-.2foryearinlinrange(system_temp.year_0,system_temp.year_end):results_temp[year+1]=results_temp[year]+update_temp(results_temp[year],system_temp.x_t,year)returnresults_temp
defupdate_temp(prev_dT,x_t,year):"""Compute the temperature next year with a quadratic model. dT: change in temperature (C) year: current year system: system object containing parameters of the model returns: change in temps in following future years """#dT = x_t*(prev_dT**2) - 0.3047*prev_dT + 290dT=2*x_t*year-0.3047returndT
system_temp=System(year_0=1900,year_end=2100,dT_0=-.2,x_t=0.00008)results_temp=run_sim_temp(system_temp,update_temp)ddTvsyear=plot(results_temp,'.')# model#year_range = linrange(system_temp.year_0, system_temp.year_end)#ddTvsyear = plot(year_range, update_temp(year_range, system_temp.x_t))dTvsyear=plot(year,dT,'.')# x,ydecorate(xlabel='Year',ylabel='dT (degrees C)',title='Modeled Change in Temp vs Time')
system_temp=System(year_0=1900,year_end=2100,x_t=0.00009)results_temp=run_simulation_temp(system_temp,update_func_temp)ddTvsyear=plot(results_temp,'.')# modeldTvsyear=plot(year,dT,'.')# x,ydecorate(xlabel='Year',ylabel='dT',title='Change in Temp vs Time')# Graph the extrapolated temperature vs. time model# Results say that by 2100, the world will increase by 2.93 degrees C
Natural Disasters vs. Temperature
defrun_simulation1(system1,update_func1):"""Simulate the system using any update function. system: System object update_func: function that computes the population next year returns: TimeSeries """results=TimeSeries()# results[system1.d_temp_0] = 0print(results_temp[system_temp.year_0])print(results_temp[system_temp.year_end])# for x in linrange(results_temp[system_temp.year_0], results_temp[system_temp.year_end]):# results[x+1] = update_func1(results[x], x, system1)# print(results)forxinresults_temp:results[x]=update_func1(x,system1)print(results)returnresults
defupdate_func1(d_temp,system1):"""Compute the population next year with a quadratic model. pop: current population t: current year system: system object containing parameters of the model returns: population next year """f=28.727*np.exp(4.1503*d_temp)returnf
system1=System(d_temp_0=0,d_temp_end=4)results=run_simulation1(system1,update_func1)dfreqvsdT=plot(results)# time series created in run simulationdecorate(xlabel='d_temp',ylabel='frequency',title='frequency vs. dT')
defrun_simulation2(system2,update_func2):"""Simulate the system using any update function. system: System object update_func: function that computes the population next year returns: TimeSeries """results_QoL=TimeSeries()results_QoL[system2.d_freq_0]=0# print(results)# print(results[system2.d_freq_0])# print(results[len(results)-1])# for x in linrange(results[system2.d_freq_0], results[len(results)-1]):# results_QoL[x+1] = update_func2(x, system2)# print(results_QoL)forxinresults:results_QoL[x]=update_func2(x,system2)returnresults_QoL
defupdate_func2(d_freq,system2):"""Compute the population next year with a quadratic model. pop: current population t: current year system: system object containing parameters of the model returns: population next year """QoL=10-d_freq/2100returnQoL
system2=System(d_freq_0=0,d_freq_end=get_last_value(results))results_QoL=run_simulation2(system2,update_func2)dfreqvsdT=plot(results_QoL)# time series created in run simulationdecorate(xlabel='d_temp',ylabel='Quality of Life',title='Quality of Life vs. Frequency')
What results did your model generate?
Our model generated several "outputs" in the forms of graphs:
Temperature vs. Time (graphed from data, and then graphed with a quadratic model projection as well)
Natural Disasters vs. Temperature (modeled with a function)
Quality of Life vs. Natural Disasters (modeled with a function)
Quality of Life vs. Time (Quality of Life model data graphed according to the timescale of 2000 to 2100)
The most important output is the mapping of quality of life over time (varied by temperature model input), since that is the question we set out to answer.
What metrics did you record?
Temperature (over time) [deg C]
Frequency of natural disasters (per temperature) [number/year]
Quality of Life (per natural disasters AND year) [number scale]
How do the results answer the question?
We found that our quality of life will drastically decrease if the planet continuously warms. If the planet warms, there are more natural disasters, and with more natural disasters, the human population becomes sadder. The metric recorded is mapping quality of life (0-10) to change in natural disaster frequency, which we recorded over time.
Is your answer valid? What are the limitations of your model?
Our answer in concept should be valid, but there are a fair number of limitations to our model. For instance, take any of our functions - the one that relates temperature to time, natural disasters to temperature, etc. - and they will not be precise nor accurate enough to make this model useful in the real world. The quality of life function was a completely arbitrary - a scale set by us. If substituted for more detailed and mathematical models, this model would be more useful. Additionally, we were limited by the computing power of Jupyter notebook, simply because of the complexity of our functions and the size of the values we were working with (that's why the QoL vs. Natural Disasters graph couldn't be made - Jupyter notebook didn't have enough computing power!).