An interactive web application for exploring countries worldwide. Search, filter, visualize population density, and discover detailed country information.
- Interactive world map with 200+ countries
- Smart search with autocomplete
- Filter by region (Africa, Americas, Asia, Europe, Oceania)
- Population density visualization
- Capital city markers with clustering
- Detailed country information
- CSV export
- Shareable country links
- Fully responsive
- Works offline (PWA)
- Python 3 (or Python 2, Node.js, or PHP)
- Modern web browser
-
Clone the repository
git clone https://github.com/Affaniqbal234/geo-country-explorer.git cd geo-country-explorer -
Start a local server
Important: You must use a local server. Opening
index.htmldirectly will cause CORS errors.# Python 3 (recommended) python -m http.server 8000 # Python 2 python -m SimpleHTTPServer 8000 # Node.js npx serve # PHP php -S localhost:8000
-
Open in browser
Navigate to
http://localhost:8000
That's it! No build step, no configuration needed.
- Search: Type country name in the search box
- Filter: Select a region from the dropdown
- Choropleth: Click "Population Density" to visualize data
- Country Info: Click any country on the map
- Export: Click "Export CSV" to download data
- Share: Copy URL to share specific country view
- Vanilla JavaScript (ES6+)
- Leaflet.js - Interactive maps
- OpenStreetMap - Map tiles
- Natural Earth - Country data
- REST Countries API - Additional data
Map doesn't load?
- Use a local server (not file://)
- Check internet connection
- Try a different browser
Data doesn't load?
- Verify
data/countries.geojsonexists - Check browser console for errors
- Clear browser cache
Port already in use?
python -m http.server 3000 # Use different portMIT License - see LICENSE file.
Feel free to contribute to this project and help me improve this project


