move included script to head — fix ‘Uncaught ReferenceError: d3 is not defined ’