SlideShare a Scribd company logo
CLIMATE CHANGE
IN PORTUGAL
Programming Techniques
Group number 2
Catarina Pereira, 52919
Cristiana Correia, 48576
Mariana Canavarro, 48809
Tiago Pires, 48816
SUMMARY
1. Literature review
2. Empirical work
4. Conclusion
2.1. Data context
2.2. Data collection
2.3. Data preparation
2.4. Exploring data
2.5. Data modelling
3. Results and discussing
2.6. Evaluation
2.7. Deployment
1. LITERATURE
REVIEW
• We studied the average temperature in Portugal
for the past 50 years in Beja, Lisbon and Porto.
• The increase in temperature is one of the most
controversial issues in nowadays.
• As climate slowly and gradually changes human
race as a high capacity to adapt, but it’s not
possible to predict the impact that it will have on
our daily life’s, said Zivin and Neidell (2014).
2. EMPIRICAL WORK
2.1. Data context
1
Stationary Time Series Model
(ARMA Model)
Time process where mean, variance
and autocorrelation remain
constant over time.
2
Non Stationary Time Series
Model (ARIMA Model)
Time Series with trend and
seasonality. Have no constant
mean over time (average depends
on time) or constant variance over
time.
3
Seasonal Time Series Models
(S-ARIMA Model)
Time Series that contains
seasonal phenomena that
repeats itself over a regular
period of time.
2.2. Data collection
2. EMPIRICAL WORK
• Our sample were collected from the Climate Portal
• We obtain data on the average temperature in 3 cities in Portugal: Beja, Lisboa and Porto
• From January 1971 to December 2018
• In total 576 observations
• The data came in a file in Excel format
2.3. Data preparation
2. EMPIRICAL WORK
1
2
3
Create 3 Python files, corresponding to the 3 cities we studied: Porto, Lisbon
and Beja.
Import the libraries we wanted to use, such as numpy, pandas,
statsmodels.api, statsmodels.tsa and also matplotlib.pyplot.
Define the variables: “dataset”, our main variable; “Data70” is the variable
that represents the observations up to the last year (excluding).
Define a correlation function (acf_pacf (x)) that will allow us to evaluate the
stationarity of our model.
4
2.4. Exploring data
2. EMPIRICAL WORK
We started plotting the original series chart to get a first visual idea of the behavior of the series.
So we essentially check if it has a tendency, if the variance is constant and if it has seasonality.
We can already see that the series does not have a marked trend and the variance does not
seem constant. Right here we suspect that the series is not stationary.
Figure 1. Original Serie
2.4. Exploring data
2. EMPIRICAL WORK
Figure 2. ACF/PACF from original series
Analyzing Figure 2 we can verify that the autocorrelation of the series does not slowly decay
to zero nor disappear after a certain delay. The same goes for PACF. We conclude that the
series is not stationary, so it needs transformations to become stationary and therefore can
be modeled.
2.4. Exploring data
2. EMPIRICAL WORK
Given the problems that make the series
non-stationary, the non-constant
variance and the seasonal component,
we applied two usual techniques:
• Logarithmization, so that the variance
becomes constant;
• Differentiation of order 12, to remove
the autocorrelations caused by
seasonality.
Figure 3. Logarithmization and differentiation (order 12)
Figure 4. ACF and PACF of figure 3
2.5. Data modelling
2. EMPIRICAL WORK
• Since we have already made the necessary
transformations so that our series is stationary, we now
need to know the number of optimal parameters
associated with seasonal and non-seasonal parts MA
and AR, which best fit our data. Consequently we run
the auto-arima function in python.
• The model with the best
information criterion is an
S-ARIMA (1,0,2) * (0,1,1)12.
2.5. Evaluation
2. EMPIRICAL WORK
The estimation of the model coefficients was performed based on the observations
collected up to the last year of the sample, that is, with the variable we created
“data70”. The model estimation result is given by the following output.
Figure 5. Model estimation output
1 − 0,9732𝐵 (1 − 𝐵12
)𝑍𝑡 = (1 − 0,7088𝐵 − 0,1695𝐵2
)(1 − 0,8303𝐵12
)𝑎𝑡
2.6. Evaluation
2. EMPIRICAL WORK
After estimating the model, we need to check if it has statistical properties that allow a
good prediction.
Figure 6. Model Residue Analysis
2.6. DEPLOYMENT
2. EMPIRICAL WORK
Ex-post forecasting, which consists of “predicting” what has already happened to analyze
forecasting behavior, a kind of training phase before we try to predict the future.
Figure 7. Ex post forecasting for the last 12 sample
observations
Figure 8. Absolute error percentage
2.6. DEPLOYMENT
2. EMPIRICAL WORK
Ex-Ante Forecasting, which consists of forecasting the data of the variable under study for a future
moment.
Figure 9. Ex-ante forecasting: predict the next 12 upcoming future
3. RESULTS AND DISCUSSING
Figure 10. Porto’s Original Series Figure 11. Lisbon’s Original Series Figure 12. Beja’s Original Series
Beja is the city with higher amplitude and higher temperatures, compared with Porto and Lisbon.
Figure 13. Porto’s moving average
(MA) and moving standard
deviation (MSD)
Figure 14. Lisbon’s MA and MSD Figure 15. Beja’s MA and MSD
In all three cities the average temperature has been increasing, the average and the standard deviation
have demonstrated a small but noticeable raise during our time frame.
3. RESULTS AND DISCUSSING
Analysing the three cities in
discussion we can say the S-ARIMA
(1,1,1)(0,1,1,12) did a good
prediction of all time series.
Figure 16. Porto’s Ex-post forecasting
Figure 17. Lisbon’s Ex-post forecasting Figure 18. Beja’s Ex-post forecasting
3. RESULTS AND DISCUSSING
The amplitude of temperature will continue to decrease,
especially in Porto city, despite the increase in average
temperature. Lisbon will apparently maintain its
amplitude of temperate and average temperature. And
finally, Faro will remain the city with the most observed
amplitude followed by the slight increase of minimum
temperatures.
Figure 19. Porto’s Ex-ante forecasting Figure 20. Lisbon’s Ex-ante forecasting
Figure 21. Beja’s Ex-ante forecasting
4. CONCLUSION
All models are wrong,
but some are useful.
George E. P. Box
“
”

