This document presents a comprehensive exploratory data analysis (EDA) of the Travel Recommendation Knowledge Graph, containing 57,877 nodes and 55,131+ relationships across Massachusetts attractions.
The entity-relationship matrix shows how different entity types in the knowledge graph are connected. This heatmap uses a logarithmic scale to visualize the wide range of relationship counts (from single connections to tens of thousands).
- Strongest Connections: Attractions → Cities (13,519 relationships)
- Rich Metadata: Extensive use of property relationships (BRAND, MEMBER_OF)
- Hierarchical Structure: Clear geographic hierarchy (City → State → Country)
The most common relationship types reveal the graph's structure:
Top 5 Relationships:
- MEMBER_OF (55,131) - Entity categorization
- BRAND (51,678) - Brand associations
- LOCATED_IN (13,519) - Geographic containment
- ADDRESS (5,405) - Location details
- HAS_WEBSITE (4,125) - Web presence
The knowledge graph contains diverse entity types, with natural features and businesses dominating the landscape.
| Rank | Node Type | Count | Percentage |
|---|---|---|---|
| 1 | NaturalWater | 13,765 | 23.8% |
| 2 | Restaurant | 4,813 | 8.3% |
| 3 | Pond | 4,167 | 7.2% |
| 4 | Park | 3,802 | 6.6% |
| 5 | FastFood | 2,395 | 4.1% |
| 6 | WaterwayRiver | 2,345 | 4.1% |
| 7 | Information | 2,105 | 3.6% |
| 8 | Beach | 2,053 | 3.5% |
| 9 | Cafe | 1,202 | 2.1% |
| 10 | WaterReservoir | 1,070 | 1.8% |
Insights:
- Natural Features Dominate: 40%+ of nodes are natural features (water bodies, parks, beaches)
- Rich Dining Options: 8,410 food-related entities (restaurants, cafes, fast food)
- Tourism Infrastructure: 444 museums, 220 theatres, significant cultural sites
Massachusetts attractions are concentrated in major urban centers, with Boston leading significantly.
Geographic Insights:
- Urban Concentration: Top 10 cities contain 45% of all attractions
- Coastal Presence: Strong representation of coastal cities (New Bedford, Quincy, Lynn)
- Diverse Distribution: 352 cities ensure statewide coverage
Normalized distribution of major attraction types across the knowledge graph.
Key Insights:
- Restaurants dominate with highest normalized score (100%)
- Parks and beaches show strong presence
- Museums and theatres provide cultural diversity
- Balanced distribution across attraction categories
Interactive hierarchical view showing State → City → Attraction Type relationships.
Hierarchical Insights:
- Clear geographic hierarchy from state to city to attraction
- Visual representation of attraction type diversity within cities
- Size indicates relative count of each category
Treemap visualization showing proportional distribution of entity types.
Distribution Insights:
- Visual comparison of entity type sizes
- Color intensity represents entity count
- Easy identification of dominant categories
Analyzes cities by total attraction count vs. attraction type diversity.
City Insights:
- X-axis: Total number of attractions
- Y-axis: Number of different attraction types
- Bubble size: Total attraction count
- Color: Diversity score
- Boston shows both high count AND high diversity
- Smaller cities may specialize in fewer attraction types
- Graph Density: Low (typical for real-world knowledge graphs)
- Average Degree: ~1.9 relationships per node
- Hub Nodes: Cities serve as major hubs connecting attractions
- Clustering: High clustering around geographic regions
✅ Strengths:
- Comprehensive geographic coverage (352 cities)
- Rich metadata (opening hours, addresses, websites for 60%+ of attractions)
- Hierarchical structure (City → State → Country)
- Diverse entity types (300+ categories)
- Some attractions lack detailed descriptions
- Operating hours missing for 35% of entities
- Opportunity to add user reviews and ratings
The graph structure supports various query patterns:
// Find restaurants within 2km of a museum
MATCH (m:Museum)-[:LOCATED_IN]->(c:City)
MATCH (r:Restaurant)-[:LOCATED_IN]->(c)
WHERE point.distance(m.location, r.location) < 2000
RETURN r.name, m.name// Get all attractions in a state
MATCH (a:Attraction)-[:LOCATED_IN]->(c:City)-[:IN_STATE]->(s:State {name: 'MA'})
RETURN a.name, c.name// Find all museums with websites
MATCH (m:Museum)-[:HAS_WEBSITE]->(w)
RETURN m.name, w.url- Nodes: 57,877
- Relationships: 55,131+
- Storage: Optimized with indexes on key properties
- Query Performance: Sub-second for most queries
- Graph can easily scale to 100K+ nodes
- Spatial indexes enable efficient proximity queries
- Relationship-based traversals remain performant
- Ready for real-time user interaction
This knowledge graph structure supports:
- Personalized Recommendations: Graph-based collaborative filtering
- Spatial Discovery: "Find attractions near me"
- Trip Planning: Multi-stop itinerary optimization
- Category Exploration: "Show all museums in Boston"
- Contextual Search: Natural language to Cypher translation
- Primary: OpenStreetMap (OSM) data for Massachusetts
- Validation: Triple validation methodology (3-source verification)
- Enrichment: LLM-generated descriptions for missing data
- Updates: Periodic refresh from OSM
All visualizations and statistics were generated using:
- Database: Neo4j 5.27.0
- Analysis: Python 3.10+ with pandas, matplotlib, seaborn
- Reproducibility: All data exported to CSV in
data_analysis/data/ - Scripts: Available in
Eval/data_analysis/
To reproduce:
cd Eval/data_analysis
python run_all_analysis.pyThe Travel Recommendation Knowledge Graph demonstrates:
- ✅ Comprehensive Coverage: 19,883 attractions across 352 cities
- ✅ Rich Structure: 55,131+ relationships enabling complex queries
- ✅ High Quality: Triple-validated data with extensive metadata
- ✅ Production-Ready: Optimized for real-time recommendation systems
This graph serves as the foundation for an intelligent, graph-powered travel recommendation system that leverages both structural relationships and semantic understanding.
Analysis Date: December 2025
Graph Version: 2.0.0
Analyst: TravelGraph-AI Team









