All 54 PDF files have been processed successfully!
input/- Original PDF filesoutput/- OCR text filesprocessed/- CSV files with extracted voter datalogs/- Processing logs
- Upload to Google Sheets with charts
- Interactive dashboards
- Parish and station analysis
- Gender analysis
- Real-time search
- Filter by name, gender, age, station, parish
- Export to CSV
- Beautiful modern UI
Your credentials file is ready: credentials.json.json
python google_sheets_enhanced.pyThis will create a single Google Spreadsheet with 5 sheets:
- All Voters - Complete dataset (filterable & sortable)
- Dashboard - Summary statistics with key metrics
- By Polling Station - Detailed breakdown by station
- By Parish - Parish-level aggregation
- Gender Analysis - Gender balance analysis
Features:
- 📊 Color-coded headers
- 🔍 Built-in filters
- 📈 Automatic statistics
- 🎨 Beautiful formatting
- 🔗 Shareable link (view-only)
python web_interface.pyOpen your browser to: http://localhost:5000
- 🔍 Real-time search - Search by name instantly
- 🎚️ Advanced filters - Filter by gender, station, parish, age range
- 📊 Live statistics - See male/female counts as you filter
- 💾 Export - Download filtered results as CSV
- 🎨 Modern UI - Beautiful gradient design
- 📱 Responsive - Works on mobile and desktop
-
Dashboard Sheet
- Total voters count
- Male/Female breakdown
- Age distribution (18-35, 36-60, 60+)
- Number of polling stations
-
By Polling Station Sheet
- Voter count per station
- Gender breakdown & percentages
- Age group distribution
- Parish and division mapping
-
By Parish Sheet
- Parish-level aggregation
- Average voters per station
- Total statistics per parish
-
Gender Analysis Sheet
- Sorted by gender gap
- Balance status (Balanced/Male-Heavy/Female-Heavy)
- Percentage breakdowns
- District code
- Constituency
- Sub-county
- Parish code and name
- Station code and name
- Official voter counts for comparison
Voter-extractor/
├── input/ # 54 PDF files
├── output/ # 54 OCR text files
├── processed/ # 54 CSV files
├── logs/ # Processing logs
├── voter_extractor.py # Main OCR script
├── google_sheets_enhanced.py # Enhanced Google Sheets uploader
├── web_interface.py # Web search interface
├── credentials.json.json # Google credentials
├── polling-station-data.txt.txt # Official station metadata
├── config.json # Station mapping
└── .env # API keys
python google_sheets_enhanced.pyResult: Single spreadsheet with 5 analyzed sheets + shareable link
python web_interface.pyResult: Web interface at http://localhost:5000
# Place PDF in input/ folder
python voter_extractor.py --batch- Open web interface
- Apply your filters
- Click "Export CSV"
- File downloads to your browser
Each voter record contains:
| Field | Description |
|---|---|
| Name | Full name |
| Gender | M/F |
| Dob | Date of birth (DD-MM-YYYY) |
| Age | Calculated age |
| Village | Village name |
| Polling Station | Station name |
| Parish | Parish name |
| Division | Division (Central/Northern/Southern) |
✅ Built-in filters on all sheets ✅ Sortable columns ✅ Color-coded headers ✅ Frozen header rows ✅ Auto-resized columns ✅ Percentage calculations ✅ Statistical summaries
✅ Live search ✅ Multiple filters simultaneously ✅ Instant statistics update ✅ Export functionality ✅ Gender color coding (Blue=Male, Pink=Female) ✅ Responsive design
After uploading, you can:
- Create pivot tables
- Add charts (bar, pie, line)
- Create custom formulas
- Share with specific people
- Download as Excel
- Embed in websites
Combine multiple filters:
- Name contains "AGABA"
- Gender = Male
- Age 25-40
- Parish = "RUTOOMA"
- Instant results!
-
✅ Run the Google Sheets uploader
python google_sheets_enhanced.py
-
✅ Launch the web interface
python web_interface.py
-
✅ Share the Google Sheets link with your team
-
✅ Use the web interface for quick searches
You now have a complete voter data management system with:
📊 54 polling stations fully processed 📈 Enhanced Google Sheets with 5 analysis sheets 🌐 Searchable web interface with real-time filtering 🎨 Beautiful visualizations and statistics 💾 Export capabilities for further analysis 🔍 Multi-criteria search functionality
All data is clean, organized, and ready for analysis!
- Use Google Sheets for sharing and collaboration
- Use Web Interface for quick local searches
- Export filtered results for reports
- Combine filters for detailed analysis
- Check logs/ folder if any issues
Enjoy your data analysis! 🎉