The following instructions assume that Node.js , npm, and git are already installed on your system. If not, feel free to follow the Step-by-Step bootstrap section.
Type the following in the command line to install a light webserver::
npm install -g http-server
Install TopoJSON:
npm install -g topojson
Clone the sample code with included libraries:
git clone --depth=1 https://github.com/PacktPublishing/Learning-D3js-4-Mapping-Second-Edition.git
Go to the root project:
cd d3jsMaps
To start the server type the following:
http-server
You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files emailed directly to you.
Now, open your web browser to http://localhost:8080/chapter-1/example-1.html, and you should see the following map: