FloatChart turns the ARGO ocean observation network — 4,000+ autonomous floats, 46 million+ profiles of temperature, salinity, and depth — into something you can just talk to. No SQL, no NetCDF wrangling, no oceanography degree. Ask a question in plain English, get back a chart, a map, or a clean export.
"Show temperature trends in the Bay of Bengal for 2024" → done in under a second.
| 🔓 Open |
🤖 Agent-Ready |
📴 Offline-First |
🔒 Privacy-First |
🛡️ Safety-First |
| All data & code publicly accessible | Versioned REST API built for LLMs | Runs fully on-device after setup | Zero telemetry, zero tracking | 7-layer SQL sanitizer on every query |
|
Natural language → SQL → chart, automatically.
|
Click anywhere on Earth's oceans.
|
|
Pre-built views for real analysis.
|
Everything above, callable from code.
|
git clone <your-repo-url>
cd FloatChart
python local_setup.py # installs deps, configures DB, launches appOpens automatically at http://localhost:5000 🎉
🔑 Prerequisites
| Service | Cost | Get a key |
|---|---|---|
| NVIDIA NIM | Varies | build.nvidia.com |
| DeepSeek (optional) | Cheap | platform.deepseek.com |
⚙️ Configuration (.env)
DATABASE_URL=postgresql://postgres:YOUR_PASSWORD@localhost:5432/floatchart
NVIDIA_API_KEY=nvapi-xxxxxxxxxxxxxxxxxxxxxxxx
NVIDIA_MODEL=meta/llama-3.3-70b-instruct
# Optional providers
# ANTHROPIC_API_KEY=sk-ant-...
# OPENAI_API_KEY=sk-...
# DEEPSEEK_API_KEY=...curl -X POST http://localhost:5000/api/v1/query \
-H "Content-Type: application/json" \
-d '{"query": "Show average temperature in Bay of Bengal for 2024"}'{
"success": true,
"answer": "Average temperature in Bay of Bengal (2024): 28.4°C based on 3,201 measurements.",
"chart_type": "line",
"query_type": "Time-Series",
"record_count": 365,
"elapsed_ms": 218.4
}| Method | Endpoint | Description |
|---|---|---|
POST |
/api/v1/query |
Natural language → structured ocean data |
GET |
/api/v1/tools |
Machine-readable tool manifest for agents |
POST |
/api/v1/validate-sql |
Run the safety sanitizer manually |
GET |
/api/health |
Health check + DB status |
GET |
/api/stats |
Database statistics |
From Python:
import requests
def ask_ocean(question: str) -> dict:
r = requests.post("http://localhost:5000/api/v1/query",
json={"query": question, "max_rows": 500})
return r.json()
print(ask_ocean("Find the 5 nearest floats to Chennai")["answer"])Built for agents: every tool is auto-discoverable via curl http://localhost:5000/api/v1/tools, so LLM agents (including anything speaking MCP) can call query_ocean_data, get_temperature_trend, get_depth_profile, and more without hand-written glue code.
Every AI-generated SQL query is checked before it ever reaches the database:
| # | Layer | Blocks |
|---|---|---|
| 1 | Allowlist | Anything that isn't SELECT / WITH |
| 2 | Keyword scan | DROP, DELETE, INSERT, UPDATE, TRUNCATE, ALTER, GRANT |
| 3 | No stacking | ;-chained injection attempts |
| 4 | No comment tricks | -- and /* */ bypasses |
| 5 | LIMIT cap | Runaway million-row queries |
| 6 | No system abuse | pg_read_file, pg_sleep, COPY |
| 7 | Clear rejections | Every block returns a human-readable reason |
from sql_sanitizer import SQLSanitizer
SQLSanitizer.validate("SELECT AVG(temperature) FROM argo_data")
# → {"safe": True}
SQLSanitizer.validate("DROP TABLE argo_data;")
# → {"safe": False, "reason": "Blocked keyword detected: DROP"}FloatChart/
├── ARGO_CHATBOT/ # Main app — Flask server, LLM brain, SQL builder + sanitizer
│ └── static/ # Chat UI · Map UI · Dashboard UI
├── DATA_GENERATOR/ # Local ERDDAP data ingestion tool
├── local_setup.py # One-click setup wizard
├── requirements.txt
├── .env.example
└── CONTRIBUTING.md
| Layer | Technology |
|---|---|
| Backend | Python 3.9+ · Flask 2.0+ |
| AI / LLM | NVIDIA Llama 3.3 70B · DeepSeek · OpenAI · Claude · Gemini |
| Database | PostgreSQL 15+ · SQLAlchemy |
| Frontend | HTML5 · CSS3 · JavaScript |
| Visualization | Chart.js · Leaflet.js |
| Resource | Link |
|---|---|
| 🌊 ARGO Program | argo.ucsd.edu |
| 📡 ERDDAP Server | erddap.ifremer.fr |
| 🧠 NVIDIA NIM | build.nvidia.com |
| 🤝 Contributing | CONTRIBUTING.md |
MIT — free to use, modify, and distribute. See LICENSE.

