Interactive visualization of street names and patterns across Australia's capital cities, featuring advanced street counting algorithms.
Live Demo | Research Methodology
This project visualizes street data across Australia's capital cities to explore interesting patterns in street naming:
- Most popular street names (counted using Grid 200m algorithm)
- Streets named after suburbs
- Tree-themed street names
- Royalty-themed street names
- Geographic clustering of name patterns
- Compare naming patterns across different cities
- Sydney - Greater Sydney (33 LGAs, NSW Government definition)
- Melbourne - Greater Melbourne (31 LGAs, Victorian Government definition) π§ Coming soon
- Brisbane, Perth, Adelaide, Hobart, Darwin, Canberra - Planned
Geographic Scope: Each city uses official government definitions of "Greater [City]" boundaries. See SCOPE.md for the complete list of LGAs and sources.
A key challenge in this project is counting unique instances of streets. When "Victoria Street" appears in OpenStreetMap data, how do we know if it's one street or multiple distinct streets that share a name?
We researched and compared 5 different algorithms to solve this problem:
- Point-to-Point Distance: Check if any points on segments are within threshold distance
- Grid-based Flood Fill: Divide map into grid cells and flood fill connected regions β Winner
- Polygon Buffer Intersection: Create buffer polygons and check for intersections
- Endpoint-Only Distance: Only check distances between segment endpoints
- Highway-Aware: Hybrid method for handling long highways with gaps
After extensive testing on 23 streets across Sydney:
- 224x faster than Point-to-Point method (0.028s vs 6.28s)
- Equivalent accuracy to geometric methods
- Scalable to large datasets
- Simple implementation with no external dependencies
Read the full research: METHODOLOGY.md
Interactive Tools:
- Method Comparison - Compare algorithms side-by-side
- Summary Table - View all results and timing data
- Source: Data.NSW Road Segment Data
- Format: GeoJSON with street polylines and metadata
- Coverage: Complete NSW road network
- Attributes: Road names, types, suburbs, geometries
- Source: Overpass API
- Format: GeoJSON
- Query: Streets within Sydney bounding box
- Note: Used for methodology research
- Clone the repository:
git clone https://github.com/pqzdev/sydney-streets.git
cd sydney-streets- Start a local server:
python3 -m http.server 8000
open http://localhost:8000- The visualization will load with sample OSM data
To reproduce our research findings:
# Install dependencies
pip install shapely scipy numpy
# Run comparison on test streets
python3 scripts/compare_methods.py
# Generate summary tables
python3 scripts/generate_summary_table.py
# View results
open compare_visualization.html
open summary.htmlsydney-streets/
βββ index.html # Main visualization
βββ app.js # Application logic
βββ compare_visualization.html # Method comparison tool
βββ summary.html # Results summary table
βββ METHODOLOGY.md # Research write-up
βββ SCOPE.md # Geographic scope documentation
βββ scripts/
β βββ compare_methods.py # Algorithm implementations
β βββ generate_summary_table.py # Summary generator
β βββ process_full_dataset.py # Grid 200m processing script
β βββ download_osm_data.py # OSM data downloader
β βββ add_suburbs.py # Suburb data processing
βββ data/
β βββ sydney-roads-osm.geojson # OSM street data
β βββ sydney-roads-sample.geojson # Sample data for testing
β βββ method_comparison.json # Comparison results
β βββ method_comparison_detailed.json # Detailed results
β βββ summary.json # Summary statistics
βββ README.md # This file
- Interactive Map: Pan, zoom, and explore Sydney streets
- Smart Counting: Grid 200m algorithm for accurate street instance counts
- Filter by Name: Search for specific street names
- Category Views:
- Most common names
- Streets named after suburbs
- Tree-themed streets
- Royalty-themed streets
- Statistics: Real-time stats on visible streets and patterns
- Popups: Click streets for detailed information
- Method Comparison: Compare up to 4 algorithms side-by-side on any street
- Summary Table: View all results, timing data, and disagreement analysis
- Disagreement Visualization: See where methods differ with 1km radius markers
- Leaflet.js: Interactive map library
- OpenStreetMap: Base map tiles
- Vanilla JavaScript: No frameworks, minimal dependencies
- GeoJSON: Geographic data format
- Python: Algorithm implementation and testing
- NumPy/SciPy: K-D tree and spatial operations
- Shapely: Geometric polygon operations
From our methodology research:
| Method | Speed | Accuracy | Best For |
|---|---|---|---|
| Grid 200m | β‘β‘β‘ (224x) | βββ | Production use |
| Grid 100m | β‘β‘β‘ (170x) | βββ | Dense urban areas |
| Polygon Buffer 100m | β‘β‘ (2.8x) | βββ | Geometric accuracy |
| Point-to-Point 100m | β‘ (1x) | βββ | Baseline/validation |
| Highway-Aware | β‘β‘β‘ | βββ | Long highways |
Perfect highway counting: Our Highway-Aware method correctly identifies Pacific Highway (722 segments) as 1 instance, while all other methods incorrectly counted it as 5 instances.
This site is deployed on Cloudflare Pages:
Live Site: https://australian-streets.pages.dev/
To deploy your own version:
- Fork this repository
- Connect to Cloudflare Pages via the dashboard
- Set build settings:
- Build command: (none - static site)
- Build output directory:
/
- Your site will be live at
https://your-project.pages.dev/
Counting 23 test streets (3,956 total segments):
- Grid 200m: 0.028 seconds
- Grid 100m: 0.037 seconds
- Polygon Buffer: 2.26 seconds
- Point-to-Point: 6.28 seconds
To overcome Cloudflare Pages' 25MB file size limit and enable Melbourne support, we've built a backend API:
Problem:
- Sydney: 43.4MB β compressed to 24.4MB (fits, but reduced precision from ~11m to ~111m)
- Melbourne: 72.1MB β compressed to 39.6MB β (15MB over limit)
Solution:
- Cloudflare Worker + D1 (SQLite) database
- Full coordinate precision (5+ decimals)
- Viewport-based loading (only fetch visible streets)
- No file size limits
- Scalable to any city
- API Endpoints: Get counts, search streets, fetch by viewport bounds or name
- Hybrid Mode: Toggle between static files (current) and API mode (future)
- Progressive Enhancement: Static mode works without backend
See BACKEND_API.md for architecture details and DEPLOYMENT.md for setup instructions.
- Backend API for scalable data delivery
- Complete Melbourne backend deployment
- Viewport-based progressive loading
- Add more name categories (historical figures, animals, etc.)
- Heat map of name popularity
- Street length analysis by category
- Export filtered results as GeoJSON
- Mobile-optimized interface
- Real-time method comparison on main map
Issues and pull requests welcome! Areas of particular interest:
- Additional street categorization patterns
- Performance optimizations for large datasets
- Alternative counting algorithms
- UI/UX improvements
MIT
- Data from Data.NSW and OpenStreetMap
- Maps from OpenStreetMap contributors
- Built with Leaflet.js
- Research powered by NumPy, SciPy, and Shapely
- Special thanks to the OSM community for comprehensive Sydney street data
If you use this methodology in your research:
Sydney Streets Project (2025). Street Instance Counting Algorithms for OpenStreetMap Data.
GitHub: https://github.com/pqzdev/sydney-streets
Methodology: https://pqzdev.github.io/sydney-streets/METHODOLOGY.html