Spaces:
Running
A newer version of the Gradio SDK is available:
6.4.0
title: Geospatial Ai Query
emoji: ππ
colorFrom: purple
colorTo: gray
sdk: gradio
sdk_version: 6.3.0
app_file: app.py
pinned: false
version: 1.0.0
license: mit
tags:
- geospatial
- geospatial-ai
- AI
- ML
- DL
- LLM
- satellite-data
- earth-observation
- nlp
- maps
- data-visualization
- natural-language
- gradio
- huggingface
short_description: "Query geospatial data with natural language\_interface"
π Geospatial AI Query System
An intelligent natural language interface for querying and visualizing global geographic data including socioeconomic and environmental information at scales, i.e., countries, continents, and specific regions.
Features
π€ Natural Language Processing
- Ask questions in plain English about countries, regions, and global indicators
- LLM-powered query parsing using Llama-3.1-8B-Instruct
- Automatic extraction of locations, indicators, and visualization preferences
π Multi-Modal Visualization
- Interactive Maps: Choropleth maps with country-level data
- Dynamic Charts: Bar charts, scatter plots, and trend visualizations using Plotly
- Data Tables: Formatted tables with key socioeconomic indicators
π Comprehensive Data Coverage
- Demographic: Population, population density, urban/rural distribution
- Economic: GDP, GDP per capita, trade indicators
- Geographic: Country boundaries, areas, continents, regional groups
- Environmental: CO2 emissions, renewable energy usage, forest area (sample data)
- Derived Metrics: Population density, GDP growth rates
- Social: Development indices, education, health metrics
Example Queries
"Show me population of Asian countries"
"Compare GDP of European nations"
"What's the population density in Africa?"
"Display economic indicators for South American countries"
"Show me top 10 countries by GDP"
"Compare population vs GDP for BRICS nations"
How It Works
- Query Input: User enters natural language query
- LLM Parsing: Llama-3.1-8B-Instruct extracts structured information (locations, indicators, visualization type)
- Data Fetching: GeoPandas retrieves and processes geospatial data
- Visualization: Results rendered as interactive maps, charts, or tables
- Multi-format Output: View results in your preferred format
Technology Stack
- Frontend: Gradio for web interface
- LLM: Hugging Face Inference API (Mistral-7B-Instruct-v0.3)
- Geospatial: GeoPandas, Folium
- Visualization: Plotly Express
- Data: Natural Earth, World Bank Open Data
Data Sources
- Natural Earth: Country boundaries and geographic data
- World Bank: Economic and demographic indicators
- Derived Metrics: Population density, GDP per capita
Local Development
# Clone repository
git clone https://huggingface.co/spaces/rifatSDAS/geospatial-ai-query
cd geospatial-ai-query
# Install dependencies
pip install -r requirements.txt
# Set HuggingFace token (optional, for LLM features)
export HF_TOKEN=your_token_here
# Run application
python app.py
Deployment on Hugging Face Spaces
- Create new Space on Hugging Face
- Select Gradio SDK
- Upload
app.pyandrequirements.txt - Add
HF_TOKENin Space settings (Settings > Repository secrets) - Space will automatically build and deploy
Configuration
Environment Variables
HF_TOKEN: Hugging Face API token for LLM inference (optional)
Use Cases
Education
- Interactive geography - demography, economy, and socioeconomic lessons
- Data visualization for research projects
- Understanding global trends and patterns
Business Intelligence
- Market analysis by region
- Demographic research for expansion planning
- Competitive geographic and landscape analysis
Research
- Geographic - demographic, economy, and socioeconomic data exploration
- Regional to global scale analysis
- Trend identification and data visualization and extracttion
About the Developer
Built by Dr. Kazi Rifat Ahmed, a Full Stack Geospatial AI Engineer specializing in:
- AI/ML-DL for geospatial applications
- Cloud-native geospatial software engineering & architecture
- Large-scale Satellite/Earth Observation data data analysis, processing, analytics, and visualization
- Blockchain and Quantum Computing for geospatial applications
- Research Advanced Geospatial Science, Technology, and Applications
- Co-founder and Technical Lead for Satellite Data Services business in Space sector, i.e., QuentuED (https://quentued.de) and Sensor Aktor (https://sensor-aktor.de)
Tech Stack Proficiency
Python | Java | JavaScript | TypeScript | C/C++ | Bash | Cloud-Native Architecture (kubernetes) | DevOps | AI/ML/DL | MLOps | LLM Integration | Blockchain | Remote Sensing Science & Technology | Geospatial Data Science & Engineering
Research Interests
Geospatial AI | Satellite Data Engineering | Drone Sensors | Geospatial Big Data Analytics | Earth Observation Systems & Sensors | Advanced Remote Sensing Techniques | Space Technology | Quantum Computing | Blockchain | | Satellite Data Services | Planetary Science & Exploration
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Contributing
Contributions welcome! Please feel free to submit issues and pull requests.
Contact
For collaboration opportunities in satellite data services & applications, large-scale satellite data analytics, geospatial AI, blockchain & quantum computing for geospatial applications, or advanced geospatial science, technology & applications, feel free to reach out!
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference