Disclaimer: This project is a work in progress and is not yet complete. For contributions, please see the CONTRIBUTING.md file.
An interactive data visualization of Dante's Divine Comedy (Longfellow translation) that reveals hidden patterns, themes, and structures in the text through multiple visual lenses.
# Create virtual environment
python -m venv venv
# Activate (Windows)
venv\Scripts\activate
# Activate (macOS/Linux)
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
python extract_and_analyze.py
This processes the PDF and generates four JSON datasets in src/data/:
divine-comedy-data.json - Main structured dataset (cantos, characters, themes, sentiment)network-data.json - Character co-occurrence networkjourney-data.json - Spatial journey coordinates for spiral visualizationsymbols-data.json - Rivers, creatures, celestial bodies, references# Install Node.js dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
The app will be available at http://localhost:5173.
divine-comedy-viz/
extract_and_analyze.py # Python: PDF extraction + NLP analysis
divine-comedy.pdf # Source text (Longfellow translation)
analysis-report.md # Summary of analysis findings
requirements.txt # Python dependencies
package.json # Node.js dependencies
index.html # Entry point
vite.config.js # Vite configuration
src/
App.svelte # Main application layout
app.css # Global styles
main.js # Svelte mount point
components/
SpiralJourney.svelte # Spiral descent/ascent visualization
Journey3D.svelte # Three.js 3D immersive journey
SentimentFlow.svelte # Emotional arc line/area chart
NetworkGraph.svelte # Force-directed character network
ThemeRadial.svelte # Radial theme distribution chart
CantoExplorer.svelte # Detailed canto browser
data/
divine-comedy-data.json
network-data.json
journey-data.json
symbols-data.json
utils/
dataProcessing.js # Data loading and color utilities
d3Helpers.js # D3.js helper functions
threeHelpers.js # Three.js scene building utilities
pdfplumber): Parses the decorative-header PDF format, splitting text into 100 cantos across 3 realmsNLTK VADER): Computes compound, positive, negative, and neutral scores per cantoPlease read our CONTRIBUTING.md for details on how to contribute to this project. Thank you in advance!