Plot the RBA cash rate with matplotlib

Pull the full series and chart it in 10 lines of Python.

Steps

  1. 1Pull the series.
  2. 2Convert dates with pandas.to_datetime.
  3. 3Plot with matplotlib.

Code

cURL
curl https://api.ausdata.io/v1/data/rba/f1.1 \
  -H "Authorization: Bearer YOUR_KEY"
Python
import requests
r = requests.get(
    "https://api.ausdata.io/v1/data/rba/f1.1",
    headers={"Authorization": "Bearer YOUR_KEY"},
)
print(r.json())
JavaScript
const r = await fetch("https://api.ausdata.io/v1/data/rba/f1.1", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());

Watch out for

  • Use step plot, not line. The cash rate is a step function.

Related

Try it now

500 free calls per month. No credit card.

Get a free API key