Module to generate a safety score for brazilian roads.
Project description
General Instructions
Generating API token
This project uses openrouteservice API to plot maps and routes. So the following steps are necessary at first:
- Sign up on openrouteservice.org to generate an API token;
- Create a
.env
file with the following content:TOKEN=XXXXXXXXXXXXXXX
, whereXXXXXXXXXXXXXXX
is the token generated in the step before; - Install the lib:
pip install safety-road-mapping
- Get the road accidents according the instructions bellow: Getting accident road data
- See the documentation on: safety documentation
- See the examples on how to use the lib on: how-to-use.ipynb
Getting accident road data
- The accidents data used were extracted from the Polícia Rodoviária Federal website.
- The notebook get_data.ipynb is responsible to download and extract the data used.
- If you want to directly download the files you can click here.
- To consolidate all the accidents by year on an unique
.csv
file use the notebook consolidate_data.ipynb. - For a simple explore data analysis from the data look at eda_accidents.ipynb
Other possible steps on the project
- The accidents data used comes just from road federal police source, so there are some routes that don't receive score because they are state highways.
- Create some unit tests.
- Use Renaest data (currently only SP has geolocation data).
- Include other variables in the score calculation.
- Include driver behaviors data.
- Implement an algorithm to predict accidents.
- The routes subsections are not connected, once they are plotted individually in the map. Visually it can be interesting to connect them. (Is it possible or necessary?).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
safety-road-mapping-0.1.5.tar.gz
(457.0 kB
view details)
Built Distribution
File details
Details for the file safety-road-mapping-0.1.5.tar.gz
.
File metadata
- Download URL: safety-road-mapping-0.1.5.tar.gz
- Upload date:
- Size: 457.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.7 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7479b947a01166dc9d5ebdf277bca7ea2f3712ccbc239482b0b5d2ef48f9baa6 |
|
MD5 | 28e8f312ff73a582f19a7d1bbd1a0ce7 |
|
BLAKE2b-256 | 246d1cb71027fbd62dba35d83c4999a9ac6e7f19e820278a5690a25234ecf869 |
File details
Details for the file safety_road_mapping-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: safety_road_mapping-0.1.5-py3-none-any.whl
- Upload date:
- Size: 469.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.7 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76ef96b55225224d75325fb806f2bf7caf4df824f138b4303920a56c27a1e663 |
|
MD5 | fd772a40dd34d4456ed4611780c03535 |
|
BLAKE2b-256 | 38308f2813d0468e8a6761093766972866a0e4f2afdf867686bcb42cf4ef2427 |