lines = {
const margin = {top: 50, right: 30, bottom: 20, left: 60};
const visWidth = width - margin.left - margin.right;
const visHeight = 500 - margin.top - margin.bottom;
const svg = d3.create('svg')
.attr('width', visWidth + margin.left + margin.right)
.attr('height', visHeight + margin.top + margin.bottom);
const g = svg.append('g')
.attr('transform', `translate(${margin.left}, ${margin.top})`);
const x = d3.scaleTime()
.domain(d3.extent(timesForChart))
.range([0, visWidth]);
const y = d3.scaleLinear()
.domain([0, 80000, 1128333]).nice()
.range([visHeight, visHeight/2, 0]);
const xAxis = d3.axisBottom(x).ticks(d3.timeHour.every(1));
const yAxis = d3.axisLeft(y);
g.append('g')
.attr('transform', `translate(0, ${visHeight})`)
.call(xAxis);
g.append('g')
.call(yAxis)
.append('text')
.attr('fill', 'black')
.attr('text-anchor', 'start')
.attr('dominant-baseline', 'hanging')
.attr('font-weight', 'bold')
.attr('y', -margin.top + 5)
.attr('x', -margin.left)
.text('Total Count Per Hour')
const line = d3.line()
.x(d => x(d.date))
.y(d => y(d.count));
const linesGroup = g.append('g');
linesGroup
.selectAll('path')
.data(yearSortSlice)
.join('path')
.attr('stroke', d => color3(d.annual))
.attr('fill', 'none')
.attr('stroke-width', 5)
.attr('d', d=> line(d.sortedTimes));
return svg.node();
}