More Related Content

Similar to Climate Change in Portugal

Climate Change Model
Climate Change ModelClimate Change Model
Climate Change Model
Gaetan Lion
 
Forecasting_CO2_Emissions.pptx
Forecasting_CO2_Emissions.pptxForecasting_CO2_Emissions.pptx
Forecasting_CO2_Emissions.pptx
MOINDALVS
 
Statitical consulting project report
Statitical consulting project reportStatitical consulting project report
Statitical consulting project report
Zhaoqiu Luo
 
IRJET- Analysis of Crucial Oil Gas and Liquid Sensor Statistics and Productio...
IRJET- Analysis of Crucial Oil Gas and Liquid Sensor Statistics and Productio...IRJET- Analysis of Crucial Oil Gas and Liquid Sensor Statistics and Productio...
IRJET- Analysis of Crucial Oil Gas and Liquid Sensor Statistics and Productio...
IRJET Journal
 
IAOS 2018 - Seasonal Adjustment of Daily Data, D. Ladiray, J. Palate, G.L. Ma...
IAOS 2018 - Seasonal Adjustment of Daily Data, D. Ladiray, J. Palate, G.L. Ma...IAOS 2018 - Seasonal Adjustment of Daily Data, D. Ladiray, J. Palate, G.L. Ma...
IAOS 2018 - Seasonal Adjustment of Daily Data, D. Ladiray, J. Palate, G.L. Ma...
StatsCommunications
 
Lemh1a2
Lemh1a2Lemh1a2
Lemh1a2
Lemh1a2Lemh1a2
R language Project report
R language Project reportR language Project report
R language Project report
Tianyue Wang
 
Objectives ApproachExpected Results.docx
Objectives ApproachExpected Results.docxObjectives ApproachExpected Results.docx
Objectives ApproachExpected Results.docx
amit657720
 
Objectives ApproachExpected Results.docx
Objectives ApproachExpected Results.docxObjectives ApproachExpected Results.docx
Objectives ApproachExpected Results.docx
vannagoforth
 
MFBLP Method Forecast for Regional Load Demand System
MFBLP Method Forecast for Regional Load Demand SystemMFBLP Method Forecast for Regional Load Demand System
MFBLP Method Forecast for Regional Load Demand System
CSCJournals
 
Standard Statistical Feature analysis of Image Features for Facial Images usi...
Standard Statistical Feature analysis of Image Features for Facial Images usi...Standard Statistical Feature analysis of Image Features for Facial Images usi...
Standard Statistical Feature analysis of Image Features for Facial Images usi...
Bulbul Agrawal
 
A PERFORMANCE EVALUATION OF A PARALLEL BIOLOGICAL NETWORK MICROCIRCUIT IN NEURON
A PERFORMANCE EVALUATION OF A PARALLEL BIOLOGICAL NETWORK MICROCIRCUIT IN NEURONA PERFORMANCE EVALUATION OF A PARALLEL BIOLOGICAL NETWORK MICROCIRCUIT IN NEURON
A PERFORMANCE EVALUATION OF A PARALLEL BIOLOGICAL NETWORK MICROCIRCUIT IN NEURON
ijdpsjournal
 
Pca seminar final report
Pca seminar final reportPca seminar final report
Robust Visual Tracking Based on Sparse PCA-L1
Robust Visual Tracking Based on Sparse PCA-L1Robust Visual Tracking Based on Sparse PCA-L1
Robust Visual Tracking Based on Sparse PCA-L1
csandit
 
16 ch ken black solution
16 ch ken black solution16 ch ken black solution
16 ch ken black solution
Krunal Shah
 
Statistical Model to Predict IPO Prices for Semiconductor
Statistical Model to Predict IPO Prices for SemiconductorStatistical Model to Predict IPO Prices for Semiconductor
Statistical Model to Predict IPO Prices for Semiconductor
Xuanhua(Peter) Yin
 
Six sigma pedagogy
Six sigma pedagogySix sigma pedagogy
Six sigma pedagogy
MallikarjunRaoPanaba
 
Six sigma
Six sigma Six sigma
Dimensionality reduction
Dimensionality reductionDimensionality reduction
Dimensionality reduction
Shatakirti Er
 

Similar to Climate Change in Portugal (20)

Climate Change Model
Climate Change ModelClimate Change Model
Climate Change Model
 
