{"id":26898332,"url":"https://github.com/githubsolver123/bus-tracker","last_synced_at":"2025-04-01T05:46:25.931Z","repository":{"id":285072206,"uuid":"956985075","full_name":"GithubSolver123/bus-tracker","owner":"GithubSolver123","description":"Real-time bus tracking simulation built with R Shiny and Google Maps API. Visualizes bus movement along Broadway in NYC with 2-second position updates.","archived":false,"fork":false,"pushed_at":"2025-03-29T09:46:31.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T10:27:52.688Z","etag":null,"topics":["data-visualization","geospatial","gis","google-maps-api","r","r-shiny","real-time","shiny","simulation","transportation","web-application"],"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/GithubSolver123.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":"2025-03-29T09:26:02.000Z","updated_at":"2025-03-29T09:50:37.000Z","dependencies_parsed_at":"2025-03-29T10:38:06.248Z","dependency_job_id":null,"html_url":"https://github.com/GithubSolver123/bus-tracker","commit_stats":null,"previous_names":["githubsolver123/bus-tracker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GithubSolver123%2Fbus-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GithubSolver123%2Fbus-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GithubSolver123%2Fbus-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GithubSolver123%2Fbus-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GithubSolver123","download_url":"https://codeload.github.com/GithubSolver123/bus-tracker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246591810,"owners_count":20801985,"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":["data-visualization","geospatial","gis","google-maps-api","r","r-shiny","real-time","shiny","simulation","transportation","web-application"],"created_at":"2025-04-01T05:46:25.373Z","updated_at":"2025-04-01T05:46:25.921Z","avatar_url":"https://github.com/GithubSolver123.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Real-Time Bus Tracking System\n\nA Shiny web application that simulates real-time bus tracking along Broadway in New York City. The application uses R programming language for both frontend and backend, with Google Maps for visualization.\n\n## Features\n\n- Real-time bus location updates every 2 seconds\n- Interactive Google Maps visualization\n- Simulated bus movements along Broadway\n- Bus information panel with current location details\n- Start/Stop controls for the simulation\n\n## Prerequisites\n\n- R (version 3.6.0 or higher)\n- RStudio (recommended for development)\n- Google Maps API key\n\n## Installation\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/GithubSolver123/bus-tracker.git\ncd bus-tracker\n```\n\n### 2. Install Required R Packages\n\nOpen R or RStudio and run:\n\n```R\ninstall.packages(c(\"shiny\", \"shinydashboard\", \"googleway\", \"dplyr\"))\n```\n\n### 3. Get a Google Maps API Key\n\n1. Go to the [Google Cloud Console](https://console.cloud.google.com/)\n2. Create a new project (or select an existing one)\n3. From the Navigation menu, select \"APIs \u0026 Services\" \u003e \"Library\"\n4. Search for and enable the following APIs:\n   - Maps JavaScript API\n   - Directions API\n   - Places API\n5. Go to \"APIs \u0026 Services\" \u003e \"Credentials\"\n6. Click \"Create credentials\" and select \"API key\"\n7. Copy your new API key\n\n### 4. Set Up Your API Key\n\n1. Create a file named `api_key.R` in the project directory\n2. Add the following line to the file, replacing `YOUR_API_KEY` with your actual API key:\n\n```R\napi_key \u003c- \"YOUR_API_KEY\"\n```\n\n### 5. Configure File Paths\n\nOpen the `app.R` file and update the file paths to point to your local files:\n\n```R\n# Load API key from file\nsource(\"YOUR_PATH_TO/api_key.R\")\n\n# Read bus routes data\nbus_routes \u003c- read.csv(\"YOUR_PATH_TO/bus_routes.csv\", stringsAsFactors = FALSE)\n```\n\nFor example:\n```R\n# For Windows\nsource(\"C:/Users/YourUsername/bus-tracker/api_key.R\")\n\n# For Mac/Linux\nsource(\"/home/YourUsername/bus-tracker/api_key.R\")\n```\n\nYou can also use relative paths if you're running the app from the project directory:\n```R\nsource(\"api_key.R\")\nbus_routes \u003c- read.csv(\"bus_routes.csv\", stringsAsFactors = FALSE)\n```\n\n## Running the Application\n\n1. Open `app.R` in RStudio\n2. Click the \"Run App\" button, or run:\n\n```R\nshiny::runApp()\n```\n\n3. Click the \"Start Bus\" button to begin the simulation\n4. Use the \"Stop Bus\" button to pause the simulation\n\n## Project Structure\n\n- `app.R`: Main application file containing both UI and server logic\n- `bus_routes.csv`: Data file with predefined bus stops along Broadway\n- `api_key.R`: File containing your Google Maps API key (not included in the repository)\n- `README.md`: This documentation file\n\n## Notes for Development\n\n- The application simulates a single bus moving along Broadway\n- The bus marker updates every 2 seconds\n- The path is fixed (predefined in bus_routes.csv)\n- Position updates are controlled by the Start/Stop buttons\n\n## Security Notes\n\n- **IMPORTANT**: Never commit your `api_key.R` file to GitHub\n- Add `api_key.R` to your `.gitignore` file to prevent accidental commits\n- Consider using environment variables for API keys in production environments\n\n## License\n\n[MIT](LICENSE)\n\n## Acknowledgments\n\n- This project was developed as part of a Programming for Data Science assignment\n- Uses the [googleway](https://github.com/SymbolixAU/googleway) package for Google Maps integration\n- Uses [Shiny](https://shiny.rstudio.com/) for the web application framework\n\nHappy tracking! \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubsolver123%2Fbus-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithubsolver123%2Fbus-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubsolver123%2Fbus-tracker/lists"}