Short answer: Web Service.
Basically, you'd want to make a web service that will return json data (for instance) to connect to d3.json() calls.
I would recommend you to use Python to quickly do something extending SimpleHTTPServer, or go with a web service framework such as web2py.