title: Using D3 with Elm
body: <p>Is it manageable to using D3 with Elm using ports?  I'm trying out Elm but I can't find any examples of using Elm with D3 without a wrapper API.  The problem I've run into is that the <a href="https://github.com/seliopou/elm-d3" rel="noreferrer">wrapper</a> and the forks don't work with 0.18.  I'm also seeing a lot of statements that suggest building an API around javascript APIs is bad practice and that instead you should use ports.  I can't find any examples of this with D3, however.  I found <a href="https://bl.ocks.org/jmarca/90393db9433ee8e91fd65e8836a6a3d3" rel="noreferrer">this example</a> but the D3 part was all done in plain javascript which doesn't really fit.</p>
  
  <p>I'm probably being too aggressive with taking on D3 right off-the-bat with Elm but that's really what I want to do with it.  If it's not really feasible to use D3 with Elm I'll probably not bother with it for now.  Is there a fundamental problem with this kind of interaction or is it simply a lack of interest in D3 in the Elm community or am I just missing something?</p>
  
  <p>For example, take this code ripped from the bl.ocks example above:</p>
  
  <pre class="lang-js prettyprint-override"><code>var t = d3.transition().duration(750);
  var g = d3.select("svg g")
  // JOIN new data with old elements.
  var text = g.selectAll("text")
    .data(data, function(d) { return d; });
  
  // ENTER new elements present in new data.
  text.enter().append("text")
    .attr("class", "enter")
    .attr("dy", ".35em")
    .attr("y", -60)
    .attr("x", function(d, i) { return i * 24; })
    .style("fill-opacity", 1e-6)
    .text(function(d) { return d; })
    .transition(t)
    .attr("y", 0)
    .style("fill-opacity", 1);
  </code></pre>
  
  <p>Is there a straightforward translation into Elm for this kind of thing?</p>