Forecasting_CO2_Emissions.pptx
Forecasting_CO2_Emissions.pptxForecasting_CO2_Emissions.pptx
Forecasting_CO2_Emissions.pptx
 
Statitical consulting project report
Statitical consulting project reportStatitical consulting project report
Statitical consulting project report
 
IRJET- Analysis of Crucial Oil Gas and Liquid Sensor Statistics and Productio...
IRJET- Analysis of Crucial Oil Gas and Liquid Sensor Statistics and Productio...IRJET- Analysis of Crucial Oil Gas and Liquid Sensor Statistics and Productio...
IRJET- Analysis of Crucial Oil Gas and Liquid Sensor Statistics and Productio...
 
IAOS 2018 - Seasonal Adjustment of Daily Data, D. Ladiray, J. Palate, G.L. Ma...
IAOS 2018 - Seasonal Adjustment of Daily Data, D. Ladiray, J. Palate, G.L. Ma...IAOS 2018 - Seasonal Adjustment of Daily Data, D. Ladiray, J. Palate, G.L. Ma...
IAOS 2018 - Seasonal Adjustment of Daily Data, D. Ladiray, J. Palate, G.L. Ma...
 
Lemh1a2
Lemh1a2Lemh1a2
Lemh1a2
 
Lemh1a2
Lemh1a2Lemh1a2
Lemh1a2
 
R language Project report
R language Project reportR language Project report
R language Project report
 
Objectives ApproachExpected Results.docx
Objectives ApproachExpected Results.docxObjectives ApproachExpected Results.docx
Objectives ApproachExpected Results.docx
 
Objectives ApproachExpected Results.docx
Objectives ApproachExpected Results.docxObjectives ApproachExpected Results.docx
Objectives ApproachExpected Results.docx
 
MFBLP Method Forecast for Regional Load Demand System
MFBLP Method Forecast for Regional Load Demand SystemMFBLP Method Forecast for Regional Load Demand System
MFBLP Method Forecast for Regional Load Demand System
 
Standard Statistical Feature analysis of Image Features for Facial Images usi...
Standard Statistical Feature analysis of Image Features for Facial Images usi...Standard Statistical Feature analysis of Image Features for Facial Images usi...
Standard Statistical Feature analysis of Image Features for Facial Images usi...
 
A PERFORMANCE EVALUATION OF A PARALLEL BIOLOGICAL NETWORK MICROCIRCUIT IN NEURON
A PERFORMANCE EVALUATION OF A PARALLEL BIOLOGICAL NETWORK MICROCIRCUIT IN NEURONA PERFORMANCE EVALUATION OF A PARALLEL BIOLOGICAL NETWORK MICROCIRCUIT IN NEURON
A PERFORMANCE EVALUATION OF A PARALLEL BIOLOGICAL NETWORK MICROCIRCUIT IN NEURON
 
Pca seminar final report
Pca seminar final reportPca seminar final report
Pca seminar final report
 
Robust Visual Tracking Based on Sparse PCA-L1
Robust Visual Tracking Based on Sparse PCA-L1Robust Visual Tracking Based on Sparse PCA-L1
Robust Visual Tracking Based on Sparse PCA-L1
 
16 ch ken black solution
16 ch ken black solution16 ch ken black solution
16 ch ken black solution
 
Statistical Model to Predict IPO Prices for Semiconductor
Statistical Model to Predict IPO Prices for SemiconductorStatistical Model to Predict IPO Prices for Semiconductor
Statistical Model to Predict IPO Prices for Semiconductor
 
Six sigma pedagogy
Six sigma pedagogySix sigma pedagogy
Six sigma pedagogy
 
Six sigma
Six sigma Six sigma
Six sigma
 
Dimensionality reduction
Dimensionality reductionDimensionality reduction
Dimensionality reduction
 

More from eurosigdoc acm

Blockchain e o Futuro do Setor Financeiro
Blockchain e o Futuro do Setor FinanceiroBlockchain e o Futuro do Setor Financeiro
Blockchain e o Futuro do Setor Financeiro
eurosigdoc acm
 
No code – Caso Prático no App Inventor - BroTrip
No code – Caso Prático no App Inventor - BroTripNo code – Caso Prático no App Inventor - BroTrip
No code – Caso Prático no App Inventor - BroTrip
eurosigdoc acm
 
The oracle problem nos smart contracts
The oracle problem nos smart contractsThe oracle problem nos smart contracts
The oracle problem nos smart contracts
eurosigdoc acm
 
Robotic process automation
Robotic process automation Robotic process automation
Robotic process automation
eurosigdoc acm
 
Robotic Process Automation: caso de estudo Delloite
Robotic Process Automation: caso de estudo DelloiteRobotic Process Automation: caso de estudo Delloite
Robotic Process Automation: caso de estudo Delloite
eurosigdoc acm
 
Projeção do Crowdfunding em Portugal: a plataforma ppl
Projeção do Crowdfunding em Portugal: a plataforma pplProjeção do Crowdfunding em Portugal: a plataforma ppl
Projeção do Crowdfunding em Portugal: a plataforma ppl
eurosigdoc acm
 
Implementação de uma aplicação em Power Apps – Low Code
Implementação de uma aplicação em Power Apps – Low CodeImplementação de uma aplicação em Power Apps – Low Code
Implementação de uma aplicação em Power Apps – Low Code
eurosigdoc acm
 
