Skip to main content

Geographic + Socioeconomic + Climate intelligence with ML, auto-update, and visualization - World's most comprehensive city data platform

Project description

🌍 GeoDataSim v0.3.0 - Intelligence Boost

World's most comprehensive city data platform with ML, auto-update, and visualization

PyPI version Python 3.10+ License: MIT

Geographic + Socioeconomic + Climate intelligence library with ML clustering, auto-update engine, and interactive visualization. All data from free public APIs (World Bank, REST Countries, Open-Meteo).


🚀 What's NEW in v0.3.0 - Intelligence Boost

🤖 ML-Powered Intelligence

  • City Clustering (KMeans, DBSCAN, Agglomerative)
  • 10x Faster Similarity (numba JIT optimization)
  • Advanced Feature Engineering (sklearn integration)

📊 Interactive Visualization

  • Plotly Charts (scatter, heatmap, radar, bar, geo)
  • Export to HTML (interactive, shareable)
  • Quick visualization APIs

🔄 Auto-Update Engine

  • Monthly data refresh from World Bank API
  • 30-day cache (avoids unnecessary API calls)
  • Update history tracking
  • No API key required (100% free sources)

✅ Production-Ready Features

  • Pydantic validation (type-safe data models)
  • Progress bars (tqdm integration)
  • Enhanced geopy distance calculations
  • Comprehensive error handling

📦 Installation

pip install geodatasim

Requirements: Python 3.10+


⚡ Quick Start

Basic Usage

from geodatasim import City

# Create city with automatic data loading
istanbul = City("Istanbul")

print(f"Population: {istanbul.population:,}")
print(f"GDP per capita: ${istanbul.gdp_per_capita:,.2f}")
print(f"Climate: {istanbul.climate_zone} ({istanbul.avg_temperature}°C)")
print(f"HDI: {istanbul.hdi}")

# Find similar cities
similar = istanbul.find_similar(n=5)
for city in similar:
    print(f"  - {city.name}, {city.country}")

🆕 ML Clustering (v0.3.0)

from geodatasim.ml import CityClustering, cluster_cities
from geodatasim.analysis import BatchAnalyzer

# Get data
analyzer = BatchAnalyzer(["Istanbul", "Paris", "Tokyo", "New York"])
df = analyzer.to_dataframe()

# Cluster cities
clustering = CityClustering(n_clusters=3, method='kmeans')
clustering.fit(df)

print(f"Silhouette score: {clustering.silhouette_score_:.3f}")
summary = clustering.get_cluster_summary(df)
print(summary)

🆕 Interactive Visualization (v0.3.0)

from geodatasim.viz import CityVisualizer

viz = CityVisualizer()

# Scatter plot
fig = viz.scatter(df, x='population', y='gdp_per_capita',
                  color='region', size='population')
fig.show()  # Interactive in browser
fig.write_html("cities.html")

# Correlation heatmap
viz.heatmap(df, columns=['population', 'gdp', 'hdi']).show()

# Radar chart comparison
viz.radar(df, metrics=['population', 'gdp', 'hdi'],
          cities=['Istanbul', 'Paris', 'Tokyo']).show()

🆕 Auto-Update Engine (v0.3.0)

from geodatasim.core.updater import UpdateEngine

engine = UpdateEngine()

# Check if update needed (30-day interval)
needs_update = engine.should_update('Istanbul', 'population')

# Update single city from APIs
updated = engine.update_city_all(city_data)

# Update all cities with progress bar
updated_cities = engine.update_all_cities(cities_list)

📊 Features

v0.3.0 - Intelligence Boost 🆕

  • 🤖 ML Clustering (KMeans, DBSCAN, Agglomerative)
  • ⚡ 10x Faster Similarity (numba optimization)
  • 📊 Interactive Visualization (plotly)
  • 🔄 Auto-Update Engine (monthly refresh)
  • ✅ Pydantic Validation
  • 📈 Progress Bars (tqdm)

v0.2.0 - Data Science Tools

  • ✅ Batch Analysis
  • ✅ Rankings & Filtering
  • ✅ Export (CSV, Excel, JSON, Markdown)
  • ✅ pandas Integration
  • ✅ Statistical Analysis

v0.1.0 - Core Features

  • ✅ 46 cities from 36 countries
  • ✅ 20+ data fields per city
  • ✅ World Bank API integration
  • ✅ Smart caching (90-day TTL)
  • ✅ City similarity algorithm
  • ✅ Distance calculations

📈 Data Sources

All from free, public domain sources:

Source Data API Key Required
World Bank GDP, Population, HDI ❌ No
REST Countries Country metadata ❌ No
Open-Meteo Climate data ❌ No

Safe for commercial use - All sources are public domain


🎯 Use Cases

Data Science & ML

from geodatasim.ml import CityClustering
clustering = CityClustering(n_clusters=5)
clustering.fit(cities_df)

Urban Planning

istanbul = City("Istanbul")
similar = istanbul.find_similar(min_population=5_000_000)

Business Intelligence

from geodatasim.analysis import CityRankings
rankings = CityRankings()
wealthy_cities = rankings.filter_cities(min_gdp=40000)

Interactive Dashboards

from geodatasim.viz import CityVisualizer
viz = CityVisualizer()
viz.scatter(df, 'population', 'gdp').show()

📖 Examples

# Test basic features
python test_v0_3_0.py

# Run comprehensive examples
python examples/v0_3_0_intelligence_boost.py

🛣️ Roadmap

v0.4.0 - Performance (Polars, UMAP, PyArrow) v0.5.0 - Geo Intelligence (geopandas, folium) v1.0.0 - Complete Platform (100+ cities, predictions)


📄 License

MIT License


📬 Contact

PyPI: pypi.org/project/geodatasim GitHub: github.com/teyfikoz/GeoDataSim


GeoDataSim v0.3.0 🚀 ML · Visualization · Auto-Update · Intelligence

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geodatasim-0.3.2.tar.gz (49.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geodatasim-0.3.2-py3-none-any.whl (50.8 kB view details)

Uploaded Python 3

File details

Details for the file geodatasim-0.3.2.tar.gz.

File metadata

  • Download URL: geodatasim-0.3.2.tar.gz
  • Upload date:
  • Size: 49.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geodatasim-0.3.2.tar.gz
Algorithm Hash digest
SHA256 9f9966f2e3070297910731c8c556f11832be825ad8ffaaaecb1d8a67abae976b
MD5 6a024a31c6443693bc5803ece024fb4e
BLAKE2b-256 c1994f253fa094dc49e5ea2a639f47a473ad5061b276a7a6e942afcdb6c1f30f

See more details on using hashes here.

Provenance

The following attestation bundles were made for geodatasim-0.3.2.tar.gz:

Publisher: publish.yml on teyfikoz/geodatasim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file geodatasim-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: geodatasim-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 50.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geodatasim-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 65ef4740bd1f5436b82af605472f7b74915f1636bc7dc14e48a42d11ba996748
MD5 66657054a8de2a613f5974cf367d0711
BLAKE2b-256 e42a4bf236ea1e553fa8da432ca8d78aff37322ccf8d2384c3afc30db719ce4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for geodatasim-0.3.2-py3-none-any.whl:

Publisher: publish.yml on teyfikoz/geodatasim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page