Skip to content

transitmatters/regional-rail-explorer

Repository files navigation

Regional Rail Explorer

lint deploy

The Regional Rail Explorer is a tool to demonstrate the impact of Regional Rail on journeys within the MBTA rail system. It uses real MBTA GTFS feeds and hypothetical equivalents generated by the regional-rail-schedule-generator repository to simulate and compare journeys with today's Commuter Rail, and potential Regional Rail systems of tomorrow.

Screenshot_2021-06-06 Regional Rail Explorer

Setup

Ensure you have the following dependencies installed:

Local Deployment

$ npm install
$ export PORT=3000
$ npm run build && npm start

Then navigate to http://localhost:3000.

Server Deployment

Ensure you have the following dependencies installed:

$ git pull
$ sudo cp devops/regional-rail-explorer-supervisor.conf /etc/supervisor/conf.d/regional-rail-explorer.conf
$ sudo cp devops/regional-rail-explorer-nginx.conf /etc/nginx/sites-enabled/
$ sudo supervisorctl reload
$ sudo systemctl restart nginx
$ npm install
$ NODE_OPTIONS="--max-old-space-size=2048" npm run build
$ sudo supervisorctl restart regional-rail-explorer

Initial API requests will be quite slow for now as the server must load and parse several large GTFS bundles.

AWS Deployment

You can deploy changes to this application to an AWS EC2 instance running Ubuntu using the devops/deploy.sh script.

Ensure you've installed the AWS CLI and configured it with your account credentials. You will also need Ansible installed. Some additional configuration may be nessessary as well - see the devops folder for more.

Storybook

An index of React component fixtures is available to browse by running:

$ npm run storybook

Linting

To lint the project source code, run $ npm run lint in the root directory

Support TransitMatters

If you've found this app helpful or interesting, please consider donating to TransitMatters to help support our mission to provide data-driven advocacy for a more reliable, sustainable, and equitable transit system in Metropolitan Boston.