Proteção de dados e redes sociais
Proteção de dados e redes sociaisProteção de dados e redes sociais
Proteção de dados e redes sociais
eurosigdoc acm
 
CLOUD COMPUTING E SUSTENTABILIDADE EMPRESARIAL
CLOUD COMPUTING E SUSTENTABILIDADE EMPRESARIALCLOUD COMPUTING E SUSTENTABILIDADE EMPRESARIAL
CLOUD COMPUTING E SUSTENTABILIDADE EMPRESARIAL
eurosigdoc acm
 
CROWDFUNDING: IMPACTO DA GAMIFICAÇÃO NAS PLATAFORMAS DE CROWDFUNDING
CROWDFUNDING: IMPACTO DA GAMIFICAÇÃO NAS PLATAFORMAS DE CROWDFUNDINGCROWDFUNDING: IMPACTO DA GAMIFICAÇÃO NAS PLATAFORMAS DE CROWDFUNDING
CROWDFUNDING: IMPACTO DA GAMIFICAÇÃO NAS PLATAFORMAS DE CROWDFUNDING
eurosigdoc acm
 
Low code: O futuro do desenvolvimento de aplicações
Low code: O futuro do desenvolvimento de aplicaçõesLow code: O futuro do desenvolvimento de aplicações
Low code: O futuro do desenvolvimento de aplicações
eurosigdoc acm
 
Robotic Process Automation
Robotic Process AutomationRobotic Process Automation
Robotic Process Automation
eurosigdoc acm
 
Crowdsourcing: DEFINIÇÕES E APLICAÇÕES NA ÁREA DA SAÚDE
Crowdsourcing: DEFINIÇÕES E APLICAÇÕES NA ÁREA DA SAÚDECrowdsourcing: DEFINIÇÕES E APLICAÇÕES NA ÁREA DA SAÚDE
Crowdsourcing: DEFINIÇÕES E APLICAÇÕES NA ÁREA DA SAÚDE
eurosigdoc acm
 
Business Intelligence e o Desporto
Business Intelligence e o DesportoBusiness Intelligence e o Desporto
Business Intelligence e o Desporto
eurosigdoc acm
 
Blockchain
Blockchain Blockchain
Blockchain
eurosigdoc acm
 
Blockchain: viável ou em luta com o meio ambiente?
Blockchain: viável ou em luta com o meio ambiente?Blockchain: viável ou em luta com o meio ambiente?
Blockchain: viável ou em luta com o meio ambiente?
eurosigdoc acm
 
Cloud Computing e a sua Implementação na Educação no Contexto de Pandemia COV...
Cloud Computing e a sua Implementação na Educação no Contexto de Pandemia COV...Cloud Computing e a sua Implementação na Educação no Contexto de Pandemia COV...
Cloud Computing e a sua Implementação na Educação no Contexto de Pandemia COV...
eurosigdoc acm
 
Viabilidade das NFT’s a Longo Prazo
Viabilidade das NFT’s a Longo Prazo Viabilidade das NFT’s a Longo Prazo
Viabilidade das NFT’s a Longo Prazo
eurosigdoc acm
 
Outsystems e o Universo do Low-Code
Outsystems e o Universo do Low-CodeOutsystems e o Universo do Low-Code
Outsystems e o Universo do Low-Code
eurosigdoc acm
 
Erp
ErpErp

More from eurosigdoc acm (20)

Blockchain e o Futuro do Setor Financeiro
Blockchain e o Futuro do Setor FinanceiroBlockchain e o Futuro do Setor Financeiro
Blockchain e o Futuro do Setor Financeiro
 
No code – Caso Prático no App Inventor - BroTrip
No code – Caso Prático no App Inventor - BroTripNo code – Caso Prático no App Inventor - BroTrip
No code – Caso Prático no App Inventor - BroTrip
 
The oracle problem nos smart contracts
The oracle problem nos smart contractsThe oracle problem nos smart contracts
The oracle problem nos smart contracts
 
Robotic process automation
Robotic process automation Robotic process automation
Robotic process automation
 
Robotic Process Automation: caso de estudo Delloite
Robotic Process Automation: caso de estudo DelloiteRobotic Process Automation: caso de estudo Delloite
Robotic Process Automation: caso de estudo Delloite
 
Projeção do Crowdfunding em Portugal: a plataforma ppl
Projeção do Crowdfunding em Portugal: a plataforma pplProjeção do Crowdfunding em Portugal: a plataforma ppl
Projeção do Crowdfunding em Portugal: a plataforma ppl
 
Implementação de uma aplicação em Power Apps – Low Code
Implementação de uma aplicação em Power Apps – Low CodeImplementação de uma aplicação em Power Apps – Low Code
Implementação de uma aplicação em Power Apps – Low Code
 
Proteção de dados e redes sociais
Proteção de dados e redes sociaisProteção de dados e redes sociais
Proteção de dados e redes sociais
 
CLOUD COMPUTING E SUSTENTABILIDADE EMPRESARIAL
CLOUD COMPUTING E SUSTENTABILIDADE EMPRESARIALCLOUD COMPUTING E SUSTENTABILIDADE EMPRESARIAL
CLOUD COMPUTING E SUSTENTABILIDADE EMPRESARIAL
 
