last-mile-routing-analyzer
lmr-analyzer: A powerful toolkit to analyze the interaction between last mile operations and the street network design.
https://github.com/gui-fernandesbr/last-mile-routing-analyzer
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.0%) to scientific vocabulary
Keywords
Repository
lmr-analyzer: A powerful toolkit to analyze the interaction between last mile operations and the street network design.
Basic Info
Statistics
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 8
- Releases: 3
Topics
Metadata Files
README.md
Last-Mile-Routing-Analyzer


Table of Contents
Motivation
- Repository referred to a final thesis presented to the University of Sao Paulo in order to achieve the Civil Engineering degree.
- The main goal was to develop a tool that could be used to analyze the last mile routing problems in a city
- In the end, a combination of different last-mile statics and street network analysis was made possible, allowing for significant insights to be made on the city's last mile routing problems.
- The project is still going to be developed and maintained even after the thesis is finished, so any contribution is welcome.
Features
The tool was developed in Python and it is able to analyze the last mile routing problems in a city, considering the following aspects:
- Last Mile routing data
- Distance between origin and the destination
- Shortest driving path by Google Maps API and OpenStreetMap API
- euclidean distance by Haversine formula;
- Characterization of different routes
- Center of gravity
- Enclosing polygons
- Percentage of rejected deliveries, and failed attempts
- Integration with Amazon Last Mile Routing data from public s3 bucket
- Street networks geometry:
- Street Network density statistics for different neighborhoods:
- Node density, edge density, self-loop proportion
- Street total length, average street length
- etc.
- Street Network connectivity and orientation statistics for different neighborhoods:
- Node degree
- Polar plots of street orientation
Installation
First you need to certify that you have Python 3.10 (or higher) installed.
Then you can install the package using pip:
```bash pip install git+https://github.com/Gui-FernandesBR/Last-Mile-Routing-Analyzer/lmr_analyzer.git
```
The package will automatically install the dependencies listed at the requirements.txt file.
Getting started with examples
Here are some of the examples that you can run to get started with the package:
Read the documentation
The documentation is still under development, please be patient. You can check the current docstring of each method and class individually.
Directory Structure
The repository is organized as follows:
bash
.github/ - Github related files
data/ - Data used in or generated with the examples
docs/ - Documentation files
source/ - Main package files
tests/ - Tests for the package
.gitattributes - Git attributes file
.gitignore - Files to be ignored by git
CITATION.cff - Citation file
LICENSE.md - License file
README.md - This file
requirements-dev.txt - Python packages required to develop the package
requirements.txt - Python packages required to run the package
setup.py - Setup file
Library Structure
The lmr_analyzer package is organized as follows:
__init__.py - Main module
amzserializer.py - Amazon S3 data serializer
analysis.py - Analysis module, to analyze a set of routes
distancematrix.py - Distance Matrix module
geometry.py - Handle with spatial information from shapefiles
package.py - Store package information
route.py - Store route information
stop.py - Store stop information
utils.py - Utilities module to be used on other modules
vehicle.py - Store vehicle information
The architecture of the package is represented by the following diagram:
```mermaid
classDiagram class lmranalyzer { } class AmazonSerializer { } class analysis { } class distanceMatrix { } class geometry { } class package { } class route { } class stop { } class utils { } class vehicle { } lmranalyzer --> AmazonSerializer lmranalyzer --> analysis lmranalyzer --> distanceMatrix lmranalyzer --> geometry lmranalyzer --> package lmranalyzer --> route lmranalyzer --> stop lmranalyzer --> utils lmranalyzer --> vehicle AmazonSerializer --> package AmazonSerializer --> route AmazonSerializer --> stop AmazonSerializer --> vehicle route --> stop route --> utils stop --> package
```
Data folder description
Due to the large amount of information, the data folder can be a bit confusing, so here is a brief description of what each folder contains:
```bash data/ ├── drivingdistances/ - Driving distances to be used with Amazon dataset │ ├── austin.csv │ ├── boston.csv │ ├── ... │ └── seattle.csv ├── results/ - Results from the examples │ ├── dataframes/ - all .csv or .txt files │ ├── graphshapefile/ - geospatial data files │ ├── graphs/ - Report of the Graphs generated with the examples │ ├── pickles/ - Objects saved as pickle files │ └── polarplots/ - Polar plots generated with the examples └── shapefiles/ - geospatial data files ├── austin/ - Neighborhoods of Austin county ├── losangelesminors/ - Neighborhoods of Los Angeles county ├── guarulhososm/ - Neighborhoods of Guarulhos city ├── ... └── urbanregionsSao_Paulo/ - Urban regions of Sao Paulo state
```
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Any contributor should be aware of the code of conduct.
You can also contribute by opening an issue with a bug report or a feature request.
License
First of all, thank you for considering contributing to the project!
The quicker step to contribute is by starring the project, which will help it to be more visible to other people.
The project is licensed under the Mozila Public License 2.0, which can be found here. For any questions, please contact the main maintainer.
Citation
If you use this package in your research, please cite it as:
```bibtex
@misc{alves-lmr, author = {Guilherme Fernandes Alves}, title = {Last Mile Routing Analyzer: a powerful toolkit to analyze the interaction between last mile operations and the street network design.}, year = {2023}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/Gui-FernandesBR/Last-Mile-Routing-Analyzer}}, doi = {10.5281/zenodo.6792976} }
```
Contact
Send a message to the main maintainer to request more details: Guilherme Fernandes Alves.
you can find him (i.e. me) by e-mail: guilherme_fernandes@usp.br or gf10.alves@gmail.com
Owner
- Name: Gui-FernandesBR
- Login: Gui-FernandesBR
- Kind: user
- Location: Indiana, US
- Company: @RocketPy-Team
- Website: https://www.linkedin.com/in/guifalves/
- Repositories: 10
- Profile: https://github.com/Gui-FernandesBR
Engineer(ing) at RocketPy 🚀
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use VRP-street-network, please cite it as below."
authors:
- family-names: "Alves"
given-names: "Guilherme F"
orcid: "https://orcid.org/0000-0003-3873-2699"
title: "VRP-street-network"
doi: "10.5281/zenodo.6792976"
date-released: 2022-07-04
url: "https://github.com/github/linguist"
preferred-citation:
type: software
authors:
- family-names: "Alves"
given-names: "Guilherme F"
orcid: "https://orcid.org/0000-0003-3873-2699"
- family-names: "Fernandes"
given-names: "Felipe N."
doi: "10.5281/zenodo.6792976"
title: "VRP-street-network"
GitHub Events
Total
- Create event: 1
- Release event: 1
- Issues event: 7
- Watch event: 2
- Issue comment event: 7
- Push event: 8
Last Year
- Create event: 1
- Release event: 1
- Issues event: 7
- Watch event: 2
- Issue comment event: 7
- Push event: 8
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Gui-FernandesBR | g****s@u****r | 190 |
| Lint Action | l****n@s****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 27
- Total pull requests: 14
- Average time to close issues: 7 months
- Average time to close pull requests: 2 days
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.78
- Average comments per pull request: 0.86
- Merged pull requests: 14
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 1
- Average time to close issues: 2 months
- Average time to close pull requests: 2 minutes
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Gui-FernandesBR (27)
Pull Request Authors
- Gui-FernandesBR (15)