This is an interactive choropleth map which can visualize average road distances to various points of interests in the SF Bay Area. For instance, it can visualize the distances from Airbnb listings to their nearest health care facilities and average the results by the zip code of the Airbnb listing.
Running using docker (Recommended)
- Clone this git repository.
- Fill in
docker-compose.ymlwith a token from Mapbox.
docker-compose up --build. Note that the first run will download and import the roads database which may take a while.
- Navigate to
localhost:8000in your browser and login with email
This is a Laravel project. To get started, do the following:
- Install PHP and JS dependencies with
.envand fill out the configuration. Create any necessary databases and add your the mapbox token.
php artisan key:generatewhich will generate an application key.
- Generate compiled JS and CSS with
npm run devor
npm run prod.
- For development, run
php artisan serveand navigate to
- For deployment, point your web server with PHP to the public folder.
This project relies on two databases:
- The roadsindb database can be downloaded here. Adding
CREATE SCHEMA bayarea; SET search_path = bayarea;to the beginning of
bayarea_plsql.sqland import it into your roads database.
./scripts/roads_db/bayarea_uploaded_datasetsinto the roads database.
- Create a user by running
php artisan tinker < ./scripts/login_db/create_user.sh.