CROWDFUNDING: IMPACTO DA GAMIFICAÇÃO NAS PLATAFORMAS DE CROWDFUNDING
CROWDFUNDING: IMPACTO DA GAMIFICAÇÃO NAS PLATAFORMAS DE CROWDFUNDINGCROWDFUNDING: IMPACTO DA GAMIFICAÇÃO NAS PLATAFORMAS DE CROWDFUNDING
CROWDFUNDING: IMPACTO DA GAMIFICAÇÃO NAS PLATAFORMAS DE CROWDFUNDING
 
Low code: O futuro do desenvolvimento de aplicações
Low code: O futuro do desenvolvimento de aplicaçõesLow code: O futuro do desenvolvimento de aplicações
Low code: O futuro do desenvolvimento de aplicações
 
Robotic Process Automation
Robotic Process AutomationRobotic Process Automation
Robotic Process Automation
 
Crowdsourcing: DEFINIÇÕES E APLICAÇÕES NA ÁREA DA SAÚDE
Crowdsourcing: DEFINIÇÕES E APLICAÇÕES NA ÁREA DA SAÚDECrowdsourcing: DEFINIÇÕES E APLICAÇÕES NA ÁREA DA SAÚDE
Crowdsourcing: DEFINIÇÕES E APLICAÇÕES NA ÁREA DA SAÚDE
 
Business Intelligence e o Desporto
Business Intelligence e o DesportoBusiness Intelligence e o Desporto
Business Intelligence e o Desporto
 
Blockchain
Blockchain Blockchain
Blockchain
 
Blockchain: viável ou em luta com o meio ambiente?
Blockchain: viável ou em luta com o meio ambiente?Blockchain: viável ou em luta com o meio ambiente?
Blockchain: viável ou em luta com o meio ambiente?
 
Cloud Computing e a sua Implementação na Educação no Contexto de Pandemia COV...
Cloud Computing e a sua Implementação na Educação no Contexto de Pandemia COV...Cloud Computing e a sua Implementação na Educação no Contexto de Pandemia COV...
Cloud Computing e a sua Implementação na Educação no Contexto de Pandemia COV...
 
Viabilidade das NFT’s a Longo Prazo
Viabilidade das NFT’s a Longo Prazo Viabilidade das NFT’s a Longo Prazo
Viabilidade das NFT’s a Longo Prazo
 
Outsystems e o Universo do Low-Code
Outsystems e o Universo do Low-CodeOutsystems e o Universo do Low-Code
Outsystems e o Universo do Low-Code
 
Erp
ErpErp
Erp
 

Recently uploaded

Green Wealth Management - UBS A world of access and opportunuty
Green Wealth Management - UBS A world of access and opportunutyGreen Wealth Management - UBS A world of access and opportunuty
Green Wealth Management - UBS A world of access and opportunuty
adrianmaruntelu
 
A Comprehensive Guide on Cable Location Services Detections Method, Tools, an...
A Comprehensive Guide on Cable Location Services Detections Method, Tools, an...A Comprehensive Guide on Cable Location Services Detections Method, Tools, an...
A Comprehensive Guide on Cable Location Services Detections Method, Tools, an...
Aussie Hydro-Vac Services
 
原版制作(Manitoba毕业证书)曼尼托巴大学毕业证学位证一模一样
原版制作(Manitoba毕业证书)曼尼托巴大学毕业证学位证一模一样原版制作(Manitoba毕业证书)曼尼托巴大学毕业证学位证一模一样
原版制作(Manitoba毕业证书)曼尼托巴大学毕业证学位证一模一样
mvrpcz6
 
REPORT-PRESENTATION BY CHIEF SECRETARY, ANDAMAN NICOBAR ADMINISTRATION IN OA ...
REPORT-PRESENTATION BY CHIEF SECRETARY, ANDAMAN NICOBAR ADMINISTRATION IN OA ...REPORT-PRESENTATION BY CHIEF SECRETARY, ANDAMAN NICOBAR ADMINISTRATION IN OA ...
REPORT-PRESENTATION BY CHIEF SECRETARY, ANDAMAN NICOBAR ADMINISTRATION IN OA ...
pareeksulkash
 
Call Girls Dehradun +91-8094342248 Vip Call Girls Dehradun
Call Girls Dehradun +91-8094342248 Vip Call Girls DehradunCall Girls Dehradun +91-8094342248 Vip Call Girls Dehradun
Call Girls Dehradun +91-8094342248 Vip Call Girls Dehradun
teenagarg #v08
 
学校原版(unuk学位证书)英国牛津布鲁克斯大学毕业证硕士文凭原版一模一样
学校原版(unuk学位证书)英国牛津布鲁克斯大学毕业证硕士文凭原版一模一样学校原版(unuk学位证书)英国牛津布鲁克斯大学毕业证硕士文凭原版一模一样
学校原版(unuk学位证书)英国牛津布鲁克斯大学毕业证硕士文凭原版一模一样
ehfyqtu
 
Good Agricultural Practices Presentation PDF.pdf
Good Agricultural Practices Presentation PDF.pdfGood Agricultural Practices Presentation PDF.pdf
Good Agricultural Practices Presentation PDF.pdf
ronnelapilado23
 
21321321321sfsdfdsfsdfsdfsfddsfppt ai.pptx
21321321321sfsdfdsfsdfsdfsfddsfppt ai.pptx21321321321sfsdfdsfsdfsdfsfddsfppt ai.pptx
21321321321sfsdfdsfsdfsdfsfddsfppt ai.pptx
JustineGarcia32
 
