The CBRT package includes functions for finding, and downloading data from the Central Bank of the Republic of Turkey’s database.
The CBRT database covers more than 22,000 time series variables.
You can install the package from the source by using the following command (the CBRT package depends on the data.table package.):
install.packages("http://users.metu.edu.tr/etaymaz/files/CBRT_0.1.0.tar.gz",
repos = NULL, type = "source")
You may also install it from GitHub. Install the the devtools package if not installed, then
library(devtools)
install_github("etaymaz/CBRT")
## Loading required package: data.table
Please kindly note that you need a key to download data from the CBRT’s database. To get the key, register at the CBRT’s Electronic Data Delivery System. Registration is free of charge and takes only a few minutes.
All data series (variables) are classified into data groups, and data groups into data categories. There are 24 data categories (including the archieved ones), 323 data groups, and 22,243 data series.
To find variables, use the searchCBRT
function:
searchCBRT(c("production", "labor", "labour"))
## groupCode
## 1: bie_toisso
## 2: bie_rkbigmy
## 3: bie_tsny2010
## 4: bie_urkisi10
## 5: bie_ursaat10
## 6: bie_ysivils2
## 7: bie_imurk
## 8: bie_imurkk
## 9: bie_imurkkr
## 10: bie_imurkv
## 11: bie_imurs
## 12: bie_imursu
## 13: bie_imursur
## 14: bie_imursv
## 15: bie_rkbigm
## 16: bie_rssivil
## 17: bie_rssivily
## 18: bie_sivilis2
## 19: bie_tsanay
## 20: bie_tsny05
## 21: bie_tsny05n2
## 22: bie_urimkap
## 23: bie_urkisi
## 24: bie_ursaat
## 25: bie_ursan97
## 26: bie_ursanayi2
## 27: bie_ursany
## 28: bie_urucret
## 29: bie_urur3ay
## 30: bie_ururet2
## 31: bie_ururetim4
## 32: bie_uroto
## 33: bie_sanayrev4
## 34: bie_ursaat15
## 35: bie_urkisi15
## 36: bie_tisguc
## 37: bie_altinadt
## 38: bie_altingr
## groupCode
## groupName
## 1: Establishments and Labourers Covered By Collective Bargaining Strikes and Lock Outs (Ministry of Labor and Social Security)(Number)(Archive)
## 2: Exchange Rates-Unit Labor Cost-Developed Countries Based Real Effective Exchange Rate (2003=100)(Archive)
## 3: Industrial Production Index (2010=100)(TURKSTAT)(NACE REV.2)(Archive)
## 4: Index of Production per Person Employed (2010=100)(Ministry of Industry and Technology)(Archive)
## 5: Index of Production per Hour Worked (2010=100)(Ministry of Industry and Technology)(Archive)
## 6: Labour Force Status by non-Institutional Population (By the New Population Projections)(TURKSTAT)(Thousand)
## 7: Index of Production Workers Working in Manufacturing Industry (1997=100)(TURKSTAT)(Archive)
## 8: Index of Earning Per Production Worker in Manufacturing Industry (1997=100)(TURKSTAT)(Archive)
## 9: Index of Real Earning Per Production Worker in Manufacturing Industry (1997=100)(TURKSTAT)(Archive)
## 10: Index of Partial Productivity Per Production Worker (1997=100)(TURKSTAT)(Archive)
## 11: Index of Production Hours Worked In Manufacturing Industry (1997=100)(TURKSTAT)(Archive)
## 12: Index of Wages Per Production Hour Worked In Manufacturing Industry (1997=100)(TURKSTAT)(Archive)
## 13: Index of Real Wages Per Production Hour Worked In Manufacturing Industry (1997=100)(TURKSTAT)(Archive)
## 14: Index of Partial Productivity Per Production Hour Worked (1997=100)(TURKSTAT)(Archive)
## 15: Exchange Rates-(Previous) Unit Labor Cost Based Real Effective Exchange Rate (2003=100)(Archive)
## 16: Non-Institutional Civilian Population by Labour Force Status (TURKSTAT)(Thousand)(Archive)
## 17: Non-Institutional Civilian Population by Labour Force Status (New Series)(TURKSTAT) Thousand)(Archive)
## 18: Non-Institutional Civilian Population by labour Force Status (After ABPRS)(TURKSAT)(Thousand)(Archive)
## 19: Industrial Production Index (1997=100)(TURKSTAT)(Archive)
## 20: Industrial Production Index (2005=100)(TURKSTAT)(NACE REV.1.1)(Archive)
## 21: Industrial Production Index (2005=100)(TURKSTAT)(NACE REV.2)(Archive)
## 22: Capacity Utilization Rates In the Manufacturing Industry-Weighted By Production Value ISIC REV.3 (TURKSTAT)(%)(Archive)
## 23: Index of Production per Person Employed (2005=100) Ministry of Science, Industry and Technology)(Archive)
## 24: Index of Production per Hour Worked (2005=100) Ministry of Science, Industry and Technology)(Archive)
## 25: Production Amounts of Selected Industrial Goods (TURKSTAT)(Archive)
## 26: Production of Selected Industrial Goods (TURKSTAT, SEKA=Cellulose and Paper Industry)(Archive)
## 27: Production Amounts of Selected Industrial Goods (TURKSTAT)(Archive)
## 28: Payments to Production Workers in Manufacturing Industry (TURKSTAT)(Archive)
## 29: Industrial Production Index (1997=100)(TURKSTAT)(Archive)
## 30: Capacity Utilization Rates In the Manufacturing Industry-Weighted By Production Value ISIC REV.3 (TURKSTAT) %)(Archive)
## 31: Industrial Production Index (1992=100)(TURKSTAT)(Archive)
## 32: Total Cars Production (AMA=Automotive Manufacturers Association)
## 33: Industrial Production Index (2015=100)(TURKSTAT)
## 34: Index of Production per Hour Worked (2015=100)(Ministry of Industry and Technology)
## 35: Index of Production per Person Employed (2015=100)(Ministry of Industry and Technology)
## 36: Basic Labour Force Indicators (TURKSTAT)(In thousands,15+age)
## 37: Republican Gold Demand _ Production Amount(Mint) (Pieces)
## 38: Republican Gold Demand _ Production Amount(Mint) (Gram)
## groupName
searchCBRT(c("production", "labor", "labour"), field = "series")
## seriesCode
## 1: TP.IYA.CDUR2.S08.C
## 2: TP.IYA.CNDU2.S08.C
## 3: TP.IYA.CONS2.S08.C
## 4: TP.IYA.FOBE2.S08.C
## 5: TP.IYA.INTM2.S08.C
## ---
## 504: TP.UR.36.U07.TOP
## 505: TP.UR4.U04
## 506: TP.RS.YAA03
## 507: TP.RS.YAA09
## 508: TP.RS.YAA13
## seriesName
## 1: 8.(SHORTAGE OF LABOUR FORCE) What main factors are currently limiting your production? Rank according to degree of importance.
## 2: 8.(SHORTAGE OF LABOUR FORCE) What main factors are currently limiting your production? Rank according to degree of importance.
## 3: 8.(SHORTAGE OF LABOUR FORCE) What main factors are currently limiting your production? Rank according to degree of importance.
## 4: 8.(SHORTAGE OF LABOUR FORCE) What main factors are currently limiting your production? Rank according to degree of importance.
## 5: 8.(SHORTAGE OF LABOUR FORCE) What main factors are currently limiting your production? Rank according to degree of importance.
## ---
## 504: Manufacture of Furniture N.E.C.-Other Payments For Production Workers (Million TRY)(Total)(Archive)
## 505: Crude petroleum and natural gas production (Archive)
## 506: Labour force(Thousand)
## 507: Labour force participation rate (%)
## 508: Not in labour force(Thousand)
## groupCode
## 1: bie_cdur2
## 2: bie_cndu2
## 3: bie_cons2
## 4: bie_fobe2
## 5: bie_intm2
## ---
## 504: bie_urucret
## 505: bie_ururetim4
## 506: bie_ysivils2
## 507: bie_ysivils2
## 508: bie_ysivils2
## groupName
## 1: Business Survey-Durable Consumer Goods (Weighted-NACE REV.2)-Central Bank of Turkey (%)
## 2: Business Survey-Non-durable Consumer Goods (Weighted-NACE REV.2)-Central Bank of Turkey (%)
## 3: Business Survey-Consumer Goods (Weighted-NACE REV.2)-Central Bank of Turkey (%)
## 4: Business Survey-Food & Beverages (Weighted-NACE REV.2)-Central Bank of Turkey (%)
## 5: Business Survey-Intermediate Goods (Weighted-NACE REV.2)-Central Bank of Turkey (%)
## ---
## 504: Payments to Production Workers in Manufacturing Industry (TURKSTAT)(Archive)
## 505: Industrial Production Index (1992=100)(TURKSTAT)(Archive)
## 506: Labour Force Status by non-Institutional Population (By the New Population Projections)(TURKSTAT)(Thousand)
## 507: Labour Force Status by non-Institutional Population (By the New Population Projections)(TURKSTAT)(Thousand)
## 508: Labour Force Status by non-Institutional Population (By the New Population Projections)(TURKSTAT)(Thousand)
searchCBRT(c("production", "labor", "labour"), tags = TRUE)
## seriesCode
## 1: TP.SANAYREV4.Y1
## 2: TP.SANAYREV4.Y2
## 3: TP.SANAYREV4.Y3
## 4: TP.SANAYREV4.Y4
## 5: TP.SANAYREV4.Y5
## ---
## 241: TP.UREN.S33.2015
## 242: TP.UREN.S34.2015
## 243: TP.UREN.S35.2015
## 244: TP.UREN.S36.2015
## 245: TP.UREN.S37.2015
## seriesName
## 1: Total industry
## 2: IG -Intermediate goods
## 3: DCG-Durable consumer goods
## 4: NDCG-Non-durable consumer goods
## 5: NRG-Energy
## ---
## 241: 29-Manufacture of motor vehicles, trailers and semi trailers
## 242: 30-Manufacture of other transport equipment
## 243: 31-Manufacture of furniture
## 244: 32-Other manufacturing
## 245: 33-Repair and installation of machinery and equipment
## groupCode
## 1: bie_sanayrev4
## 2: bie_sanayrev4
## 3: bie_sanayrev4
## 4: bie_sanayrev4
## 5: bie_sanayrev4
## ---
## 241: bie_ursaat15
## 242: bie_ursaat15
## 243: bie_ursaat15
## 244: bie_ursaat15
## 245: bie_ursaat15
## groupName
## 1: Industrial Production Index (2015=100)(TURKSTAT)
## 2: Industrial Production Index (2015=100)(TURKSTAT)
## 3: Industrial Production Index (2015=100)(TURKSTAT)
## 4: Industrial Production Index (2015=100)(TURKSTAT)
## 5: Industrial Production Index (2015=100)(TURKSTAT)
## ---
## 241: Index of Production per Hour Worked (2015=100)(Ministry of Industry and Technology)
## 242: Index of Production per Hour Worked (2015=100)(Ministry of Industry and Technology)
## 243: Index of Production per Hour Worked (2015=100)(Ministry of Industry and Technology)
## 244: Index of Production per Hour Worked (2015=100)(Ministry of Industry and Technology)
## 245: Index of Production per Hour Worked (2015=100)(Ministry of Industry and Technology)
The package contains the lists of all data categories, data groups, and data series, as of 26 January 2019. You can update the lists by the following commands:
allCBRTCategories <- getAllCategories()
allCBRTGroups <- getAllGroups()
allCBRTSeries <- getAllSeries()
After identifying the data group or data series, you can get some information about the data by showGroupInfo
function:
showGroupInfo("bie_apifon")
## Code
## 1: cid
## 2: groupCode
## 3: groupName
## 4: freq
## 5: source
## 6: sourceLink
## 7: note
## Variable
## 1: 1
## 2: bie_apifon
## 3: CBRT Net Funding (Business, Million TRY) and Weighted Average Funding Cost of th
## 4: 2 (Work day)
## 5: CBRT
## 6:
## 7:
## * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
## seriesCode
## 1: TP.APIFON1.IHA
## 2: TP.APIFON1.KOT.A
## 3: TP.APIFON1.KOT.B
## 4: TP.APIFON1.KOT.C
## 5: TP.APIFON1.KOT.T
## 6: TP.APIFON1.TOP
## 7: TP.APIFON2.IHA
## 8: TP.APIFON2.KOT
## 9: TP.APIFON2.TOP
## 10: TP.APIFON3
## 11: TP.APIFON4
## seriesName aggMethod
## 1: A1.Funding Through Auction last
## 2: A2a.BIST O/N Repo, Quotation Repo, Primary Dealer Repo last
## 3: A2b.TRY Deposit last
## 4: A2c.LON Deposit, LON Repo last
## 5: A2.Total Funding Via Quotation last
## 6: A.Total Funding (A1+A2) last
## 7: B1.Sterilization Through Auction last
## 8: B2.Sterilization Through Quotation last
## 9: B.Total Sterilization (B1+B2) last
## 10: CBRT Net Funding (A-B) last
## 11: Weighted Average Cost of the CBRT Funding last
If you want to get only names of series in a data group, use the following command:
showSeriesNames("bie_apifon")
## seriesCode
## 1: TP.APIFON1.IHA
## 2: TP.APIFON1.KOT.A
## 3: TP.APIFON1.KOT.B
## 4: TP.APIFON1.KOT.C
## 5: TP.APIFON1.KOT.T
## 6: TP.APIFON1.TOP
## 7: TP.APIFON2.IHA
## 8: TP.APIFON2.KOT
## 9: TP.APIFON2.TOP
## 10: TP.APIFON3
## 11: TP.APIFON4
## seriesName aggMethod
## 1: A1.Funding Through Auction last
## 2: A2a.BIST O/N Repo, Quotation Repo, Primary Dealer Repo last
## 3: A2b.TRY Deposit last
## 4: A2c.LON Deposit, LON Repo last
## 5: A2.Total Funding Via Quotation last
## 6: A.Total Funding (A1+A2) last
## 7: B1.Sterilization Through Auction last
## 8: B2.Sterilization Through Quotation last
## 9: B.Total Sterilization (B1+B2) last
## 10: CBRT Net Funding (A-B) last
## 11: Weighted Average Cost of the CBRT Funding last
You can download either one or more data series you specified, or all data series in a data group.
To download individual data series, use the getDataSeries
function:
mySeries <- getDataSeries("TP.D1TOP", CBRTKey = xxxxxx)
mySeries <- getDataSeries(c("TP.D1TOP", "TP.D2HAZ", "TP.D4TCMB"), CBRTKey = xxxxxx)
mySeries <- getDataSeries(c("TP.D1TOP", "TP.D2HAZ", "TP.D4TCMB", CBRTKey = xxxxxx,
startDate="01-01-2010"))
To download all data series in a group, use the getDataGroup
function:
myData <- getDataGroup("bie_dbafod")
If you create an object called myCBRTKey in R session to store your CBRT key, you do not need to define it for downloading:
myCBRTKey <-
your-key
Then,
mySeries <- getDataSeries("TP.D1TOP")
mySeries <- getDataSeries(c("TP.D1TOP", "TP.D2HAZ", "TP.D4TCMB"))
mySeries <- getDataSeries(c("TP.D1TOP", "TP.D2HAZ", "TP.D4TCMB", startDate="01-01-2010"))
myData <- getDataGroup("bie_dbafod")
You can also specify the frequency and the aggregation method for the series to be downloaded.
The freq
parameter defines the frequency of the data. If you do not define any frequency, the default frequency will be used.
The aggType
paremeter defines the method to be used to aggregate data series from high frequency to low frequency (for example, weekly data to monthly data). If no aggregation method is defined, the default will be used. (For the default values, use the showGroupInfo
function.)
For example, if you define monthly frequency for weekly data, and “sum” as the aggregation method, then the monthly totals will be returned. Since a data group includes more than one series, the getDataGroup
function does not have any aggType
parameter, and it aggregates data series by using their default aggregation method.
The following frequencies are defined (from high frequency to low frequency):
1
Day2
Work day3
Week4
Biweekly5
Month6
Quarter7
Six months8
YearThe following aggregation methods are available:
avg
Average valuefirst
First observationlast
Last observationmax
Maximum valuemin
Minimum valuesum
SumThe myData object is in data.table and data.frame classes, and it includes a time variable, and data series. The time variable will be either in date
or numeric
format depending on its frequency.
Visit R-Bloggers site about content contributed by more than 750 bloggers who write about R.
Visit R Weekly site for current news on R, R packages, and R events.
Comments and suggestions
I would appreciate your comments, suggestions, and bug reports. Please contact me by e-mail.