An intelligent AI-powered chatbot that helps users navigate San Diego's municipal permit system using real data from the City of San Diego Open Data Portal and Claude Sonnet 4.6.
Watch the live demo: San Diego FAQ Bot Demo
- Ask questions about San Diego permits in plain English
- Get instant, accurate responses powered by Claude Sonnet 4.6
- Context-aware answers based on real municipal code and permit data
- Conversation history with smooth chat interface
- Describe your project in one sentence
- Receive a customized permit checklist including:
- Required permits
- Estimated timelines
- Approximate costs
- Important considerations
- Next steps
- Download checklist as Markdown file
- Select from 61 San Diego neighborhoods
- Paste council meeting transcripts
- Extract neighborhood-specific information:
- Key decisions affecting the community
- Upcoming projects
- Action items for residents
- Important dates and deadlines
- Download summary as Markdown file
- Local Development: Uses downloaded CSV files for fast loading
- Cloud Deployment: Automatically downloads data from San Diego Open Data Portal
- Seamless Transition: No configuration needed - works in both environments
- 390,000+ Permits: Active and closed permit records
- 61 Neighborhoods: Complete community planning districts
- 9 Council Districts: City council representation data
- 124 Police Neighborhoods: Detailed geographic coverage
- 3,600+ Zoning Designations: Comprehensive zoning information
- ✅ Dark mode support with proper contrast
- ✅ Chat input at bottom (like modern messaging apps)
- ✅ Searchable neighborhood dropdown
- ✅ Responsive design for mobile and desktop
- ✅ Clean, professional interface with smooth animations
- Automatic fallback to remote data sources
- Flexible file structure support
- Comprehensive error handling
- Clear logging and status messages
- AI Model: Claude Sonnet 4.6 (Anthropic)
- Web Framework: Streamlit
- Data Processing: Pandas
- Language: Python 3.8+
- Data Source: San Diego Open Data Portal
All data is sourced from official City of San Diego resources:
- San Diego Open Data Portal
- Development Services Department
- Community Planning Districts
- City Council Districts
- Municipal Code Documents
- Python 3.8 or higher
- Anthropic API key (Get one here)
-
Clone the repository
git clone https://github.com/kulkarnikk07/sd-faq-bot.git cd sd-faq-bot -
Install dependencies
pip install -r requirements.txt
-
Set up your API key
Create a
.envfile in the project root:ANTHROPIC_API_KEY=your_api_key_here
-
Run the app
streamlit run app.py
-
Open your browser
Navigate to
http://localhost:8501
sd-faq-bot/
├── app.py # Main Streamlit application
├── bot.py # Claude AI integration
├── data_loader.py # Smart data loading (local/remote)
├── requirements.txt # Python dependencies
├── .env # API key (create this)
├── .gitignore # Git ignore rules
├── data/ # Local data files (optional)
│ ├── cmty_plan_datasd.csv
│ ├── council_districts_datasd.csv
│ ├── pd_neighborhoods_datasd.csv
│ ├── permits_set2_active_datasd.csv
│ ├── permits_set2_closed_datasd.csv
│ ├── permits_project_tags_datasd.csv
│ └── zoning_datasd.csv
└── README.md
git add .
git commit -m "Deploy to Streamlit Cloud"
git push origin main- Go to share.streamlit.io
- Click "New app"
- Select your repository:
kulkarnikk07/sd-faq-bot - Main file:
app.py - Click "Advanced settings" → "Secrets"
- Add your API key:
ANTHROPIC_API_KEY = "your-api-key-here"
- Click "Deploy"
The app will automatically download data from San Diego Open Data Portal - no manual file uploads needed!
"What permits do I need to build a 200 square foot detached storage shed?"
"I want to remodel my kitchen including new electrical outlets,
relocating plumbing, and removing a non-load-bearing wall."
- Select neighborhood: "Downtown"
- Paste meeting transcript
- Get neighborhood-specific summary
- Natural language question input
- Real-time AI responses
- Conversation history
- Example questions for quick start
- Sources municipal code and permit data
- One-line project description
- AI-generated comprehensive checklist
- Includes permits, timeline, costs
- Example projects provided
- Downloadable results
- 61 San Diego neighborhoods in dropdown
- Searchable neighborhood selection
- Paste any council meeting content
- Extracts neighborhood-relevant info
- Download summary as file
Create a .env file:
ANTHROPIC_API_KEY=your_api_key_hereIn Streamlit Cloud settings → Secrets:
ANTHROPIC_API_KEY = "your_api_key_here"For faster local development, download CSV files from data.sandiego.gov and place in data/ folder. The app will automatically use them instead of downloading.
python data_loader.pypython bot.pystreamlit run app.pyCurrent dataset includes:
- 257,692 active permits
- 132,550 closed permits
- 454,290 permit tags
- 61 community planning districts
- 9 city council districts
- 124 police neighborhoods
- 3,677 zoning designations
Data updated regularly from San Diego Open Data Portal
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some AmazingFeature' - Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
- Verify key in
.envfile - Check Streamlit Cloud secrets
- Ensure key is active at console.anthropic.com
- Check internet connection (for cloud deployment)
- Verify CSV files in
data/folder (for local) - Check console logs for specific errors
- Ensure
data_loader.pyis updated - Check that
cmty_plan_datasd.csvloads correctly - Run
python data_loader.pyto test
This project is open source and available for educational purposes.
This is a practice project created for educational purposes using publicly available data from the City of San Diego Open Data Portal. The information provided is for general guidance only and should not be considered official advice. Always verify permit requirements and regulations with the San Diego Development Services Department.
Kedar Kulkarni
- Anthropic - For Claude AI API
- City of San Diego - For open data portal and resources
- Streamlit - For the amazing web framework
- Open Source Community - For tools and inspiration
- San Diego Open Data Portal
- San Diego Development Services
- Anthropic Claude Documentation
- Streamlit Documentation
- ✨ Added automatic data loading from URLs
- ✨ Fixed neighborhood dropdown (61 communities)
- ✨ Upgraded to Claude Sonnet 4.6
- ✨ Added dark mode support
- ✨ Improved chat interface (input at bottom)
- ✨ Added tech stack to About section
- 🐛 Fixed CSV loading for cloud deployment
- 🐛 Fixed data file path detection
- 📝 Updated documentation
- 🎉 Initial release
- 💬 Basic Q&A functionality
- ✅ Permit checklist generator
- 📋 Meeting summarizer
Built with ❤️ for San Diego residents
For questions, issues, or suggestions, please open an issue on GitHub.