BASIC CONCEPT OF ENVIRONMENT AND DIFFERENT CONSTITUTENET OF ENVIRONMENT
BASIC CONCEPT OF ENVIRONMENT AND DIFFERENT CONSTITUTENET OF ENVIRONMENTBASIC CONCEPT OF ENVIRONMENT AND DIFFERENT CONSTITUTENET OF ENVIRONMENT
BASIC CONCEPT OF ENVIRONMENT AND DIFFERENT CONSTITUTENET OF ENVIRONMENT
AmitKumar619042
 
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
xeexm
 
一比一原版美国丹佛大学毕业证(ud学位证)如何办理
一比一原版美国丹佛大学毕业证(ud学位证)如何办理一比一原版美国丹佛大学毕业证(ud学位证)如何办理
一比一原版美国丹佛大学毕业证(ud学位证)如何办理
43ekmxzp
 
快速办理(Calabria毕业证书)卡拉布里亚大学毕业证在读证明一模一样
快速办理(Calabria毕业证书)卡拉布里亚大学毕业证在读证明一模一样快速办理(Calabria毕业证书)卡拉布里亚大学毕业证在读证明一模一样
快速办理(Calabria毕业证书)卡拉布里亚大学毕业证在读证明一模一样
astuz
 
一比一原版美国亚利桑那大学毕业证(ua学位证)如何办理
一比一原版美国亚利桑那大学毕业证(ua学位证)如何办理一比一原版美国亚利桑那大学毕业证(ua学位证)如何办理
一比一原版美国亚利桑那大学毕业证(ua学位证)如何办理
lyurzi7r
 
Formulation of aramang baked products enriched with malunggay
Formulation of aramang baked products enriched with malunggayFormulation of aramang baked products enriched with malunggay
Formulation of aramang baked products enriched with malunggay
Open Access Research Paper
 
Mass Production of Trichogramma sp..pptx
Mass Production of Trichogramma sp..pptxMass Production of Trichogramma sp..pptx
Mass Production of Trichogramma sp..pptx
SwastikBhattacharjya
 
Emerging Earth Observation methods for monitoring sustainable food production
Emerging Earth Observation methods for monitoring sustainable food productionEmerging Earth Observation methods for monitoring sustainable food production
Emerging Earth Observation methods for monitoring sustainable food production
CIFOR-ICRAF
 
一比一原版(Glasgow毕业证)英国格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证)英国格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证)英国格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证)英国格拉斯哥大学毕业证如何办理
aonx8o5f
 
Notes on National Green Tribunal, Environmental laws
Notes on National Green Tribunal, Environmental lawsNotes on National Green Tribunal, Environmental laws
Notes on National Green Tribunal, Environmental laws
sforsidd
 
SOIL AND ITS FORMATION bjbhjbhvhvhjvhj .pptx
SOIL AND ITS FORMATION bjbhjbhvhvhjvhj .pptxSOIL AND ITS FORMATION bjbhjbhvhvhjvhj .pptx
SOIL AND ITS FORMATION bjbhjbhvhvhjvhj .pptx
anmolbansal1969
 
原版制作(UPSaclay毕业证书)巴黎萨克雷大学毕业证PDF成绩单一模一样
原版制作(UPSaclay毕业证书)巴黎萨克雷大学毕业证PDF成绩单一模一样原版制作(UPSaclay毕业证书)巴黎萨克雷大学毕业证PDF成绩单一模一样
原版制作(UPSaclay毕业证书)巴黎萨克雷大学毕业证PDF成绩单一模一样
astuz
 

Recently uploaded (20)

Green Wealth Management - UBS A world of access and opportunuty
Green Wealth Management - UBS A world of access and opportunutyGreen Wealth Management - UBS A world of access and opportunuty
Green Wealth Management - UBS A world of access and opportunuty
 
A Comprehensive Guide on Cable Location Services Detections Method, Tools, an...
A Comprehensive Guide on Cable Location Services Detections Method, Tools, an...A Comprehensive Guide on Cable Location Services Detections Method, Tools, an...
A Comprehensive Guide on Cable Location Services Detections Method, Tools, an...
 
原版制作(Manitoba毕业证书)曼尼托巴大学毕业证学位证一模一样
原版制作(Manitoba毕业证书)曼尼托巴大学毕业证学位证一模一样原版制作(Manitoba毕业证书)曼尼托巴大学毕业证学位证一模一样
原版制作(Manitoba毕业证书)曼尼托巴大学毕业证学位证一模一样
 
REPORT-PRESENTATION BY CHIEF SECRETARY, ANDAMAN NICOBAR ADMINISTRATION IN OA ...
REPORT-PRESENTATION BY CHIEF SECRETARY, ANDAMAN NICOBAR ADMINISTRATION IN OA ...REPORT-PRESENTATION BY CHIEF SECRETARY, ANDAMAN NICOBAR ADMINISTRATION IN OA ...
REPORT-PRESENTATION BY CHIEF SECRETARY, ANDAMAN NICOBAR ADMINISTRATION IN OA ...
 
Call Girls Dehradun +91-8094342248 Vip Call Girls Dehradun
Call Girls Dehradun +91-8094342248 Vip Call Girls DehradunCall Girls Dehradun +91-8094342248 Vip Call Girls Dehradun
Call Girls Dehradun +91-8094342248 Vip Call Girls Dehradun
 
