My point here is: this approach sucks.
I want a WordPress workflow that is compatible with my D3 workflow. To run D3, I’m running a local Python HTTP server via:
python -m SimpleHTTPServer 8888 &
and then working on live D3 examples embedded in HTML files. In order to have everything appear precisely the way I want it to, I’m best off just linking to that HTML page. But then it doesn’t put the D3 plot in the post itself. Another option might be to abandon WordPress, but that option is off the table. The last option is to directly transclude the D3 HTML page into the WordPress HTML page. This can be done using an <iframe>.
The <iframe> transcludes an HTML page into another HTML page without changing anything about the transcluded page. It’s a bit like a television, that way. The WordPress page is the living room, and the couch, and the television dials and knobs. The D3 HTML page being transcluded is what’s playing on TV.
The <iframe> tag can be inserted by turning off the rich text editor in WordPress (via Users > Your Profile > Disable the visual editor when writing, as of WordPress 3.4.1). This will allow you to enter HTML tags directly.
The final product will look something like this, in your WordPress post:
<iframe style="border: 0px;" scrolling="no" width="650px" height="450px" src="/js/parallel/simple_parallel.html"> </iframe>