You can now interact with the graph in 3D, made possible thanks to 3d-force-graph. In the graph, click on the node to focus, and click on the arrow head to fly to the source node (i.e., beginning of the arrow).
The Civilization VI game is an awesome but complicated game. As a beginner of the Civ series, I approached learning the game in a slightly different way: by mapping out the entirety (or most of) the static dependencies of entities in the game. The resulting graph has 627 nodes (entities) and 1125 edges (connections). Node types include technologies, civics, building, resources, units, improvements, etc., and edge types include unlocks, boosts (for technologies and civics), upgrades (for units), replaces (for unique units or infrastructure of a specific civilization), etc.
You can also interact with portion of the graph via either the Dash app or the demo notebook in this repo. If you're interested in the data itself, check out the csv files. I also added a graphml file and json file for any graph peeps.
The dataset was scraped from the Civilization wiki page, but only includes entities in the Vanilla pack (i.e., excluding Gathering Storm and Rise and Fall expansion packs), because I only have the Vanilla pack for the game.
- scraping.py: scraping from wiki pages using beautiful soup
- network_creation.ipynb: creating graph from csv files using networkx and pandas
- demo.ipynb: demo front end, imported from civ_widgets.py
- civ_widgets.py: graph drawing code and widgets
I used networkx as the graph backend, igraph for layout (their implementation of the kamada kawai layout is much more visually appealing than networkx's), and plotly for interactive visualization. Ipywidgets is also needed to create in-notebook widgets. Versions are in requirements.txt.
- The Civilization VI wiki page, and the folks who contribute there.
- pythonanywhere for hosting my Dash web app for free and for having neat documentation. Check out their services.