学校原版(unuk学位证书)英国牛津布鲁克斯大学毕业证硕士文凭原版一模一样
学校原版(unuk学位证书)英国牛津布鲁克斯大学毕业证硕士文凭原版一模一样学校原版(unuk学位证书)英国牛津布鲁克斯大学毕业证硕士文凭原版一模一样
学校原版(unuk学位证书)英国牛津布鲁克斯大学毕业证硕士文凭原版一模一样
 
Good Agricultural Practices Presentation PDF.pdf
Good Agricultural Practices Presentation PDF.pdfGood Agricultural Practices Presentation PDF.pdf
Good Agricultural Practices Presentation PDF.pdf
 
21321321321sfsdfdsfsdfsdfsfddsfppt ai.pptx
21321321321sfsdfdsfsdfsdfsfddsfppt ai.pptx21321321321sfsdfdsfsdfsdfsfddsfppt ai.pptx
21321321321sfsdfdsfsdfsdfsfddsfppt ai.pptx
 
BASIC CONCEPT OF ENVIRONMENT AND DIFFERENT CONSTITUTENET OF ENVIRONMENT
BASIC CONCEPT OF ENVIRONMENT AND DIFFERENT CONSTITUTENET OF ENVIRONMENTBASIC CONCEPT OF ENVIRONMENT AND DIFFERENT CONSTITUTENET OF ENVIRONMENT
BASIC CONCEPT OF ENVIRONMENT AND DIFFERENT CONSTITUTENET OF ENVIRONMENT
 
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
 
一比一原版美国丹佛大学毕业证(ud学位证)如何办理
一比一原版美国丹佛大学毕业证(ud学位证)如何办理一比一原版美国丹佛大学毕业证(ud学位证)如何办理
一比一原版美国丹佛大学毕业证(ud学位证)如何办理
 
快速办理(Calabria毕业证书)卡拉布里亚大学毕业证在读证明一模一样
快速办理(Calabria毕业证书)卡拉布里亚大学毕业证在读证明一模一样快速办理(Calabria毕业证书)卡拉布里亚大学毕业证在读证明一模一样
快速办理(Calabria毕业证书)卡拉布里亚大学毕业证在读证明一模一样
 
一比一原版美国亚利桑那大学毕业证(ua学位证)如何办理
一比一原版美国亚利桑那大学毕业证(ua学位证)如何办理一比一原版美国亚利桑那大学毕业证(ua学位证)如何办理
一比一原版美国亚利桑那大学毕业证(ua学位证)如何办理
 
Formulation of aramang baked products enriched with malunggay
Formulation of aramang baked products enriched with malunggayFormulation of aramang baked products enriched with malunggay
Formulation of aramang baked products enriched with malunggay
 
Mass Production of Trichogramma sp..pptx
Mass Production of Trichogramma sp..pptxMass Production of Trichogramma sp..pptx
Mass Production of Trichogramma sp..pptx
 
Emerging Earth Observation methods for monitoring sustainable food production
Emerging Earth Observation methods for monitoring sustainable food productionEmerging Earth Observation methods for monitoring sustainable food production
Emerging Earth Observation methods for monitoring sustainable food production
 
一比一原版(Glasgow毕业证)英国格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证)英国格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证)英国格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证)英国格拉斯哥大学毕业证如何办理
 
Notes on National Green Tribunal, Environmental laws
Notes on National Green Tribunal, Environmental lawsNotes on National Green Tribunal, Environmental laws
Notes on National Green Tribunal, Environmental laws
 
SOIL AND ITS FORMATION bjbhjbhvhvhjvhj .pptx
SOIL AND ITS FORMATION bjbhjbhvhvhjvhj .pptxSOIL AND ITS FORMATION bjbhjbhvhvhjvhj .pptx
SOIL AND ITS FORMATION bjbhjbhvhvhjvhj .pptx
 
原版制作(UPSaclay毕业证书)巴黎萨克雷大学毕业证PDF成绩单一模一样
原版制作(UPSaclay毕业证书)巴黎萨克雷大学毕业证PDF成绩单一模一样原版制作(UPSaclay毕业证书)巴黎萨克雷大学毕业证PDF成绩单一模一样
原版制作(UPSaclay毕业证书)巴黎萨克雷大学毕业证PDF成绩单一模一样
 

