Project Info
Inspiration
San Francisco’s food-truck and small-vendor scene thrives on location, timing, and crowd flow. Yet most operators still rely on gut instinct or last week’s experience to choose spots. We wanted to bring data-driven insight—the kind big retailers use—to small businesses that move every day.
What it does
Foot Traffic Finder is a live, predictive map that shows how busy each area of San Francisco is now—and how busy it will be in the next few days. Users can search any location to get a future forecast and a Gemini-generated summary explaining events and why it is rated that score. The goal: help small businesses optimize staffing, inventory, and daily placement for maximum profit.
How we built it
Frontend: Next.js + TypeScript, styled with Tailwind CSS and Radix UI, animated via framer-motion. Map: Mapbox GL JS for a full-screen interactive experience with dynamic data fetching (React Query). Backend: FastAPI (Python) serving endpoints for weather, events, and traffic data. Prediction Model: Multiple Linear Regression (scikit-learn) trained on historical “Popular Times,” weather forecasts (Open-Meteo), and event data (Google Events via SerpApi). AI Summaries: Google Gemini API turns prediction data into human-readable insights.
Challenges we ran into
Handling API rate limits and combining asynchronous data sources (weather + events + traffic).
Accomplishments we're proud of
Built a fully interactive, predictive map that is user-friendly! Utilized APIs by debugging over several cruel nights!
What we learned
How important small UX/UI touches are Best practices for utilizing the API calls without running into rate limits
What's next
Integrate a more robust statistical prediction for future dates, linear regression is an OK start, but we could utilize machine learning models with confidence intervals to make our data even MORE accurate!
Foot Traffic Finder
Created by: Thinsang Tamanag, Michael Zheng, Simon Lamichhane
A modern, data-driven web application that provides a live and predictive foot traffic map of San Francisco, designed to help food truck owners find optimal locations.
Core Features
- Live & Predictive Map: A full-screen, interactive Mapbox map visualizing real-time and predicted foot traffic across San Francisco.
- Dynamic Visualization: The map displays a color-coded heat map indicating busyness levels from low to high.
- Interactive Popups & Legend: Hover over a location to see its name and busyness score. A clear legend explains the color-coding.
- Prediction Engine: Select a location and a future date to receive a foot traffic prediction based on historical data, weather, and local events.
- AI-Powered Summaries: An integrated Gemini model provides a concise, human-readable summary of the prediction.
Tech Stack
- Frontend: Next.js (TypeScript), Tailwind CSS, Radix UI,
framer-motion, Mapbox GL JS, React Query. - Backend: Python (FastAPI), Scikit-learn, Google Gemini.
Data Sources
- Foot Traffic: Google Maps "Popular Times" data (via OutScraper API or similar source).
- Events: Google Events API via SerpApi.
- Weather: Open-Meteo API.
Quickstart
1. Backend Setup
First, set up and run the FastAPI server.
# 1. Create a virtual environment (only once)
python -m venv .venv
# 2. Activate it (run this every time you open a new terminal)
.\.venv\Scripts\Activate.ps1
# 3. Install dependencies
pip install -r backend/requirements.txt
# 4. Set up environment variables
# Copy `backend/ENV.example` to `backend/.env` and fill in your API keys:
# OUTSCRAPER_API_KEY (foot traffic)
# SERPAPI_API_KEY (events)
# GEMINI_API_KEY (AI summaries)
# 5. Run the server
cd backend
uvicorn app.main:app --reload --port 8000
The backend will be running at http://localhost:8000.
2. Frontend Setup
In a new terminal, set up and run the Next.js frontend.
# 1. Navigate to the frontend directory
cd frontend
# 2. Install dependencies
npm install
# 3. Set up environment variables
# Create `frontend/.env.local` and add:
# NEXT_PUBLIC_MAPBOX_TOKEN=pk.YOUR_MAPBOX_TOKEN_HERE
# NEXT_PUBLIC_API_BASE=http://localhost:8000
# 4. Run the development server
npm run dev
# or specify the port explicitly
npx next dev -p 3000
The application will be accessible at http://localhost:3000.
Analysis
View
Metric
- 9
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- FastAPIIn code
- Next.jsIn code
- PythonIn code
- ReactIn code
- Tailwind CSSIn code
- TypeScriptIn code
- Google GeminiClaimed
7 of 8 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
84 KB
Source files
40
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
Thinsang/calhacks2025
51 files · 673 KB · @ b77eee0
Structure
Interface
25 files · 49%Screens, components and styles rendered to the user.
API & routing
7 files · 14%Request entry points: routes, handlers and controllers.
Application logic
2 files · 4%Domain rules, services and shared utilities.
Data & schema
2 files · 4%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript58%
- Python35%
- CSS4%
- Markdown4%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/package.json
npm · 22- @radix-ui/react-label
- @radix-ui/react-popover
- @tanstack/react-query
- autoprefixer
- clsx
- lucide-react
- mapbox-gl
- next
- next-themes
- postcss
- react
- react-day-picker
- react-dom
- react-map-gl
- tailwindcss
- tailwindcss-animate
- +6 more
backend/requirements.txt
pypi · 8- fastapi
- google-generativeai
- httpx
- numpy
- pandas
- pydantic-settings
- scikit-learn
- uvicorn[standard]
package.json
npm · 3- class-variance-authority
- date-fns
- framer-motion
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.