{"id":33044390,"url":"https://github.com/r-transit/gtsf","last_synced_at":"2025-11-16T20:01:46.447Z","repository":{"id":96063648,"uuid":"139361768","full_name":"r-transit/gtsf","owner":"r-transit","description":"NOTE: deprecated. see tidytransit. General Transit - Simple Features","archived":true,"fork":false,"pushed_at":"2018-08-23T04:18:28.000Z","size":50119,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-16T19:02:56.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"R","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/r-transit.png","metadata":{"files":{"readme":"README.Rmd","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}},"created_at":"2018-07-01T21:00:06.000Z","updated_at":"2023-01-28T07:04:05.000Z","dependencies_parsed_at":"2023-05-22T22:58:57.000Z","dependency_job_id":null,"html_url":"https://github.com/r-transit/gtsf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/r-transit/gtsf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-transit%2Fgtsf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-transit%2Fgtsf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-transit%2Fgtsf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-transit%2Fgtsf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-transit","download_url":"https://codeload.github.com/r-transit/gtsf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-transit%2Fgtsf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284767947,"owners_count":27060132,"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-11-16T02:00:05.974Z","response_time":65,"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":[],"created_at":"2025-11-14T00:00:28.414Z","updated_at":"2025-11-16T20:01:46.441Z","avatar_url":"https://github.com/r-transit.png","language":"R","readme":"---\noutput: github_document\n---\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  cache = FALSE,\n  comment = \"#\u003e\",\n  message = FALSE,\n  error = FALSE,\n  warning = FALSE,\n  fig.path = \"README/README-\",\n  fig.width=7.3,\n  fig.height=5,\n  out.width = '100%'\n)\n```\n\n## Description\n\n`gtsf` is an R package for using GTFS data as [simple features](https://en.wikipedia.org/wiki/Simple_Features). You can also use it to make shapefiles and geojson from GTFS data.  \n\n## Installation\n\nYou can install this package from GitHub using the devtools package:\n\n```\nif (!require(devtools)) {\n    install.packages('devtools')\n}\ndevtools::install_github('r-gtfs/gtsf')\n```\n\n## Example Usage \n\nImport transit lines from the NYC Subway using `trread`.\n\n```{r readme-body}\nlibrary(trread)\nlibrary(gtsf)\nlibrary(dplyr)\n\nNYC \u003c- import_gtfs(\"http://web.mta.info/developers/data/nyct/subway/google_transit.zip\")\n```\n\n## Get Simple Features\n\n```{r}\nNYC \u003c- gtfs_as_sf(NYC)\n```\n\nThis adds two simple features dataframes to the list of GTFS objects:\n-stops_sf \n-routes_sf\n\n## Make Maps\n\nThese can be mapped with various libraries. For example, with the [tmap](https://cran.r-project.org/web/packages/tmap/vignettes/tmap-nutshell.html) package:\n\n```{r}\nlibrary(tmap)\nroutes_sf \u003c- NYC$sf_routes\nqtm(routes_sf)\n```\n\n## Export (GeoJSON/Shapefile)\n\nThey can also be exported to geojson, for use elsewhere. For example:\n\n```{r}\nlibrary(sf)\nst_write(NYC$sf_routes,\"nyc_routes.geojson\", delete_dsn = TRUE)\n```\n","funding_links":[],"categories":["Producing Data","Uncategorized"],"sub_categories":["GTFS","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-transit%2Fgtsf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-transit%2Fgtsf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-transit%2Fgtsf/lists"}