Climate Change in Portugal

  • 1. CLIMATE CHANGE IN PORTUGAL Programming Techniques Group number 2 Catarina Pereira, 52919 Cristiana Correia, 48576 Mariana Canavarro, 48809 Tiago Pires, 48816
  • 2. SUMMARY 1. Literature review 2. Empirical work 4. Conclusion 2.1. Data context 2.2. Data collection 2.3. Data preparation 2.4. Exploring data 2.5. Data modelling 3. Results and discussing 2.6. Evaluation 2.7. Deployment
  • 3. 1. LITERATURE REVIEW • We studied the average temperature in Portugal for the past 50 years in Beja, Lisbon and Porto. • The increase in temperature is one of the most controversial issues in nowadays. • As climate slowly and gradually changes human race as a high capacity to adapt, but it’s not possible to predict the impact that it will have on our daily life’s, said Zivin and Neidell (2014).
  • 4. 2. EMPIRICAL WORK 2.1. Data context 1 Stationary Time Series Model (ARMA Model) Time process where mean, variance and autocorrelation remain constant over time. 2 Non Stationary Time Series Model (ARIMA Model) Time Series with trend and seasonality. Have no constant mean over time (average depends on time) or constant variance over time. 3 Seasonal Time Series Models (S-ARIMA Model) Time Series that contains seasonal phenomena that repeats itself over a regular period of time.
  • 5. 2.2. Data collection 2. EMPIRICAL WORK • Our sample were collected from the Climate Portal • We obtain data on the average temperature in 3 cities in Portugal: Beja, Lisboa and Porto • From January 1971 to December 2018 • In total 576 observations • The data came in a file in Excel format
  • 6. 2.3. Data preparation 2. EMPIRICAL WORK 1 2 3 Create 3 Python files, corresponding to the 3 cities we studied: Porto, Lisbon and Beja. Import the libraries we wanted to use, such as numpy, pandas, statsmodels.api, statsmodels.tsa and also matplotlib.pyplot. Define the variables: “dataset”, our main variable; “Data70” is the variable that represents the observations up to the last year (excluding). Define a correlation function (acf_pacf (x)) that will allow us to evaluate the stationarity of our model. 4
  • 7. 2.4. Exploring data 2. EMPIRICAL WORK We started plotting the original series chart to get a first visual idea of the behavior of the series. So we essentially check if it has a tendency, if the variance is constant and if it has seasonality. We can already see that the series does not have a marked trend and the variance does not seem constant. Right here we suspect that the series is not stationary. Figure 1. Original Serie
  • 8. 2.4. Exploring data 2. EMPIRICAL WORK Figure 2. ACF/PACF from original series Analyzing Figure 2 we can verify that the autocorrelation of the series does not slowly decay to zero nor disappear after a certain delay. The same goes for PACF. We conclude that the series is not stationary, so it needs transformations to become stationary and therefore can be modeled.
  • 9. 2.4. Exploring data 2. EMPIRICAL WORK Given the problems that make the series non-stationary, the non-constant variance and the seasonal component, we applied two usual techniques: • Logarithmization, so that the variance becomes constant; • Differentiation of order 12, to remove the autocorrelations caused by seasonality. Figure 3. Logarithmization and differentiation (order 12) Figure 4. ACF and PACF of figure 3
  • 10. 2.5. Data modelling 2. EMPIRICAL WORK • Since we have already made the necessary transformations so that our series is stationary, we now need to know the number of optimal parameters associated with seasonal and non-seasonal parts MA and AR, which best fit our data. Consequently we run the auto-arima function in python. • The model with the best information criterion is an S-ARIMA (1,0,2) * (0,1,1)12.
  • 11. 2.5. Evaluation 2. EMPIRICAL WORK The estimation of the model coefficients was performed based on the observations collected up to the last year of the sample, that is, with the variable we created “data70”. The model estimation result is given by the following output. Figure 5. Model estimation output 1 − 0,9732𝐵 (1 − 𝐵12 )𝑍𝑡 = (1 − 0,7088𝐵 − 0,1695𝐵2 )(1 − 0,8303𝐵12 )𝑎𝑡
  • 12. 2.6. Evaluation 2. EMPIRICAL WORK After estimating the model, we need to check if it has statistical properties that allow a good prediction. Figure 6. Model Residue Analysis
  • 13. 2.6. DEPLOYMENT 2. EMPIRICAL WORK Ex-post forecasting, which consists of “predicting” what has already happened to analyze forecasting behavior, a kind of training phase before we try to predict the future. Figure 7. Ex post forecasting for the last 12 sample observations Figure 8. Absolute error percentage
  • 14. 2.6. DEPLOYMENT 2. EMPIRICAL WORK Ex-Ante Forecasting, which consists of forecasting the data of the variable under study for a future moment. Figure 9. Ex-ante forecasting: predict the next 12 upcoming future
  • 15. 3. RESULTS AND DISCUSSING Figure 10. Porto’s Original Series Figure 11. Lisbon’s Original Series Figure 12. Beja’s Original Series Beja is the city with higher amplitude and higher temperatures, compared with Porto and Lisbon. Figure 13. Porto’s moving average (MA) and moving standard deviation (MSD) Figure 14. Lisbon’s MA and MSD Figure 15. Beja’s MA and MSD In all three cities the average temperature has been increasing, the average and the standard deviation have demonstrated a small but noticeable raise during our time frame.
  • 16. 3. RESULTS AND DISCUSSING Analysing the three cities in discussion we can say the S-ARIMA (1,1,1)(0,1,1,12) did a good prediction of all time series. Figure 16. Porto’s Ex-post forecasting Figure 17. Lisbon’s Ex-post forecasting Figure 18. Beja’s Ex-post forecasting
  • 17. 3. RESULTS AND DISCUSSING The amplitude of temperature will continue to decrease, especially in Porto city, despite the increase in average temperature. Lisbon will apparently maintain its amplitude of temperate and average temperature. And finally, Faro will remain the city with the most observed amplitude followed by the slight increase of minimum temperatures. Figure 19. Porto’s Ex-ante forecasting Figure 20. Lisbon’s Ex-ante forecasting Figure 21. Beja’s Ex-ante forecasting
  • 19. All models are wrong, but some are useful. George E. P. Box “ ”