connecting to DKAN API and/or CORS

It looks like the ADB doesn’t serve CORS headers, but you can use a CORS proxy like this:

metadata = fetch('https://cors-anywhere.herokuapp.com/https://data.adb.org/api/3/action/package_show?id=08c793eb-acd6-4840-9172-139907cbd784').then(res => res.json())

As far as I can tell, they only serve metadata following the DKAN API. To do interesting stuff with the data, you’ll probably want to fetch the CSV files, e.g. with d3.csv:

d3 = require('d3@5')
basic_stats = d3.csv('https://cors-anywhere.herokuapp.com/https://data.adb.org/sites/default/files/basic-statistics-2019_1.csv')
1 Like