A comprehensive hackathon project providing AI-powered intelligence for small businesses in San Francisco. The platform includes three main features: Risk Prediction Engine, Lease Negotiation Intelligence, and City Fee Analysis. This project aims to empower local entrepreneurs with data-driven insights.
- ML-powered risk assessment using Random Forest and Gradient Boosting models
- Predicts business failure risk based on:
- Business age and activity
- Permit history
- Code enforcement complaints
- Location status
- Real-time risk alerts and recommendations
- Market analysis by neighborhood
- AI-generated negotiation strategies using Nemotron LLM
- Comparable lease rate analysis
- Counter-proposal generation
- Customized talking points and concession suggestions
- Fee analysis and breakdown for permits and licenses
- Waiver opportunity identification (small business, nonprofit, new business)
- Compliance requirement checklist with AI-powered advisor
- Renewal schedule tracking
- Python 3.10+
- DGX Spark with Nvidia Nemotron LLM (via OpenAI-compatible API)
- SF.gov Open Data API for business, permit, and complaint data
- Streamlit for interactive web UI
- scikit-learn, pandas, numpy for ML and data processing
- OpenAI client library (configured for local Nemotron endpoint)
sf-business-intelligence/
โโโ data/
โ โโโ raw/ # Raw data from SF.gov API
โ โโโ processed/ # Cleaned and merged datasets
โ โโโ models/ # Trained ML models
โโโ src/
โ โโโ data_pipeline/ # Data download, cleaning, merging
โ โโโ risk_engine/ # Risk prediction model and alerts
โ โโโ lease_intelligence/ # Lease market analysis and AI strategies
โ โโโ city_intelligence/ # Fee analysis and compliance
โ โโโ utils/ # Config and Nemotron client
โโโ app/
โ โโโ streamlit_app.py # Main Streamlit app
โ โโโ pages/ # Feature pages
โโโ notebooks/ # Data exploration notebooks
โโโ requirements.txt
โโโ setup.py
โโโ README.md
- Python 3.10 or higher
- Access to SF.gov Open Data API (optional app token)
- Nemotron LLM running locally or remotely (for AI features)
-
Clone or navigate to the project directory:
cd sf-business-intelligence -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables (optional): Create a
.envfile in the project root:SF_DATA_APP_TOKEN=your_sf_data_token NEMOTRON_BASE_URL=http://localhost:8000/v1 NEMOTRON_API_KEY=local-nemotron-key NEMOTRON_MODEL=nvidia/nemotron-4-340b-instruct
-
Start the Streamlit app:
streamlit run app/streamlit_app.py
-
Access the app: Open your browser to
http://localhost:8501 -
Navigate features:
- Risk Dashboard: Train models and analyze business risk
- Lease Negotiation: Get market analysis and AI strategies
- City Fees: Analyze fees and check compliance
The platform uses SF.gov Open Data API:
- Business Registry (
rqzj-sfat): Business registration and license data - Building Permits (
p4e4-5k3y): Permit applications and approvals - Code Enforcement Complaints (
ktji-gkfc): Complaint records
The platform uses Nemotron LLM for:
- Generating lease negotiation strategies
- Creating counter-proposals
- Providing compliance requirement advice
Note: Ensure Nemotron is running and accessible at the configured endpoint. The OpenAI client library is used with a local Nemotron endpoint.
Edit src/utils/config.py to customize:
- SF.gov API endpoints and datasets
- Nemotron LLM endpoint and model
- Risk thresholds
- Data directories
- Navigate to "Risk Dashboard"
- Train or load a risk model
- Enter business information or analyze trends
- Review risk scores and alerts
- Navigate to "Lease Negotiation"
- Enter business and lease information
- Get market analysis
- Generate AI-powered negotiation strategy
- Create counter-proposals
- Navigate to "City Fees"
- Enter business information
- Select required permits
- Review fee breakdown and waiver opportunities
- Check compliance requirements
pytest tests/jupyter notebook notebooks/exploration.ipynbblack src/
flake8 src/This project is created for hackathon purposes.
- SF.gov Open Data for providing public datasets
- Nvidia for Nemotron LLM
- Streamlit for the UI framework
- Real-time data updates
- Integration with more SF.gov datasets
- Advanced ML models (deep learning)
- Mobile app version
- API endpoints for programmatic access
- Multi-city support
Built for SF Small Businesses | Powered by DGX Spark & Nemotron LLM