Thank you for your interest in contributing to LatviaOSM-Check!
-
Clone the repository
git clone <repository-url> cd latvia_osm_project
-
Run setup
.\setup.ps1
-
Start development server
.\run.ps1
latvia_osm_project/
├── app.py # Flask web application
├── requirements.txt # Python dependencies
├── setup.ps1 # Environment setup script
├── run.ps1 # Application launcher
├── README.md # Main documentation
├── docs/ # Documentation
│ ├── QUICK_GUIDE.md # Quick start guide
│ └── IMPLEMENTATION_SUMMARY_NOVADS.md # Technical details
├── src/ # Source code
│ ├── processing/ # Data processing scripts
│ │ ├── create_fuzzy_mapping.py
│ │ ├── generate_corrected_completeness.py
│ │ ├── generate_quality_report.py
│ │ └── get_stats.py
│ └── utils/ # Utility functions
├── scripts/ # Pipeline scripts
│ ├── 00_convert_official_stats.py
│ ├── 02_extract_roads.py
│ ├── 03_process_municipalities.py
│ ├── 04_spatial_join.py
│ ├── 05_calculate_completeness.py
│ ├── 07_create_interactive_map.py
│ └── 08_create_lau1_map.py
├── templates/ # Flask HTML templates
│ ├── dynamic_map.html
│ └── with_dropdown.html
├── static/ # Static assets (CSS, JS, images)
├── data/ # Data files
│ ├── raw/ # Original datasets
│ └── processed/ # Processed datasets
└── outputs/ # Generated outputs
├── exports/ # Export files (CSV, GeoJSON)
└── maps/ # Generated maps
-
Create a new branch
git checkout -b feature/your-feature-name
-
Make your changes
-
Test locally
.\run.ps1
-
Commit and push
git add . git commit -m "Description of changes" git push origin feature/your-feature-name
The data processing pipeline follows these steps:
-
Fuzzy Name Matching (
src/processing/create_fuzzy_mapping.py)- Matches GeoJSON municipality names with official statistics
- Uses 80% similarity threshold
- Handles Latvian genitive case
-
Completeness Calculation (
src/processing/generate_corrected_completeness.py)- Calculates OSM road completeness per municipality
- Compares OSM data with official statistics
-
Quality Reports (
src/processing/generate_quality_report.py)- Generates data quality metrics
- Identifies data gaps
- Follow PEP 8 for Python code
- Use meaningful variable names
- Add docstrings to functions and classes
- Comment complex logic
Before submitting:
- Verify all 36 novads display correctly
- Check data integrity (no NULL values)
- Test map interactions
- Verify API endpoints return correct data
- Place raw data in
data/raw/ - Create processing script in
src/processing/ - Output processed data to
data/processed/ - Update documentation
When reporting issues, include:
- Description of the problem
- Steps to reproduce
- Expected behavior
- Actual behavior
- Screenshots (if applicable)
- Environment details (Python version, OS)
Open an issue or contact the maintainers.
This project is part of the LatviaOSM-Check initiative to improve OpenStreetMap coverage in Latvia.