- Expert Data Visualization
- Jos Dirksen
- 362字
- 2021-07-09 18:22:40
Getting the sources and setting up a web server
In this section, we'll show you how you can access the sources that are provided together with this book. There are a couple of different ways you can get the sources.
We've got two locations where you can download a zip file with the sources:
- You can download them directly from the Packt Publishing website here: https://www.packtpub.com/books/content/support
- You can alternatively download them from GitHub here: http://github.com/josdirksen/d3dv/archive/master.zip
Once you've downloaded these, just unzip them to a location of your choice. This should result in a directory structure which looks something like this:

For the rest of this book, we'll reference the directory where you extracted the sources to <DVD3>. We can then use it to point to specific examples or files like this: <DVD3>/src/chapter-01/D01-D01.js.
All the sources of this book can be found on GitHub in the http://github.com/josdirksen/d3dv.git repository. If you've already got Git installed on your machine, you can of course just clone the repository to get access to all the latest sources:
> git clone https://github.com/josdirksen/d3dv.git
Cloning into 'd3dv'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.
If you do it this way, you can be sure you'll always have the latest bug fixes and the latest samples. Once you've cloned the repository, the rest of the book can be followed in the same manner. When we mention <DVD3> in this book, in this case it'll point to the cloned repository.
Once you've got the sources extracted to the <DVD3> directory, we could already run some examples by just opening the corresponding HTML file directly. For instance, if you open the <DVD3>/src/chapter-01/D01-01.html file in your browser, you'll see the following results:

While this will work for the basic examples, this won't work when we're loading external data, due to the restriction that you can't use JavaScript to asynchronously load resources from the local filesystem. To get the examples in this book working, which use external data (most of them), we need to set up a local web server. In the following section, we'll explain how to do this.
- Java程序設(shè)計(jì)實(shí)戰(zhàn)教程
- Oracle 11g從入門(mén)到精通(第2版) (軟件開(kāi)發(fā)視頻大講堂)
- Troubleshooting PostgreSQL
- 零基礎(chǔ)輕松學(xué)SQL Server 2016
- Learning SciPy for Numerical and Scientific Computing(Second Edition)
- Spring核心技術(shù)和案例實(shí)戰(zhàn)
- PHP編程基礎(chǔ)與實(shí)踐教程
- C++編程兵書(shū)
- Windows Phone 8 Game Development
- C++程序設(shè)計(jì)教程
- Laravel Design Patterns and Best Practices
- JavaWeb從入門(mén)到精通(視頻實(shí)戰(zhàn)版)
- C++ Data Structures and Algorithm Design Principles
- Learning ClojureScript
- Learning HTML5 by Creating Fun Games