Edit in JSFiddle

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

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

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 + ")");

d3.csv("https://data.cityofnewyork.us/resource/u8ac-289r.csv?$where=created_date<'2015-01-01T00:00:00' AND created_date>'2014-11-30T00:00:00' &$select=created_date", 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["CREATED_DATE"], "M/DD/YYYY hh:mm:ss a").day() == 0) {
            week[0]++;
        } else if (moment(d["CREATED_DATE"], "M/DD/YYYY hh:mm:ss a").day() == 1) {
            week[1]++;
        } else if (moment(d["CREATED_DATE"], "M/DD/YYYY hh:mm:ss a").day() == 2) {
            week[2]++;
        } else if (moment(d["CREATED_DATE"], "M/DD/YYYY hh:mm:ss a").day() == 3) {
            week[3]++;
        } else if (moment(d["CREATED_DATE"], "M/DD/YYYY hh:mm:ss a").day() == 4) {
            week[4]++;
        } else if (moment(d["CREATED_DATE"], "M/DD/YYYY hh:mm:ss a").day() == 5) {
            week[5]++;
        } else if (moment(d["CREATED_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]);
    }

    x.domain(["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]);

    console.log("most complaints in a day:", Math.max.apply(Math, week));
    y.domain([0, Math.max.apply(Math, week)]);

    svg.append("g")
        .attr("class", "x axis")
        .attr("transform", "translate(0," + height + ")")
        .call(xAxis);

    svg.append("g")
        .attr("class", "y axis")
        .call(yAxis)
        .append("text")
        .attr("transform", "rotate(-90)")
        .attr("y", 6)
        .attr("dy", ".71em")
        .style("text-anchor", "end")
        .text("Number of Graffiti Complaints");

    svg.selectAll(".bar")
        .data(week)
        .enter().append("rect")
        .attr("class", "bar")
        .attr("x", function (d, i) {
        return x(x.domain()[i]);
    })
        .attr("width", x.rangeBand())
        .attr("y", y)
        .attr("height", function (d) {
        return height - y(d);
    });
});
//function type(d) {
//d.frequency = +d.frequency;
//return d;
//}
<!DOCTYPE html>

<body>

<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>
<style> 

.bar {
    fill: orange;
}
.bar:hover {
    fill: lightpink;
}
.axis {
    font: 10px sans-serif;
}
.axis path, .axis line {
    fill: none;
    stroke: #000;
    shape-rendering: crispEdges;
}
.x.axis path {
    display: none;
}
</style>