title: Passing data from Django view to D3
body: <p>Complete newbie question:</p>
  
  <p>I have a Django app running in which I generate a view with data: </p>
  
  <pre><code>result = json.dumps(data)
  
  context = RequestContext(request, {
      'result': result,
  })
  
  return HttpResponse(template.render(context))
  </code></pre>
  
  <p>Now I have a <code>map.js</code> file in which I render a heat map of the data using <code>d3.js</code>.
  I also have an <code>index.html</code> file where my page is rendered and the heatmap reference is passed via </p>
  
  <pre><code>&lt;body&gt;
   &lt;div id="heatMap"&gt;
   &lt;/div&gt;
  &lt;body&gt; 
  </code></pre>
  
  <p>Question: how do I pass my data generated in the view to the <code>map.js</code> file? </p>
  
  <p>Thanks so much for your help!</p>