Before we jump into it, let's briefly consider what type of content GitHub Pages can host. In short, GitHub Pages will let you serve any static web page or pages with dynamic client-side scripting. If you want to host projects with dynamic server-side scripting, you might want to opt for a different setup, for example, Heroku.
In simple terms, static or flat web pages consist of a set of files—or at least a single HTML file that serves the same content to every user. If you want to change the content, you need to change the source code.
Dynamic web pages consist of a set of files that await external requests or inputs to then build, change, and serve the content on the fly. They might show different contents for different users, or for different times of the day or operating systems.
There are two types of dynamic web pages:
- Web pages with client-side scripting usually use JavaScript and its derivatives to translate user input to a changed DOM structure. It does so client-side, which means that it happens entirely within the bounds of the browser.
- Web pages with server-side scripting require input parameters passed all the way to the application’s server. Server-side languages such as PHP, Python, Node.js, or the like assemble the page content in a situation-bespoke way, often with information retrieved from databases.
In short, you can host your project on GitHub Pages if it’s not dependent on server-side scripting. You can facilitate user input as long as it happens within the bounds of the client. You can join and update all data that comes from a flat file stored as such on your GitHub page. This can be a .csv or otherwise delimited data file, but you can’t connect to, for example, a relational SQL database (which relies on structured interrelationships). You can, of course, calculate and recalculate data, as long as it happens client-side.
It is important to be aware of this limitation in order to choose the right hosting technology to publish your visualization. However, many D3 projects in the wild can be hosted as static web pages or dynamic pages with exclusive client-side scripting.