JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>

CSS

.bar {
    fill: #002C77;
}
.bar:hover {
    fill: #FB4F14;
}
.axis {
    font: 10px sans-serif;
}
.axis path, .axis line {
    fill: none;
    stroke: #000;
    shape-rendering: crispEdges;
}
.x.axis path {
    display: none;
}

JavaScript

var margin = {
    top: 20,
    right: 40,
    bottom: 30,
    left: 40
},
width = 600 - margin.left - margin.right,
    height = 500 - margin.top - margin.bottom;

var x = d3.scale.ordinal()
    .rangeRoundBands([0, width], .05);

var y = d3.scale.linear()
    .range([height, 0]);

var xAxis = d3.svg.axis()
    .scale(x)
    .orient("bottom");

var yAxis = d3.svg.axis()
    .scale(y)
    .orient("left")
    .ticks(10);

var svg = d3.select("body").append("svg")
    .attr("width", width + margin.left + margin.right)
    .attr("height", height + margin.top + margin.bottom)
    .append("g")
    .attr("transform", "translate(" + margin.left + "," + margin.top + ")");


//get my local 311 noise complaint data and show which days of the week have the most noise complaints
d3.csv("https://data.cityofnewyork.us/resource/c284-tqph.csv?$where=issue_date >= '2014-12-01T00:00:00' AND vehicle_make IS NOT NULL", function (error, data) {
    if (error) throw error;

    var week = [0, 0, 0, 0, 0, 0, 0]; // initializes seven values for seven days of week
    data.forEach(function (d) {
        if (moment(d["Issue Date"], "M/DD/YYYY hh:mm:ss a").day() == 0) {
            week[0]++;
        } else if (moment(d["Issue Date"], "M/DD/YYYY hh:mm:ss a").day() == 1) {
            week[1]++;
        } else if (moment(d["Issue Date"], "M/DD/YYYY hh:mm:ss a").day() == 2) {
            week[2]++;
        } else if (moment(d["Issue Date"], "M/DD/YYYY hh:mm:ss a").day() == 3) {
            week[3]++;
        } else if (moment(d["Issue Date"], "M/DD/YYYY hh:mm:ss a").day() == 4) {
            week[4]++;
        } else if (moment(d["Issue Date"], "M/DD/YYYY hh:mm:ss a").day() == 5) {
            week[5]++;
        } else if (moment(d["Issue Date"], "M/DD/YYYY hh:mm:ss a").day() == 6) {
            week[6]++;
        }
    });

    console.log("week:");
    for (index = 0; index < week.length; index++) {
        console.log(week[index]);
    }
    console.log("most violations in a day:",...