Photo Credit: Pixabay

A Comparison of G7 Countries House Price Movement

Python, FRED, Economic Data, Housing Price

Federal Reserve Economic Data (FRED) is an online database maintained by the Federal Reserve Bank of St. Louis that provides over 800,000 economic data series from more than 100 public and proprietary sources.

With FRED API key, you can use any programming language that can parse XML or JSON to query FRED data free of charge.

In this post, we will write Python code to retrieve and compare G7 countries’ housing price movement data for the past over 50 years.

To get started.

The Data

We now have what we need. Let’s go fetch the data.

The series id for “Real Residential Property Prices for Canada” is “QCAR628BIS”, the series start date is “1970–01–01” and end date is “2021–10–01”.
Table 1
Figure 1

Here we have Real Residential Property Prices data for Canada from 1970–01–01 to 2021–10–01.

With the information we have, now we are going to fetch all G7 countries housing data.
Table 2

In this series, FRED has the housing data for 51 countries. We will need G7 countries.
Table 3
Table 4

The last step is to add a “country” column.
Table 5
Figure 2

G7 countries house prices’ long-term trend is mixed. Canada has significant appreciated over the long period of time, and the UK has been in a “weak” property market over the past 10 years. While Italy is trending down. The U.S housing market is still recovering from its “bubble”.

Jupyter notebook can be found on Github. Enjoy the rest of the week!

Sources: National sources, BIS Residential Property Price database,




Changing the world, one post at a time. Sr Data Scientist, Toronto Canada.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Microbial Surveillance: How It Works & Why It’s Important

Hypothesis Testing — More than p-value

Self-service Business Intelligence, Powered by dbt

How to Make Stunning Interactive Maps with Python and Folium in Minutes

Web Scraping News with 4 lines using Python


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Susan Li

Susan Li

Changing the world, one post at a time. Sr Data Scientist, Toronto Canada.

More from Medium

Diving into GCP’s BigQuery ML & AutoML Tables with Covid19 Big Data

How to build a Medical AI/ML Application on Kubernetes

Running ML Pipelines on Kubeflow on GCP

A generalized end to end approach to regression problems using DNNs and Bigquery