{"id":19243126,"url":"https://github.com/samtay/road-trip-planner","last_synced_at":"2025-08-25T22:10:16.884Z","repository":{"id":80754757,"uuid":"370417707","full_name":"samtay/road-trip-planner","owner":"samtay","description":"A national park road trip planner via Datalog","archived":false,"fork":false,"pushed_at":"2023-01-21T00:51:23.000Z","size":3486,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-23T14:46:53.746Z","etag":null,"topics":["datalog","planner","road-trip","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samtay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-05-24T16:30:14.000Z","updated_at":"2024-11-10T18:17:28.000Z","dependencies_parsed_at":"2023-05-15T15:00:44.683Z","dependency_job_id":null,"html_url":"https://github.com/samtay/road-trip-planner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samtay/road-trip-planner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Froad-trip-planner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Froad-trip-planner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Froad-trip-planner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Froad-trip-planner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samtay","download_url":"https://codeload.github.com/samtay/road-trip-planner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Froad-trip-planner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272139425,"owners_count":24880304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["datalog","planner","road-trip","rust"],"created_at":"2024-11-09T17:16:45.918Z","updated_at":"2025-08-25T22:10:16.858Z","avatar_url":"https://github.com/samtay.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# road-trip-planner\n\nA primitive road trip planner between U.S. National Parks. This project uses\nDatalog to discover feasible road trip plans against data from the [National\nPark Service](https://www.nps.gov/subjects/developer/api-documentation.htm).\nThe core logic is in the [souffle](./souffle) directory, with a small \nutility CLI runner on top.\n\nThis was my final project for a course in Database Management Systems.\nI wrote about the exploration [here](https://samtay.github.io/posts/road-trip-planner), if you are interested.\n\n## reqs\n\n1. [souffle](https://souffle-lang.github.io/install)\n2. [cargo](https://www.rust-lang.org/tools/install)\n\n**Note**: To run the planner with the `--lucky` option to output a single plan, you'll\nneed to build souffle from source from a recent commit, as the [choice\nconstruct](https://souffle-lang.github.io/choice) has not yet been released.\n\n## install\n\nBasically just clone the repo. This tool can be used via `cargo run`, or you can\ninstall it to your PATH e.g.\n```shell\n# get repo and install binary\ngit clone git@github.com:samtay/road-trip-planner.git\ncd road-trip-planner\ncargo install --path .\n```\nbut either way, this tool expects to be run from the root of this repository, so\nit can easily access the `data`, `souffle`, and `output` directories.\n\nCurrently this planner looks for campgrounds that allow a 34' RV. You can adjust\nthat variable\n[here](https://github.com/samtay/road-trip-planner/blob/ce3b291ff6916b04febeb0c5a961a71ca928c4b9/souffle/plan-enumerate.dl#L40).\n\n## usage\n\nThe help output explains the usage:\n\n```\nUSAGE:\n    road-trip-planner [FLAGS] \u003cfrom\u003e \u003cto\u003e\n\nARGS:\n    \u003cfrom\u003e    Starting park code (e.g. ever)\n    \u003cto\u003e      Ending park code (e.g. olym)\n\nFLAGS:\n    -h, --help       Prints help information\n    -l, --lucky      Output a single trip\n        --min        Use minimum distance between stops (for --lucky)\n    -r, --refresh    Use fresh NPS data\n    -V, --version    Prints version information\n```\n\nBut this requires a few explanations: the park codes can be found in the\n[park.facts](./data/park.facts) file. Also, enumeration may take a very long\ntime if the parks are far apart; if this happens, try adjusting the required\nprogress between segments\n[here](https://github.com/samtay/road-trip-planner/blob/ce3b291ff6916b04febeb0c5a961a71ca928c4b9/souffle/plan-enumerate.dl#L56).\nThe `--lucky` option uses souffle's choice construct to make a single plan;\nhowever, it doesn't do this in any intelligent way, so it is possible for the\nplan to fail and stop short before the final destination.\n\nUsing `--refresh` will fetch the latest data from NPS, however this does require\na valid `NPS_API_KEY` environment variable. This key can be obtained for free\nfrom NPS [here](https://www.nps.gov/subjects/developer/get-started.htm).\n\n## examples\n\n```shell\n# non-deterministically find a single plan from badlands to glacier national park\n❯ road-trip-planner --lucky badl glac\n       Badlands National Park: Cedar Pass Campground         (0.00)\n                             ↡\nBighorn Canyon National Recreation Area: Afterbay Campground (314.16)\n                             ↡\n                Glacier National Park: Apgar                 (675.59)\n\n# enumerate all plans from yosemite to the olympic national forest\n❯ road-trip-planner yose olym\nPlan 1\n------\n    Yosemite National Park: Crane Flat Campground     (0.00)\n                          ↡\nWhiskeytown National Recreation Area: Brandy Creek RV (247.61)\n                          ↡\nOlympic National Park: Heart O' the Hills Campground  (761.96)\n.\n.\n.\nPlan 4316\n---------\n            Yosemite National Park: Wawona Campground              (0.00)\n                                ↡\n     Lassen Volcanic National Park: Warner Valley Campground       (220.53)\n                                ↡\nLake Roosevelt National Recreation Area: Spring Canyon Group Sites (752.22)\n                                ↡\n              Olympic National Park: Mora Campground               (1014.45)\n\n```\n\n### todo\n\n1. Include the cell, internet, and dump amenities in the enumeration output.\n   These can then be externally counted, so that plans can be sorted by stops\n   with the most cell service, or to filter plans that include at least one dump\n   stop every 500mi, etc..\n2. A few more things should be parameterized from the CLI, such as the RV\n   length, minimum progress and maximum segment distance. The minimum progress\n   turns out to be a very important parameter, and makes the difference of\n   whether or not the computation finishes in a second or days.\n3. Call out to an API for actual driving distance and/or time, instead of using\n   the haversine approximation.\n4. Indicate an error when the choice domain fails to reach the final\n   destination.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamtay%2Froad-trip-planner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamtay%2Froad-trip-planner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamtay%2Froad-trip-planner/lists"}