title: Python create density layer/map WGS84
body: <p>I'm new to Python and struggling a little bit.  Basically I'm trying to create a geospatial density layer that can be in WGS84 with a weighted attribute and I want to "color" the attributes based on values. </p>
  
  <p>So essentially I have lets say 10K records all with different locations and with a weight (basically the number of occurrences in this area).  Basically its' gridded up and I have a centroid lon/lat with a number of occurences. </p>
  
  <p>For example.  If I have data related to the number of UCLA Graduates in the United States (gridded up by location) and I want to show these on a map that provides “COLOR” to indicate “density” </p>
  
  <p>So my data would look like</p>
  
  <pre><code>lon,lat,total_graduates
  23.24242, 42.242424,  212
  24.22424, 43.242424, 86
  </code></pre>
  
  <p>I want to create a heat map/density, etc…  like </p>
  
  <p><a href="https://petapixel.com/assets/uploads/2012/01/heatmap.jpg" rel="nofollow noreferrer"><img src="https://petapixel.com/assets/uploads/2012/01/heatmap.jpg" alt="enter image description here"></a></p>
  
  <p>I only need the actual layer output and not the map.</p>
  
  <p>My end result is to create a .PNG file that will be used in some of our GIS applications as "layers".  </p>
  
  <p>In some cases I could have a hundred thousand "boxes/grids" so I need something as fast as possible to render the image in WGS84.  </p>
  
  <p>I've been trying to do this with <code>matplotlib</code> but having no luck.  Any guidance would be helpful.</p>