Adding Weekly Data
Managing Funding Data
The Funding Tracker relies on a structured dataset to power its analytics and explore pages. To keep the dashboard current, follow this workflow to ingest new weekly funding data and update the currency conversion rates.
1. Configure Currency Conversion
Since the dashboard displays all amounts in INR (₹) while many deals are reported in USD ($), you must ensure the conversion rate is up to date before processing new data.
- Open
config/currency.js. - Update the conversion rate and the current date:
// config/currency.js
module.exports = {
rate: 83.50, // 1 USD = ₹83.50
date: "2025-11-30"
}
2. Add New Data
The application generates its internal data structure from source files (typically CSVs provided by funding trackers).
- Place your new weekly CSV file into the designated source directory (usually
data/sources/or as specified in your local environment). - Ensure the CSV columns align with the expected fields:
Company,Amount,Stage,Sectors,Investors,Location, andDate.
3. Generate the Dataset
Once the configuration and source files are ready, run the generation script. This script processes the raw data, applies the currency conversion, and updates the TypeScript data file used by the frontend.
Run the following command in your terminal:
npm run generate-data
This command performs the following actions:
- Reads raw source files.
- Converts USD amounts to INR Lakhs (where 100 = 1 Crore).
- Updates
data/funding-data.ts. - Refreshes the internal IDs used for deal detail pages.
4. Data Object Schema
The resulting data in data/funding-data.ts follows the interface used by components like DealCard and AnalyticsDashboard. If you are manually editing or verifying data, ensure it matches this structure:
| Field | Type | Description |
| :--- | :--- | :--- |
| id | string | Unique identifier (used for routing: /deal/[id]). |
| company | string | The name of the startup. |
| amount | number | The funding amount in Lakhs. Use 0 for undisclosed deals. |
| stage | string | Funding round (e.g., "Seed", "Series A"). |
| sectors | string[] | Array of relevant industry sectors. |
| investors | string[] | List of participating investors. |
| leadInvestor | string | The primary investor for the round. |
| date | string | ISO format date string (YYYY-MM-DD). |
| location | string | Headquarters of the company (e.g., "Bengaluru"). |
| description | string | A brief summary of the company's operations. |
| sourceUrl | string | (Optional) Link to the original news source. |
5. Verifying Changes
After running the generator, start the development server to verify the new deals appear correctly:
npm run dev
- Check the Analytics Page: Ensure the "Currency Conversion Rate" notice reflects the new rate from
config/currency.js. - Check the Explore Page: Sort by "Date" to ensure the latest weekly deals are appearing at the top of the list.
- Check Hero Stats: Verify the "Total Disclosed Funding" and "Total Deals" counts have increased accordingly.