Created
          December 8, 2017 16:10 
        
      - 
      
- 
        Save lenagroeger/6afbb2aad2a220b903cf0749cfe947a2 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | vis = {} | |
| var transformArray = []; | |
| var nationalAvg = {}; | |
| var margin = { | |
| top: 0, | |
| right: 10, | |
| bottom: 0, | |
| left: 30 | |
| }; | |
| var width = 160, | |
| height = 200; | |
| vis.init = function() { | |
| vis.loaddata(); | |
| } | |
| vis.loaddata = function() { | |
| d3.csv("//propublica.s3.amazonaws.com/projects/workerscomp/assets/data/workcompFeb24.csv", function(data) { | |
| d3.json("//propublica.s3.amazonaws.com/projects/workerscomp/assets/data/transformsFinalFeb24.json", function(transforms) { | |
| vis.draw(data,transforms); | |
| }); | |
| }); | |
| } | |
| vis.IndividualState = function(id) { | |
| vis.drawIndividual(id) | |
| $("#statelookup .chosen-select").val(id.replace(/_/g," ")) | |
| $("#statelookup .chosen-select").trigger('chosen:updated'); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment