title: Scraping coordinate data and additional information for shot locations
body: <p>I'm learning about R, by looking at basketball statistics, and I want to pull out information that is presented in a shot chart.</p>
  
  <p>I'm looking at the following shot chart for D'Angelo Russell, at:</p>
  
  <pre><code>https://www.basketball-reference.com/players/r/russeda01/shooting/2019
  </code></pre>
  
  <p>I'm scraping data using tools within the <code>library(rvest)</code> package, in the following way:</p>
  
  <pre><code>&gt; dlo_html &lt;- read_html("https://www.basketball-reference.com/players/r/russeda01/shooting/2019")
  &gt; dlo_nodes1 &lt;- html_nodes(dlo_html, "table")
  &gt; dlo_makes &lt;- html_table(dlo_nodes1)
  </code></pre>
  
  <p>... so now when I run <code>head(dlo_makes)</code> I get a data.frame of 74 rows and 11 columns to sort through from the table from left side of the webpage. That's a nice start.  </p>
  
  <p>However, what I <strong>really</strong> want is the information contained in the shot chart graphic on the right side of the page. I can see it in the source code of the html. If you search for <code>shot-area</code> in the source, right below it are about 1500 rows of data that look like this:</p>
  
  <pre><code>&lt;div style="top:57px;left:237px;" tip="Oct 17, 2018, BRK at DET&lt;br&gt;1st Qtr, 10:38 remaining&lt;br&gt;Missed 2-pointer from 2 ft&lt;br&gt;BRK leads 2-0" class="tooltip miss"&gt;&amp;#215;&lt;/div&gt;
  &lt;div style="top:154px;left:341px;" tip="Oct 17, 2018, BRK at DET&lt;br&gt;1st Qtr, 10:30 remaining&lt;br&gt;Made 2-pointer from 14 ft&lt;br&gt;BRK now leads 4-0" class="tooltip make"&gt;&amp;#9679;&lt;/div&gt;
  etc.
  </code></pre>
  
  <p>Am I passing incorrect information into the <code>html_nodes()</code> command? Or should I be using a different command than <code>html_table</code> to look at the nodes? Or is there something else that I'm missing here?</p>