<!doctype html>
<html>
  <head>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.2.8/d3.min.js" type="text/JavaScript"></script>
  </head>
  <body>
    <div id="viz">
      <svg style="width:600px;height:600px;" ></svg>
    </div>
    <script>
      var scatterData = [
        {friends: 5, salary: 22000}, 
        {friends: 3, salary: 18000},
        {friends: 10, salary: 88000}, 
        {friends: 0, salary: 180000},
        {friends: 27, salary: 56000}, 
        {friends: 8, salary: 74000}
   