{
  "id": 10188404,
  "title": "How I built a trade analytics dashboard with Streamlit and Plotly — and turned it into a product",
  "url": "https://urgent.news/2026/09/27/how-i-built-a-trade-analytics-dashboard-with-streamlit-and-plotly-and",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-27T09:57:26.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/sujal_makwana_efe39a648c2/how-i-built-a-trade-analytics-dashboard-with-streamlit-and-plotly-and-turned-it-into-a-product-4fbj"
  },
  "original_language": "en",
  "account": "The author is an AI/ML student who builds Streamlit dashboards as a freelancer. They encountered repetitive code during a trade analytics project and decided to create a boilerplate to streamline the process. This dashboard, LandedIQ, calculates trade unit economics - landed cost, net profit, and margin - instantly. It supports live USD ↔ INR conversions via ExchangeRate-API, with an offline fallback. Users can upload their CSV product databases with zero code changes.\n\nThe project uses Python 3.11, Streamlit 1.35, Plotly 5.18, Pandas 2.0, and Requests. It's recommended not to use Streamlit ECharts, as it breaks on Python 3.13. Plotly works seamlessly across all Python versions. The code is organized into modules: app.py, components/, data/, and utils/. This modular structure makes the code easier to maintain and test.\n\nEach chart is a pure function that returns a Plotly figure, which can be tested independently. The currency conversion API gets called on every rerender if not cached. To avoid this, the code uses the @st.cache_data decorator with a 1-hour Time-To-Live (ttl). If the API fails, it returns a hard-coded fallback of 83.50.\n\nThe dashboard was deployed on Railway, but Streamlit needed to be manually set as the start command: streamlit run app.py --server.port $PORT --server.address 0.0.0.0. The author cleaned up the code, added a PDF setup guide, and listed the boilerplate on Gumroad and Contra. The live demo is available at landediq-production.up.railway.app. The full boilerplate is accessible for those who want to customize it for their own use case. The author advises starting with Plotly, setting up the module structure from the beginning, and writing the .env.example file before forgetting API keys.",
  "summary": "I'm an AI/ML student and I build Streamlit dashboards as a freelancer on the side. A few weeks ago I was working on a trade analytics project and realized I was writing the same landed cost logic, currency conversion and chart code from scratch — again. So I packaged what I built into a proper boilerplate. Here's how it works and what I learned. What the dashboard does LandedIQ calculates trade…",
  "key_points": [
    "Author built LandedIQ dashboard to calculate trade unit economics",
    "Uses Streamlit, Plotly, Pandas, and Requests for development",
    "Deployed on Railway with manual Streamlit server configuration"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}