Turk Hava Yolları
library(quantmod)
## Zorunlu paket yükleniyor: xts
## Zorunlu paket yükleniyor: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
## Zorunlu paket yükleniyor: TTR
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
getSymbols("THYAO.IS")
## 'getSymbols' currently uses auto.assign=TRUE by default, but will
## use auto.assign=FALSE in 0.5-0. You will still be able to use
## 'loadSymbols' to automatically load data. getOption("getSymbols.env")
## and getOption("getSymbols.auto.assign") will still be checked for
## alternate defaults.
##
## This message is shown once per session and may be disabled by setting
## options("getSymbols.warning4.0"=FALSE). See ?getSymbols for details.
## Warning: THYAO.IS contains missing values. Some functions will not work if
## objects contain missing values in the middle of the series. Consider using
## na.omit(), na.approx(), na.fill(), etc to remove or replace them.
## [1] "THYAO.IS"
dim(THYAO.IS)
## [1] 3904 6
head(THYAO.IS)
## THYAO.IS.Open THYAO.IS.High THYAO.IS.Low THYAO.IS.Close
## 2007-01-05 0.779862 0.805223 0.773521 0.798883
## 2007-01-08 0.779862 0.798883 0.779862 0.786202
## 2007-01-09 0.792542 0.792542 0.773521 0.779862
## 2007-01-10 0.773521 0.805223 0.773521 0.798883
## 2007-01-11 0.824244 0.855946 0.824244 0.843265
## 2007-01-12 0.855946 0.862286 0.843265 0.843265
## THYAO.IS.Volume THYAO.IS.Adjusted
## 2007-01-05 31381816 0.736275
## 2007-01-08 8447107 0.724588
## 2007-01-09 11883491 0.718745
## 2007-01-10 11575243 0.736275
## 2007-01-11 11341651 0.777179
## 2007-01-12 13076897 0.777179
tail(THYAO.IS)
## THYAO.IS.Open THYAO.IS.High THYAO.IS.Low THYAO.IS.Close
## 2022-02-18 29.24 29.60 28.64 29.40
## 2022-02-21 29.90 30.04 28.92 29.44
## 2022-02-22 28.58 29.18 28.28 28.88
## 2022-02-23 29.08 29.18 28.08 28.08
## 2022-02-24 25.30 25.90 25.28 25.28
## 2022-02-25 25.16 27.54 23.92 27.30
## THYAO.IS.Volume THYAO.IS.Adjusted
## 2022-02-18 133787733 29.40
## 2022-02-21 177077000 29.44
## 2022-02-22 140227591 28.88
## 2022-02-23 108544470 28.08
## 2022-02-24 58637916 25.28
## 2022-02-25 255281231 27.30
chartSeries(THYAO.IS, theme="white")

Apple
library(quantmod)
getSymbols("AAPL")
## [1] "AAPL"
dim(AAPL)
## [1] 3815 6
head(AAPL)
## AAPL.Open AAPL.High AAPL.Low AAPL.Close AAPL.Volume AAPL.Adjusted
## 2007-01-03 3.081786 3.092143 2.925000 2.992857 1238319600 2.562706
## 2007-01-04 3.001786 3.069643 2.993571 3.059286 847260400 2.619587
## 2007-01-05 3.063214 3.078571 3.014286 3.037500 834741600 2.600933
## 2007-01-08 3.070000 3.090357 3.045714 3.052500 797106800 2.613777
## 2007-01-09 3.087500 3.320714 3.041071 3.306071 3349298400 2.830903
## 2007-01-10 3.383929 3.492857 3.337500 3.464286 2952880000 2.966379
tail(AAPL)
## AAPL.Open AAPL.High AAPL.Low AAPL.Close AAPL.Volume AAPL.Adjusted
## 2022-02-17 171.03 171.91 168.47 168.88 69589300 168.88
## 2022-02-18 169.82 170.54 166.19 167.30 82614200 167.30
## 2022-02-22 164.98 166.69 162.15 164.32 91162800 164.32
## 2022-02-23 165.54 166.15 159.75 160.07 90009200 160.07
## 2022-02-24 152.58 162.85 152.00 162.74 141147500 162.74
## 2022-02-25 163.84 165.12 160.87 164.85 91881700 164.85
chartSeries(AAPL, theme="white")

Consumer Price Index: All Items for Turkey
getSymbols("TURCPIALLMINMEI",src="FRED")
## [1] "TURCPIALLMINMEI"
## [1] "TURCPIALLMINMEI"
chartSeries(TURCPIALLMINMEI,theme="white")

Current surplus of government enterprises
getSymbols("A108RC1Q027SBEA",src="FRED")
## [1] "A108RC1Q027SBEA"
## [1] "A108RC1Q027SBEA"
chartSeries(A108RC1Q027SBEA,theme="white")

Renewable energy consumption (% of total final energy consumption)
library(WDI)
df = WDI(indicator='EG.FEC.RNEW.ZS', country=c('UK','TR','US'), start=1990, end=2018)
## Warning in WDI(indicator = "EG.FEC.RNEW.ZS", country = c("UK", "TR", "US"), :
## Please use ISO-2, ISO-3, or World Bank regional codes. Some of the country codes
## that you requested are invalid: UK
head(df)
## iso2c country EG.FEC.RNEW.ZS year
## 1 TR Turkey 11.8740 2018
## 2 TR Turkey 11.4030 2017
## 3 TR Turkey 13.2256 2016
## 4 TR Turkey 13.3374 2015
## 5 TR Turkey 11.5133 2014
## 6 TR Turkey 13.7954 2013
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:xts':
##
## first, last
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
Forest area
library(WDI)
df = WDI(indicator='AG.LND.FRST.K2', country=c('UK','TR','GER'), start=1990, end=2020)
## Warning in WDI(indicator = "AG.LND.FRST.K2", country = c("UK", "TR", "GER"), :
## Please use ISO-2, ISO-3, or World Bank regional codes. Some of the country codes
## that you requested are invalid: UK, GER
head(df)
## iso2c country AG.LND.FRST.K2 year
## 1 TR Turkey 222203.6 2020
## 2 TR Turkey 220643.6 2019
## 3 TR Turkey 219083.6 2018
## 4 TR Turkey 217524.6 2017
## 5 TR Turkey 216303.0 2016
## 6 TR Turkey 216303.0 2015