{"id":41593685,"url":"https://github.com/inductivekickback/mileage","last_synced_at":"2026-01-24T09:36:12.600Z","repository":{"id":243468916,"uuid":"812521914","full_name":"inductivekickback/mileage","owner":"inductivekickback","description":"This program computes the shortest driving distance between all pairs of 4j school buildings and saves the data as both a spreadsheet table and a Python datastructure.","archived":false,"fork":false,"pushed_at":"2024-08-24T00:26:50.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-24T05:46:19.931Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inductivekickback.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-09T06:11:26.000Z","updated_at":"2024-08-24T00:26:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"433822a2-848a-4631-bee9-d7fdc99aa823","html_url":"https://github.com/inductivekickback/mileage","commit_stats":null,"previous_names":["inductivekickback/mileage"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/inductivekickback/mileage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inductivekickback%2Fmileage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inductivekickback%2Fmileage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inductivekickback%2Fmileage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inductivekickback%2Fmileage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inductivekickback","download_url":"https://codeload.github.com/inductivekickback/mileage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inductivekickback%2Fmileage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28723467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T08:27:05.734Z","status":"ssl_error","status_checked_at":"2026-01-24T08:27:01.197Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-24T09:36:12.543Z","updated_at":"2026-01-24T09:36:12.595Z","avatar_url":"https://github.com/inductivekickback.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/user-attachments/assets/d8c10f15-ef63-4f5e-846b-9d3d0e3a5486\" alt=\"Example CSV table\" width=\"300\" align=\"right\" style=\"margin-right: 15px; margin-bottom: 15px;\"\u003e\nThe 4j School District expects employees to fill in expense reports for mileage and parking reimbursement using a form that does not automatically calculate distances. They are instructed to use Google Maps to find the shortest-possible path between all of the building pairs on their forms; with more than 30 possible buildings to visit this can be quite burdensome.\n\n### Features\nThis program allows the user to:\n\n - Have the [Google Maps Directions API](https://developers.google.com/maps/documentation/directions/overview) find the shortest-possible path between buildings (both directions considered in calculation)\n - Customize the set of school buildings to query, including colloquial names and custom addresses\n - Create a Comma Separated Value (CSV) table containing the results\n - Serialize a Python dictionary to a file that contains the results for use by this or [other Python programs](https://github.com/inductivekickback/smiles)\n\n**NOTE:** The [Distance Matrix API](https://developers.google.com/maps/documentation/distance-matrix/overview) is **not** used because it only offers the \"best\" route between buildings -- not a list from which you can determine the shortest distance.\n\n### Requirements\nThe googlemaps module can be installed from the command line using pip:\n```\n$ cd mileage\n$ pip3 install --user -r requirements.txt\n```\n\n### Usage\n**compile.py** provides the user interface and help is available from the command line:\n\n```\n% python3 compile.py --help\nusage: compile.py [-h] [--address_file ADDRESS_FILE] --table_file TABLE_FILE [--api_key API_KEY] [--data_out DATA_OUT] [--data_in DATA_IN]\n\nGenerate a table of distances between locations.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --address_file ADDRESS_FILE\n                        Path to CSV input file containing locations\n  --table_file TABLE_FILE\n                        Path to CSV output file\n  --api_key API_KEY     Google API KEY with Distance Matrix permissions\n  --data_out DATA_OUT   Path to pickle file for storing the result dict\n  --data_in DATA_IN     Path to pickle file for loading a previously-stored result dict\n```\nA Google API key is required and each invocation will cost around $8 in API usage (as of August 2024) for a full run. If data (or partial data) from a previous run is specified then only pairs that don't already exist in the data will be calculated. Example data and CSV files are included in the 'artefacts' directory.\n\n**Example:** A complete run using the included reference set of addresses \n```\npython3 compile.py --address_file artefacts/addresses.csv --table_file path_to_table_output_file.csv --data_out path_to_data_output_file.pickle --api_key YOUR_DEVELOPER_API_KEY\n```\n**NOTE:** If you fork this repo (or any other public repo) be careful to [not push any commits containing your API key](https://trufflesecurity.com/blog/anyone-can-access-deleted-and-private-repo-data-github).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finductivekickback%2Fmileage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finductivekickback%2Fmileage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finductivekickback%2Fmileage/lists"}