A sophisticated web application that analyzes financial data against FRED (Federal Reserve Economic Data) indicators with AI-powered insights. Upload your long-range financial plan and gain deep insights into how macroeconomic trends correlate with your business metrics.
- Automatic Time Period Detection: Intelligently detects date ranges from uploaded data (quarterly, monthly, annual)
- Industry-Specific Analysis: Pre-configured FRED indicators for 6 industries:
- Gaming
- Technology
- Manufacturing
- Retail
- Healthcare
- Finance
- Real FRED API Integration: Pulls live economic data including:
- Corporate Profits After Tax
- Industrial Production Index (by industry)
- Producer Price Index (by industry)
- Real GDP (industry breakdown)
- Employment & Wages (by sector)
- Financial indices (Nasdaq, S&P sector data)
Combines three key indicators to calculate margin pressure:
Margin Pressure = (Corporate Profits ร Industrial Production) / PPI
This unique metric helps identify when rising costs are squeezing margins.
- Leverages Deepseek API for intelligent analysis
- Identifies key trends and risk factors
- Provides strategic recommendations
- Generates market outlook projections
- Interactive dual-axis charts for correlation analysis
- Margin pressure trend visualization
- Top correlations bar chart
- Real-time economic indicator dashboard
- Modern, gradient-based UI design
- Node.js (v14 or higher)
- npm or yarn
- FRED API Key (get free at https://fred.stlouisfed.org/docs/api/api_key.html)
- Deepseek API Key (optional, for AI insights)
Follow these steps to get the application running from scratch:
git clone <repository-url>
cd hackathon-macrodataInstall the development tools (concurrently) for running both services:
npm installcd server
npm install
cd ..cd client
npm install
cd ..Or install all at once:
npm run install:allCreate a .env file in the root directory with your API keys:
# In the root directory (hackathon-macrodata/)
touch .envAdd the following to .env:
DEEPSEEK_API_KEY=your_deepseek_api_key_here
FRED_API_KEY=your_fred_api_key_hereGet your API keys:
- FRED API: https://fred.stlouisfed.org/docs/api/api_key.html (free)
- Deepseek API: https://platform.deepseek.com/ (optional, for AI insights)
From the root directory, run:
npm run devThis starts both the backend (port 5001) and frontend (port 3000) concurrently.
You should see:
โจ Server running on port 5001
๐ FRED API: โ Configured
๐ค Deepseek API: โ Configured
Compiled successfully!
Open your browser to http://localhost:3000
Terminal 1 - Backend:
npm run server
# or: cd server && npm run devTerminal 2 - Frontend:
npm run client
# or: cd client && npm start- Build the React app:
cd client
npm run build- Start the production server:
cd server
npm startThe app will be available at http://localhost:5001
This project is configured for easy deployment to Vercel as a full-stack application.
- Vercel account (free at https://vercel.com)
- Git repository (GitHub, GitLab, or Bitbucket)
- Push your code to a Git repository:
git init
git add .
git commit -m "Initial commit"
git remote add origin <your-repo-url>
git push -u origin main-
Import project to Vercel:
- Go to https://vercel.com/new
- Import your repository
- Vercel will auto-detect the configuration from
vercel.json
-
Add Environment Variables in Vercel:
- Go to Project Settings โ Environment Variables
- Add the following:
DEEPSEEK_API_KEY=your_deepseek_api_key FRED_API_KEY=your_fred_api_key
-
Deploy:
- Click "Deploy"
- Vercel will build and deploy both frontend and backend
The vercel.json file configures:
- Backend:
server/server.jsruns as a serverless function - Frontend:
client/builds as a static site - Routes: API calls to
/api/*route to the backend, everything else to the frontend
For Production (Vercel):
DEEPSEEK_API_KEY: Your Deepseek API keyFRED_API_KEY: Your FRED API key
For Frontend (optional):
REACT_APP_API_URL: Leave empty when deploying to Vercel (uses same domain)
You can also deploy frontend and backend separately:
Frontend (Vercel):
- Root Directory:
client - Build Command:
npm run build - Output Directory:
build - Framework: Create React App
- Environment Variable:
REACT_APP_API_URL=https://your-backend-url.com
Backend (Render/Railway/Heroku):
- Root Directory:
server - Start Command:
npm start - Add environment variables:
DEEPSEEK_API_KEY,FRED_API_KEY
hackathon-macrodata/
โโโ server/ # Backend server
โ โโโ server.js # Main Express server
โ โโโ fred-api.js # FRED API integration
โ โโโ data-processing.js # Data processing utilities
โ โโโ deepseek-api.js # AI insights integration
โ โโโ .env # API keys configuration
โ โโโ nexus_gaming_financials.csv # Sample data
โ โโโ package.json # Server dependencies
โโโ client/ # React frontend
โ โโโ src/
โ โ โโโ App.js # Main React component
โ โ โโโ App.css # Modern styling
โ โ โโโ index.js # Entry point
โ โโโ public/
โ โโโ package.json # Client dependencies
โโโ package.json # Root scripts for running both
โโโ .gitignore # Git ignore rules
โโโ README.md # This file
- Supports Excel (.xlsx, .xls) and CSV files
- Automatic date detection from column headers (Q1-2021, FY-2022, etc.)
- Extracts financial metrics automatically
Choose from 6 pre-configured industries. Each has relevant FRED indicators:
- Gaming: Entertainment sector indicators
- Technology: Tech-specific production and employment data
- Manufacturing: Industrial production and PPI
- Retail: Consumer goods and retail trade data
- Healthcare: Healthcare expenditures and employment
- Finance: Financial sector profits and indices
- Choose which financial metrics to correlate with FRED data
- Multiple metrics can be analyzed simultaneously
- AI Insights: Strategic analysis powered by Deepseek
- Margin Pressure Chart: Visualize cost pressure trends
- Correlation Charts: See how your metrics align with economic indicators
- FRED Dashboard: Track current economic indicator values
Returns available industries and their configuration
Returns FRED indicators for a specific industry
Upload and parse financial data file
- Accepts: Excel, CSV
- Returns: Detected metrics, time period, preview
Run correlation analysis
- Body:
{ industry, startDate, endDate, selectedMetrics } - Returns: FRED data, correlations, margin pressure, AI insights
Health check and API key status
The system intelligently parses various date formats:
- Quarterly: Q1-2021, Q2 2021
- Fiscal Year: FY-2021, FY2021
- Standard dates: 2021-01-01, 01/01/2021
A proprietary metric that combines:
- Corporate Profits: Overall profitability trends
- Industrial Production: Efficiency and output
- Producer Price Index: Input cost inflation
Higher values indicate healthier margins; lower values signal cost pressures.
Pearson correlation coefficients between your financial metrics and economic indicators:
- > 0.7: Strong positive correlation
- 0.4 - 0.7: Moderate positive correlation
- -0.4 - 0.4: Weak/no correlation
- < -0.7: Strong negative correlation
All economic data is sourced from the Federal Reserve Economic Data (FRED) API:
- Documentation: https://fred.stlouisfed.org/docs/api/fred/
- Data Coverage: Over 800,000 economic time series
- Update Frequency: Varies by series (daily, monthly, quarterly)
The platform uses Deepseek's latest language model to:
- Analyze correlation patterns
- Identify market trends
- Highlight risk factors
- Provide actionable recommendations
- Generate forward-looking insights
The server/nexus_gaming_financials.csv file contains:
- Quarterly financial data (Q1-2021 through Q4-2026)
- Revenue, costs, profits, and other metrics
- Perfect for testing the gaming industry analysis
Backend:
- Node.js & Express
- Axios (API calls)
- XLSX (Excel parsing)
- CSV-Parse
Frontend:
- React 18
- Chart.js & react-chartjs-2
- Axios
- Modern CSS with gradients
APIs:
- FRED (Federal Reserve Economic Data)
- Deepseek (AI insights)
MIT License - Feel free to use and modify for your needs.
Built for analyzing business financials against macroeconomic trends.
- FRED API by Federal Reserve Bank of St. Louis
- Deepseek AI for intelligent insights