InfoMarkets

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".

src/lib/categories.ts
// 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

FeatureHow
Map markersColor-coded dots by category — politics blue, crypto orange, sports green
Markets panelCategory filter chips for quick filtering
UI StoreuiStore.categoryFilter tracks active filters
SignalsCategory context included in signal descriptions

Selected components are provided under the MIT License.