Hugdrigo's picture
Upload 3 files
a56b06d verified
|
Raw History Blame Contribute Delete
4.71 kB
metadata
title: TradeScope | Export Intelligence Laboratory
emoji: 🌐
colorFrom: green
colorTo: blue
sdk: static
app_file: index.html
pinned: false
license: mit
short_description: Export concentration and trade scenario analysis
tags:
  - international-trade
  - operations-research
  - analytics
  - data-visualization
  - business-intelligence
  - simulation
  - javascript

TradeScope | Export Intelligence Laboratory

An interactive, offline-first international trade analytics and decision-support application, designed for export portfolio analysis, market concentration, risk exposure and scenario planning. It runs in any modern browser as a static Hugging Face Space. No installation, API keys, backend services or paid infrastructure are needed.

Features

  1. Intelligence Overview: export portfolio value, market and product concentration, effective number of markets, revenue-weighted risk, tariff and growth assumptions.
  2. Market Matrix: interactive product-by-destination heatmap and market detail panels.
  3. Product Portfolio: product composition, destination breakdown, weighted risk and revenue concentration.
  4. Trade Shock Studio: configurable single-market demand disruption and incremental tariff scenarios, with recalculated export totals and concentration.
  5. Diversification Planner: deterministic, capacity-constrained reallocation illustration toward existing destinations with lower assumed risk and explicit volume caps.
  6. Data & Methodology: CSV import with validation, CSV templates, JSON audit, Markdown report, trade-flow exports and detailed assumptions.

Import your own trade flows

Select Data & Methodology → Select CSV. Required headers:

product,market,exports_usd_m,tariff_pct,risk_score,growth_pct
Quinoa,Chile,25,5,20,6
Quinoa,Germany,15,9,24,4
Olive Oil,Chile,12,6,20,5
Olive Oil,Germany,8,8,24,3
  • exports_usd_m: strictly positive exports in millions of USD.
  • tariff_pct: assumed applicable tariff from 0 to 100%.
  • risk_score: user-defined risk indicator on a 0–100 scale. It is not an official country risk rating.
  • growth_pct: assumed annual market growth from -100% to 200%.
  • Provide at least two products, two destinations and 4–400 unique product/market pairs.
  • Imports are performed locally. Invalid data are rejected without replacing the active dataset.

Analytical methodology

  • Market concentration: (HHI = \sum_j (X_j / \sum_k X_k)^2), displayed × 10,000.
  • Effective market count: (1/HHI).
  • Revenue-weighted scores: (\sum_i X_i z_i / \sum_i X_i), calculated separately for risk, tariff and assumed growth.
  • Trade shock model: a selected market's flows are multiplied by ((1-d)\max(0, 1-1.5t/100)), with d as the demand-disruption fraction and t as the additional tariff in percentage points. The elasticity coefficient is an illustrative assumption.
  • Diversification demonstration: relocate a configurable share of flows from one market to existing lower-risk destinations for the same product. Each receiving destination has a cap of 50% of its baseline product flow. Destinations can have up to 15 percentage points higher tariffs. A deterministic greedy ranking favors lower assumed risk, lower tariffs and higher assumed growth. This is not an exact global optimum, business forecast or feasible sales plan.

Limitations and research integrity

Every bundled dataset is synthetic. The included values, market risks, tariffs and growth rates are fictional inputs created for demonstration, not official statistics or live international trade data. The application performs real and reproducible calculations on the active inputs, but its scenarios are stylized illustrations. It does not model general-equilibrium adjustments, exchange rates, rules of origin, non-tariff barriers, transport costs, bilateral agreements or new customer acquisition. Verify your source data before drawing academic, commercial or policy conclusions.

All imported content is processed in the browser; no data are sent to a server by this project. Refreshing the page discards changes unless you export your data.

Technology

Vanilla HTML5, CSS3, ES2020 JavaScript, inline SVG and browser-based CSV/JSON exports. No CDN, package manager or backend dependency.

Local testing

The standalone index.html can be opened directly in a browser. Development tests are included in the separate code + tests archive, not in the three-file deployment archive. Tests cover deterministic numerical formulas, CSV validation/round-trips, scenario conservation and browser interactions.

License

MIT. Copyright © 2026 Hugdrigo.