How to import raw CSV from github

Hi all,
if I import this CSV


d3 = require("d3-fetch@1")
urla = ""
data = d3.csv(urla)

I have this error data = TypeError: Failed to fetch.

If I use jsdelivr URL[1], for the same file I have non error.

What’s the way to import a raw github csv URL in observarble?

Thank you


It looks like GitHub disallows fetching data directly from repositories (through its CORS policy), but allows it for gists. I uploaded the data to a new gist; here’s an example that loads it:

Edit: The URL you provided actually redirects to a URL, which does allow CORS requests. I updated the example.


If you open in a browser, it will redirect to, which can be used in observable because the Access-Control-Allow-Origin header is set to *

Edit: didn’t see @yurivish’s Edit


Thank you @severo and @yurivish

1 Like