<commit_before>
(function(){
  var baseURI = "http://apis.is/";
  var getQuakesURI = "earthquake/is";
  d3.json("http://apis.is/earthquake/is", renderQuakes)
})();

function renderQuakes(quakeResults){
  // quakeResults.forEach(function(index, quake){
    console.log(quakeResults);
}<commit_msg>get data to d3 to display initially on page in individual basis<commit_after>
(function(){
  var quakesURL = "http://apis.is/earthquake/is";
  getAndExtractQuakesEventHandler(quakesURL, getQuakes, extractQuakes, renderQuakes)

})();

function getAndExtractQuakesEventHandler(url, getQuakes, extractQuakes, renderQuakes){
  getQuakes(url, function(data){
    var quakes = extractQuakes(data);
    renderQuakes(quakes)
  })
}

function getQuakes(url, callback){
  d3.json(url, callback);
}

function extractQuakes(quakeResults){
  console.log(quakeResults.results)
  return quakeResults.results
}

function renderQuakes(quakes){
  // quakes.forEach(function(index, quake){
    d3.select('.quake-events').selectAll('p')
      .data(quakes)
      .enter()
      .append('p')
      .text(function(d){return d});
  // })
}
{'fraction_non_alphanumeric': 0.15017985611510792, 'fraction_numerical': 0.0035971223021582736, 'mean_word_length': 4.8578947368421055, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3277724', 'n_tokens_mistral': 382, 'n_tokens_neox': 381, 'n_words': 66}