Analyze, visualize, and understand OpenStreetMap data completeness across Latvia
LatviaOSM-Check is a comprehensive analysis tool that compares OpenStreetMap (OSM) data quality against official government statistics for Latvia. It provides interactive visualizations, statistical analysis, and detailed reports for three key geographic features:
- π£οΈ Roads - Road networks and transport infrastructure
- π² Forests - Forest coverage and boundaries
- π Libraries - Library locations and cultural institutions
β Interactive Web Dashboard
- Multi-layer interactive maps with color-coded completeness indicators
- Real-time filtering and comparison tools
- Hierarchical geographic selector (Country β Region β Municipality)
- Click-to-explore detailed statistics
β Data Analysis
- Automatic comparison of OSM data vs official statistics
- Completeness percentage calculations
- Spatial join operations across 589+ geographic areas
- Statistical aggregation by region (novads)
β RESTful API
- 15+ endpoints for programmatic data access
- GeoJSON and CSV data export
- Code examples in Python, JavaScript, and R
β Professional Documentation
- Complete installation guides (Windows, macOS, Linux, Docker)
- User manual with common workflows
- Developer guide for contributions
- API reference with examples
- Technical implementation details
| Feature | Coverage | Records | Status |
|---|---|---|---|
| Roads | 36 municipalities | 39/42 areas | β Complete |
| Forests | Complete nationwide | Multiple regions | β Complete |
| Libraries | Complete nationwide | Multiple regions | β Complete |
| Municipalities | All 36 municipalities | 36/36 | β Complete |
| Overall Completeness | 249.6% average | 42 features | β Excellent |
Windows:
git clone <repository-url>
cd latvia_osm_project
.\setup.ps1
.\run.ps1Linux/macOS:
git clone <repository-url>
cd latvia_osm_project
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.pyOpen your browser and navigate to:
- Main Dashboard: http://localhost:5000
- Roads Analysis: http://localhost:5000/roads
- Forests Analysis: http://localhost:5000/forests
- Libraries Analysis: http://localhost:5000/libraries
- Combined Map: http://localhost:5000/combined-map
Complete documentation is available in the docs/ folder:
- Installation Guide - Setup instructions for all platforms
- Usage Guide - Complete user manual with examples
- Quick Start Guide - Get running in 5 minutes
- API Documentation - REST API reference with code examples
- Contributing Guide - How to contribute code, documentation, or ideas
- Development Guide - Developer setup and architecture
- Project Structure - Codebase organization
- Code of Conduct - Community standards
- Changelog - Version history and release notes
- Contributors - People who built this project
- License - MIT License terms
- Final Status - Current project status and statistics
- Open http://localhost:5000 in your browser
- Select municipalities using the checkboxes
- View real-time statistics and map updates
- Click features for detailed information
import requests
import json
# Get all data as GeoJSON
response = requests.get('http://localhost:5000/api/geojson-data')
geojson = response.json()
# Get statistics CSV
response = requests.get('http://localhost:5000/api/csv-data')
csv_data = response.text// Fetch completeness data
fetch('http://localhost:5000/api/geojson-data')
.then(res => res.json())
.then(data => console.log(data.features[0]))library(httr)
# Get completeness data
response <- GET('http://localhost:5000/api/geojson-data')
data <- content(response, as = 'parsed')- Backend: Flask, Python 3.8+
- Data Processing: GeoPandas, Pandas, NumPy
- Geospatial: Shapely, pyproj, GDAL
- Frontend: Leaflet.js, HTML5, CSS3, JavaScript
- Data Formats: GeoJSON, CSV, GeoTIFF, OSM PBF
latvia_osm_project/
βββ app.py # Flask web application
βββ src/ # Source code modules
β βββ processing/ # Data processing scripts
βββ scripts/ # Pipeline scripts (numbered workflow)
βββ templates/ # Flask HTML templates
βββ data/ # Data files (raw & processed)
βββ outputs/ # Generated maps and exports
βββ docs/ # Documentation
βββ README.md # This file
See Project Structure for complete directory documentation.
We welcome contributions from the community! Whether you want to:
- Fix bugs
- Add features
- Improve documentation
- Report issues
- Suggest improvements
Please see our Contributing Guide for detailed instructions.
# Clone repository
git clone <repository-url>
cd latvia_osm_project
# Setup development environment
python -m venv venv
source venv/bin/activate # Linux/macOS
# or
.\venv\Scripts\Activate.ps1 # Windows
# Install dependencies
pip install -r requirements.txt
# Start development server
python app.pySee Development Guide for more details.
- Python: 3.8 or higher
- RAM: 2GB minimum (4GB+ recommended for full OSM processing)
- Disk Space: 1GB for installation + dependencies
- Operating System: Windows, macOS, or Linux
- Browser: Any modern browser (Chrome, Firefox, Safari, Edge)
# Windows
.\setup.ps1
.\run.ps1python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.pydocker build -t latvia-osm-check .
docker run -p 5000:5000 latvia-osm-checkSee Installation Guide for detailed setup instructions.
- OpenStreetMap: OSM data extract for Latvia (quarterly updates)
- Official Statistics: Government datasets (2024)
- Municipality Boundaries: Official LAU1/LAU2 boundaries
- Supporting Data: Roads, forests, and library records
- Total Features Analyzed: 42 (36 municipalities + 6 cities)
- Features with Complete Data: 39
- Average Completeness: 249.6% (very comprehensive)
- Best Mapped Area: Olaine (645.6%)
- Areas Over 100%: 35 (indicating comprehensive OSM coverage)
- Roads: Complete coverage for 36 municipalities
- Forests: Full national coverage
- Libraries: Complete geographic distribution
- Compare multiple municipalities simultaneously
- Calculate completeness percentages
- Generate statistical reports
- Export data in multiple formats
- Interactive visualization and exploration
- Historical data tracking (when available)
Found a bug? Have a suggestion? Please open an issue on GitHub:
- API Documentation - Complete API reference
- Implementation Details - Technical deep dive
- Library Analysis Report - Feature-specific analysis
- Development Guide - Architecture and code organization
This project is licensed under the MIT License - see LICENSE file for details.
- β Commercial use permitted
- β Modification permitted
- β Distribution permitted
- β Private use permitted
β οΈ Include license and copyright noticeβ οΈ No warranty provided
See Contributors for a list of people who have contributed to this project.
- OpenStreetMap Community - For the incredible OSM dataset
- GeoPandas Team - For excellent geospatial tools
- Flask Team - For lightweight web framework
- Leaflet.js Community - For interactive mapping library
- π Check Usage Guide for common questions
- π§ See Troubleshooting for issues
- π¬ Open an issue on GitHub for bugs
- π€ See Contributing Guide to help improve the project
- β Core road analysis functionality
- β Forest coverage analysis
- β Library location mapping
- β Interactive web interface
- β REST API
- β Comprehensive documentation
- π Docker containerization
- π Advanced filtering options
- π Historical data tracking
- π Data export enhancements
For questions or inquiries about the project:
- π§ Email: [project contact]
- π GitHub: [project repository]
- π Website: [project website]
Last Updated: January 28, 2026
Status: β Active and Maintained
Version: 1.0.0
See Changelog for version history and release notes.