Categories
Market classification system used in InfoMarkets.
Markets are automatically classified into categories using keyword matching in src/lib/categories.ts. Each category has a primary emoji and optional sub-category markers.
Category List
🏛️ Politics
Elections, legislation, diplomacy, conflicts, legal proceedings.
Sub-categories: 🗳️ ⚔️ 📜 🤝 ⚖️
₿ Crypto
Bitcoin, Ethereum, DeFi, token prices, blockchain events.
🏆 Sports
All major sports leagues and competitions worldwide.
Sub-categories: ⚽ 🏀 ⚾ 🏒 🎾 ⛳ 🏎️ 🥊 🏈 🏏 🥇
📈 Finance
Stock markets, interest rates, economic indicators, corporate earnings.
💻 Tech
Product launches, AI developments, company milestones, platform updates.
🎭 Culture
Entertainment, awards, media events, social trends.
🌐 Other
Weather, science, health, and everything else.
Sub-categories: 🌡️
How Classification Works
The categorizeMarket() function scans the market title and description against keyword lists. Markets that don't match any specific category fall into "Other".
// Simplified example of keyword matching
function categorizeMarket(title: string, description: string): Category {
const text = `${title} ${description}`.toLowerCase();
if (POLITICS_KEYWORDS.some(k => text.includes(k))) return 'Politics';
if (CRYPTO_KEYWORDS.some(k => text.includes(k))) return 'Crypto';
if (SPORTS_KEYWORDS.some(k => text.includes(k))) return 'Sports';
// ...
return 'Other';
}Where Categories Are Used
| Feature | How |
|---|---|
| Map markers | Color-coded dots by category — politics blue, crypto orange, sports green |
| Markets panel | Category filter chips for quick filtering |
| UI Store | uiStore.categoryFilter tracks active filters |
| Signals | Category context included in signal descriptions |