<commit_before>// Name: population.js
// Description:	A script to import data from education.csv and 
// render it as a barchart.
// Written by: 	<NAME>


	// From the html body, select the .info container to be the 
	// parent of the new container whose class is "chart".  
	// The class attribute allows the .css style information
	// to be applied to the container.
	var bar = d3.select("body")
  	   .select(".info")
  	   .select(".rightSide")
   	   .append("div")
   	   .attr("class", "bar") 

	  
	// Import the data from the .csv file, applying the callback
	// function to the data in the file.
	d3.csv("adminData/education.csv", function(data) {

  		// Convert strings to numbers.
  		data.forEach(function(d) {
    	   d.percentage = +d.percentage;
	    });
	    
  	   // Each datum is a container of class type "bar".  
	   // For each datum, append a container, bind the data to the container
	   // using the .data() function and apply the style and text attributes.
   	   bar.selectAll("div")
         .data(data)
   	     .enter().append("div")
         .style("width", function(d) { return d.percentage * 10 + "px"; })
         .text(function(d) { return d.percentage; })

	   // Apply a similar operation to the labels.
	   var label = d3.select("body")
  	      .select(".info")
  	      .select(".leftSide")
  	      .append("div")
	      .attr("class","label")
	  <commit_msg>Corrected pathname in population.js so that it would correctly open "dummy" data in data/education.csv.<commit_after>// Name: population.js
// Description:	A script to import data from education.csv and 
// render it as a barchart.
// Written by: 	<NAME>


	// From the html body, select the .info container to be the 
	// parent of the new container whose class is "chart".  
	// The class attribute allows the .css style information
	// to be applied to the container.
	var bar = d3.select("body")
  	   .select(".info")
  	   .select(".rightSide")
   	   .append("div")
   	   .attr("class", "bar") 

	  
	// Import the data from the .csv file, applying the callback
	// function to the data in the file.
	d3.csv("data/education.csv", function(data) {

  		// Convert strings to numbers.
  		data.forEach(function(d) {
    	   d.percentage = +d.percentage;
	    });
	    
  	   // Each datum is a container of class type "bar".  
	   // For each datum, append a container, bind the data to the container
	   // using the .data() function and apply the style and text attributes.
   	   bar.selectAll("div")
         .data(data)
   	     .enter().append("div")
         .style("width", function(d) { return d.percentage * 10 + "px"; })
         .text(function(d) { return d.percentage; })

	   // Apply a similar operation to the labels.
	   var label = d3.select("body")
  	      .select(".info")
  	      .select(".leftSide")
  	      .append("div")
	      .attr("class","label")
	  
{'fraction_non_alphanumeric': 0.1322256836275528, 'fraction_numerical': 0.003461405330564209, 'mean_word_length': 2.3371824480369514, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1730544', 'n_tokens_mistral': 925, 'n_tokens_neox': 884, 'n_words': 305}