An interactive web application built with Flask and Leaflet.js that displays company locations on a map with detailed information. The application features a full-screen map view with a scrollable sidebar containing company listings.
Watch the video Direct OR Youtube.
- Full-screen interactive map with company location markers.
- Scrollable and resizable sidebar with company cards.
- Company information popups on marker click.
- Interactive company cards that zooming the company on the map when click.
- Responsive design that works on all screen sizes.
- Search bar on top of the page.
- Filtration options: Location, Work field.
- Work field clickable and sets the filter when clicked.
- Work field and location filters.
- Add Mouse over a company card changes color of the company pin.
- Backend: Python Flask
- Frontend: HTML, CSS, JavaScript
- Map: Leaflet.js
- Data Storage: JSON
company-map/
├── app.py # Flask application
├── requirements.txt # Dependencies
└── static/
└── images/ # Static images
└── companies.json # Companies data
└── script.js
└── styles.css
└── templates/
└── index.html # Main application template
└── tools/
└── duplicate_check.py # Check duplicate companies. If duplicate found, it prints it.
└── old_json_to_new.py # Use legacy json structure and convert to new structure.
- Clone the repository:
git clone https://github.com/yourusername/company-map.git
cd company-map- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Start the Flask server:
python app.py- Open your browser and navigate to:
http://localhost:5000
Add company data to companies.json using the following format:
{
"Company Name": {
"description": "",
"links": {
"website": "https://company-website.com",
"linkedin": "https://www.linkedin.com/company/company_name/"
},
"locations": [
{
"City, State": [latitude, longitude]
}
],
"workFields": ["Industry Field", "Industry Field 2"]
}
}| Key | Type |
|---|---|
| name | str |
| location | str |
| coordinates | list[int,int] |
| website | str |
| str | |
| workField | list[str] |
- Fork the repository
- Add your company data to
companies.json - Follow the existing JSON structure
- Ensure coordinates are accurate
- Submit a pull request
Example company entry:
{
"Company Name": {
"description": "",
"links": {
"website": "https://company-website.com",
"linkedin": "https://www.linkedin.com/company/company_name/"
},
"locations": [
{
"City, State": [latitude,longitude]
}
],
"workFields": ["Industry Field", "Industry Field 2"]
}
}-
Code Style
- Follow PEP 8 guidelines for Python code
- Use consistent indentation (4 spaces)
- Include comments for complex functionality
-
Commits
- Write clear commit messages
- Keep commits focused and atomic
- Reference issues when applicable
-
Pull Requests
- Provide a clear description of changes
- Include screenshots for UI changes
- Update documentation if needed
Open an issue with the following information:
- Clear description of the feature
- Use case for the feature
- Any technical considerations
- Potential implementation approach
MIT License - feel free to use this project for your own purposes.
For questions or support, please open an issue in the repository.
Remember to replace yourusername with your actual GitHub username and update any other placeholder information before using this README.
