Skip to content

Commit

Permalink
clean up joinData function
Browse files Browse the repository at this point in the history
  • Loading branch information
malwoodsantoro committed May 1, 2020
1 parent 3278775 commit c849095
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,11 @@
});
}

function joinData(data, layer) {
// First, get the US state GeoJSON data for reference.
var usGeoJSON = usLayer.getGeoJSON(),
byState = {};
function joinData(data, usGeoJSON) {

// Rearrange it so that instead of being a big array,
var byState = {};

// Rearrange the US GeoJSON so that instead of being a big array,
// it's an object that is indexed by the state name,
// that we'll use to join on.
for (var i = 0; i < usGeoJSON.features.length; i++) {
Expand Down

0 comments on commit c849095

Please sign in to comment.