{"id":17790530,"url":"https://github.com/cwickham/routes","last_synced_at":"2025-03-16T14:30:58.412Z","repository":{"id":66634279,"uuid":"197057182","full_name":"cwickham/routes","owner":"cwickham","description":"R code for creating data art pieces documenting journeys","archived":false,"fork":false,"pushed_at":"2019-08-07T15:17:01.000Z","size":8871,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T10:38:36.960Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://routes.cwick.co.nz","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cwickham.png","metadata":{"files":{"readme":"README.Rmd","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":"2019-07-15T19:09:50.000Z","updated_at":"2020-07-03T17:33:25.000Z","dependencies_parsed_at":"2023-03-09T05:15:43.195Z","dependency_job_id":null,"html_url":"https://github.com/cwickham/routes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwickham%2Froutes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwickham%2Froutes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwickham%2Froutes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwickham%2Froutes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cwickham","download_url":"https://codeload.github.com/cwickham/routes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243818195,"owners_count":20352629,"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","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":"2024-10-27T10:44:09.059Z","updated_at":"2025-03-16T14:30:58.406Z","avatar_url":"https://github.com/cwickham.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n# routes\n\n\u003c!-- badges: start --\u003e\n[![Travis build status](https://travis-ci.org/cwickham/routes.svg?branch=master)](https://travis-ci.org/cwickham/routes)\n\u003c!-- badges: end --\u003e\n\n![](man/figures/README-oregon_route.jpeg)\n\nThis repo is the home of an R package that helps me create [routes](https://routes.cwick.co.nz).  It is provided with minimal documentation and no guarantees.\n\nIf you would like me to create something for you, or you just want a print of something I've already made, head to my [Etsy store](https://www.etsy.com/shop/dataroutes).\n\n## Installation\n\nYou can install the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"remotes\")\nremotes::install_github(\"cwickham/routes\")\n```\n## Google API\n\nroutes assumes you have a Google API key stored in the environment variable `GOOGLE_API_KEY`.  Get an [API key from google](https://developers.google.com/maps/documentation/streetview/get-api-key), then run:\n```{r, eval = FALSE}\nusethis::edit_r_environ()\n```\nto open your `.Renviron` file and add a line of the form:\n```\nGOOGLE_API_KEY=\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n```\n\n## Getting started\n\nOpen a new RStudio project and run `setup()`:\n```{r, message = FALSE, results='hide'}\nroutes::setup(from = \"Corvallis, OR\", to = \"Portland, OR\",\n  shortname = \"oregon\")\n```\n\nYou need to specify  `from` and `to` as strings understandable to Google Maps as locations.  `setup()` creates a folder called `shortname/` and creates a `00-setup.R` file inside this directory.  (*routes uses `here::here()` extensively in its templates under the assumption that `shortname/` is in the root directory of your project*).\n\n`00-setup.R` will open for editing.  You will see the three required steps for creating a route. \n```{r, code = readLines(\"oregon/00-setup.R\"), eval = FALSE}\n```\nRun each step to create and open a new file, run the code in the file to complete the step.\n\nAn example of running through these steps can be found in [`oregon/`](oregon/).  In particular, you can see the result of Knitting the steps in the following files:\n\n* [`01-route`](oregon/01-route.md)\n* [`02-streetview`](oregon/02-streetview.md)\n* [`03-cluster`](oregon/03-cluster.md)\n\n```{r, include = FALSE, eval = FALSE}\n# Run to regenerate `oregon/` example\nroutes::setup(from = \"Corvallis, OR\", to = \"Portland, OR\",\n  shortname = \"oregon\")\nsource(here::here(\"oregon\", \"00-setup.R\"))\nrmarkdown::render(here::here(\"oregon\", \"01-route.Rmd\"))\nrmarkdown::render(here::here(\"oregon\", \"02-streetview.Rmd\"))\nrmarkdown::render(here::here(\"oregon\", \"03-cluster.Rmd\"))\nfs::file_copy(here::here(\"oregon\", \"oregon_route.jpeg\"),\n  here::here(\"man/figures/README-oregon_route.jpeg\"),\n  overwrite = TRUE)\n```\n\n\n## Crediting my work\n\nI've provided this package publicly because I'd love you to create your own artworks. If you do, please credit me for the original code, and support me by sending people to my [Etsy store](https://www.etsy.com/shop/dataroutes).\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwickham%2Froutes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcwickham%2Froutes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwickham%2Froutes/lists"}