results
folder contains the files states.csv
and states_line.json
,states_gmaps.json
,
states_merged.json
that are the output of src
scripts
states_coords.csv
contains the latitude and longitude for each Brazilian state capitalstates_line.json
contains the name of the states and the distance in km of all possible pairs assuming a line connecting the citiesstates_gmaps.json
contains the name of the states and the distance in km of all possible pairs with the information from Google regarding its distance, some combination results in NaN (all combinations to or from Acre and Amapá), due to non existing routes to the location.states_merged.json
substitutesstates_gmaps.json
Nan fromstates_line.json
distances- the remaining .csv's are the json adjacency matrix counterpart
- python >=3.7
- pip
install pip dependencies with
pip install -r requirements.txt
then chdir to src
cd src
to get states_line.json
use
python3 line.py
to get states_gmaps.json
use
KEY=YOUR_KEY python3 gmaps.py
follow this tutorial to get the API key
to get states_merged.json
use
python3 merge.py
to convert any json to an adjacency matrix in csv use json2csv.py
python3 json2csv.py [file]