- Python 3.9 or above
- Git
- AWS CLI configured with proper credentials
- Flask installed
- Required Python libraries (listed in
requirements.txt
)
-
Clone the Repository:
git clone https://github.com/saarthakaggarwal/schneider_team_2.git cd schneider_team_2
-
Set Up a Virtual Environment:
python3 -m venv venv source venv/bin/activate # macOS/Linux venv\Scripts\activate # Windows
-
Install Dependencies:
pip install -r requirements.txt
-
Set Up Environment Variables:
- Create a
.env
file in the root directory with the following content:SECRET_KEY=your_secret_key_here GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here AWS_ACCESS_KEY_ID=your_aws_access_key_id_here AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key_here
- Create a
-
Run the Application:
python3 app.py
-
Access the Application: Open your browser and navigate to: http://127.0.0.1:5000
This project provides a web-based application for searching freight loads, designed to integrate with Schneider’s FreightPower system.
-
Data Handling:
- Loads data from AWS DynamoDB tables (
load_posting
andload_stop
). - Processes and structures data into pandas DataFrames for efficient querying.
- Loads data from AWS DynamoDB tables (
-
Search Functionality:
- Allows users to filter loads based on origin, destination, radius, weight, and transport type.
- Provides pagination for search results.
-
Route Visualization:
- Uses Google Maps API to display pickup and delivery routes for selected loads.
-
Dashboard:
- Provides insights into active loads, top pickup/destination locations, and average load weights.
-
Interactive Features:
- Users can dynamically adjust search parameters and view alternate route suggestions.
app.py
: Main Flask application containing routes, data handling, and API integrations.utils.py
: Helper functions for geolocation and data processing.templates/
: HTML templates for rendering the web interface.static/
: Static assets (CSS, JS, images).requirements.txt
: Python dependencies.
- Data Integration:
- Successfully retrieves and processes data from AWS DynamoDB.
- Search Functionality:
- Filtering by origin, destination, weight, and transport type is operational.
- Google Maps Integration:
- Displays accurate routes for pickup and delivery locations.
- Dashboard Metrics:
- Provides useful insights on active loads and locations.
- Radius-Based Filtering:
- Occasionally fails if coordinates for cities are missing or incorrect.
- Error Handling:
- Limited handling of AWS connection issues or invalid user input.
- Performance:
- Slower response times for large datasets due to repeated DataFrame operations.
-
Enhance Error Handling:
- Improve handling for missing or invalid data in DynamoDB.
- Add user-friendly error messages for API and data processing errors.
-
Optimize Performance:
- Cache frequently accessed data.
- Use more efficient database queries and avoid excessive DataFrame operations.
-
Expand Features:
- Allow users to upload custom load data via CSV.
- Integrate with other Schneider systems for real-time updates.
-
Deployment:
- Deploy the application on AWS using a WSGI server (e.g., Gunicorn) for production use.
-
Testing:
- Add comprehensive unit and integration tests.
- Set up CI/CD pipelines for automated testing and deployment.
For any questions or issues, please reach out via the repository's issue tracker.