Open app

Tutorials

Step-by-step walkthroughs, mostly in R, of pulling, transforming and charting EconData data.

Posts

Plotting QLFS mean earnings by education

A minimal R example that pulls mean monthly earnings by highest level of education from the QLFS, inflates them to the latest CPI month, and plots them as a bar chart.

Plotting the Spatial Tax Panel from EconData

How to put EconData’s spatial data on a map: this R tutorial joins Spatial Tax Panel data to the Municipal Demarcation Board’s ward shapefile and maps median income by district.

Full Quarterly Bulletin Vintage History

The SARB Quarterly Bulletin’s full vintage history, from 2004Q3 to the latest quarter, is now free on EconData in version 1.1.4. This post covers how vintages are named, the updates between bulletins, and comparing series across vintages.

Major changes with EconDataR version 4

Version 4 of econdatar makes read_dataset() return a single table by default instead of a list, which can break existing code. This post covers the new defaults, selecting series and dates, read_release() and installing a specific version.

Fast EconDataR Downloads

Use the series_key argument of read_dataset() to download only the series you need, which speeds up scripts that run repeatedly on large dataflows. Includes the key syntax and a speed test.

Analysing CPI Weights data

Jan-Hendrik imports the CPI Weights data into R with econdatar, then cleans, validates and plots the division-level weights from the 1970 and 2019 vintages.

How do I convert data to a lower frequency in EconData?

Convert downloaded data to a lower frequency in the EconData Excel add-in, for example from quarterly to annual, by choosing the frequency and clicking Recalculate.

How to append all the National Treasury dataflows together

EconData splits National Treasury data into several dataflows to keep downloads small. This post gives an R template for binding them back into one dataset, using the section and table dimensions of the series keys.

Working with EconData’s Public Finance Data

Use econdatar with National Treasury budget data to build three charts in R: an area chart of government debt composition, a hairy line plot of debt across budget releases, and a stacked bar chart of transfers to provinces.

Using EconData’s R package for forecasting and automation

A video showing how to load headline CPI with EconData’s R package, plot it and produce a forecast. The R script is in a companion post.

EconData Excel Plugin installation

A video showing how to install and use the EconData Excel add-in.

Introducing our Excel Add-in

Announcing the EconData Excel add-in, which brings up-to-date South African economic data into Excel and converts it to lower frequencies or growth rates. This post walks through installing it and importing headline CPI.

Software investment in the banking industry

South African banks’ software assets grew tenfold between 2008 and 2022. This tutorial shows how to automate downloading any BA900 line item in R, with tips for data wrangling.

Over 12 million data points and counting

An introduction to the SARB’s BA900 bank-level balance sheet data on EconData, with an R example that reports on mortgage lending by the four largest banks.

Making use of vintage data

Data vintages show what was known at the time. This tutorial pulls every release of StatsSA’s GDP from EconData and builds a real-time series of GDP growth in R.

Automating a simple model

Build a naïve automated forecasting model in R: load headline CPI from EconData, let the forecast package choose an ARIMA model, and refresh the forecast by rerunning the script.

Charting and automation

Import data into R with econdatar and build a ggplot chart of year-on-year growth in total loans and advances, as a template you can rerun whenever you want the latest data.

Looking for data?

A walkthrough of the EconData app’s query menu: choosing a category, dataset, release and data key to find the series you want.