{"id":32204121,"url":"https://github.com/k5cents/metro","last_synced_at":"2025-10-22T04:51:18.959Z","repository":{"id":54368173,"uuid":"312745053","full_name":"k5cents/metro","owner":"k5cents","description":"Get DC transit data as R data frames","archived":false,"fork":false,"pushed_at":"2024-03-12T00:54:15.000Z","size":1990,"stargazers_count":4,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T11:52:14.629Z","etag":null,"topics":["metro","public-transportation","transit-data","washington-dc","wmata","wmata-api"],"latest_commit_sha":null,"homepage":"https://k5cents.github.io/metro/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k5cents.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-11-14T04:28:56.000Z","updated_at":"2024-03-11T01:04:39.000Z","dependencies_parsed_at":"2025-01-21T07:35:00.346Z","dependency_job_id":"4ccb9ed6-ae33-4e7f-8076-24123e0c8b11","html_url":"https://github.com/k5cents/metro","commit_stats":{"total_commits":165,"total_committers":1,"mean_commits":165.0,"dds":0.0,"last_synced_commit":"4aca3233af1383056883049c52bb071d21e877b4"},"previous_names":["k5cents/metro","kiernann/metro"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/k5cents/metro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k5cents%2Fmetro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k5cents%2Fmetro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k5cents%2Fmetro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k5cents%2Fmetro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k5cents","download_url":"https://codeload.github.com/k5cents/metro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k5cents%2Fmetro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280382978,"owners_count":26321423,"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-10-22T02:00:06.515Z","response_time":63,"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":["metro","public-transportation","transit-data","washington-dc","wmata","wmata-api"],"created_at":"2025-10-22T04:51:13.384Z","updated_at":"2025-10-22T04:51:18.954Z","avatar_url":"https://github.com/k5cents.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\neditor_options: \n  chunk_output_type: console\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  warning = FALSE,\n  message = FALSE,\n  error = FALSE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  fig.height = 4,\n  fig.width = 9,\n  out.width = \"100%\",\n  dpi = 300\n)\nif (!interactive()) {\n  options(width = 95)\n}\n```\n\n# metro \u003cimg src='man/figures/logo.png' align=\"right\" height=\"139\" /\u003e\n\n\u003c!-- badges: start --\u003e\n[![Lifecycle: experimental][life_badge]][life_link]\n[![CRAN status][cran_badge]][cran_link]\n![Downloads][dl_badge]\n[![Codecov test coverage][cov_badge]][cov_link]\n[![R build status][ga_badge]][ga_link]\n\u003c!-- badges: end --\u003e\n\nThe goal of metro is to return data frames from the Washington Metropolitan Area\nTransit Authority API. Nested lists have been converted to [tidy] data frames\nwhen possible.\n\n## Installation\n\nThe release version of metro (0.9.1) can be installed from [CRAN][cran]:\n\n```{r install_cran, eval=FALSE}\ninstall.packages(\"metro\")\n```\n\nOr install the development version from [GitHub][gh]:\n\n```{r install_github, eval=FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"k5cents/metro\")\n```\n\n## Key\n\nUsage of the WMATA API requires a developer API key. Such a key can be obtained\nby creating a developer account and subscribing to the free default tier.\n\nThe WMATA also provides a [demo key][demo] to try out the various features of\nthe API. This key should **never** be used in production, it is rate limited and\nsubject to change at any time.\n\n```{r key, eval=FALSE}\nSys.setenv(WMATA_KEY = \"e13626d03d8e4c03ac07f95541b3091b\")\n```\n\n## Example\n\n```{r library}\nlibrary(metro)\npackageVersion(\"metro\")\n```\n\nFunctions return data frames for easy analysis.\n\n```{r rail_stations}\nnext_train(StationCodes = \"A01\")\n```\n\n### Coordinates\n\nUse coordinates to find station entrances or bus stops near a location. The\n[`geodist::geodist()`][gd] function is used to calculate distance from the\nsupplied coordinates.\n\n```{r rail_entrance}\n# Washington Monument coordinates\nrail_entrance(Lat = 38.890, Lon = -77.035, Radius = 750)[, -(3:4)]\n```\n\n### Dates and Times\n\nDate columns with class `POSIXt` have been shifted from Eastern time to the UTC\ntime zone (+5 hours).\n\n```{r bus_position}\nbus_position(RouteId = \"33\")[, 1:8]\n```\n\nTime values are left in Eastern time and are represented using the class\n[`hms`][hms], which counts the seconds since midnight. If the _last_ train on a\nSaturday leaves at 1:21 AM (past midnight), this would be represented as\n`25:21`.\n\n```{r rail_times}\ntail(rail_times(StationCode = \"E10\"))\n```\n\n### Data\n\nSome data frames are includes as objects if their functions typically return the\nsame thing every time.\n\n```{r lines}\nmetro_lines # rail_lines() for live\n```\n\n\u003c!-- refs: start --\u003e\n[life_badge]: https://img.shields.io/badge/lifecycle-stable-green\n[life_link]: https://lifecycle.r-lib.org/articles/stages.html#stable\n[cran_badge]: https://www.r-pkg.org/badges/version/metro\n[cran_link]: https://CRAN.R-project.org/package=metro\n[ga_badge]: https://github.com/k5cents/metro/workflows/R-CMD-check/badge.svg\n[ga_link]: https://github.com/k5cents/metro/actions\n[cov_badge]: https://codecov.io/gh/k5cents/metro/graph/badge.svg?token=bQ3eAdcpjd\n[cov_link]: https://app.codecov.io/gh/k5cents/metro?branch=master'\n[dl_badge]: https://cranlogs.r-pkg.org/badges/grand-total/gluedown\n[tidy]: https://en.wikipedia.org/wiki/Tidy_data\n[cran]: https://cran.r-project.org/package=metro\n[gh]: https://github.com/k5cents/metro\n[demo]: https://developer.wmata.com/products/5475f236031f590f380924ff\n[gd]: https://github.com/hypertidy/geodist\n[hms]: https://github.com/tidyverse/hms\n\u003c!-- refs: end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk5cents%2Fmetro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk5cents%2Fmetro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk5cents%2Fmetro/lists"}