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.
- Clone this git repository.
- Fill in
APP_MAPBOX_ACCESS_TOKENindocker-compose.ymlwith a token from Mapbox. - Run
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[email protected]and passwordpassword.
This is a Laravel project. To get started, do the following:
- Install PHP and JS dependencies with
composer installandnpm ci. - Copy
.env.exampleto.envand fill out the configuration. Create any necessary databases and add your the mapbox token. - Run
php artisan key:generatewhich will generate an application key. - Generate compiled JS and CSS with
npm run devornpm run prod. - For development, run
php artisan serveand navigate tolocalhost:8000. - 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 ofbayarea_plsql.sqland import it into your roads database. - Import
./scripts/roads_db/bayarea_uploaded_datasetsinto the roads database. - Create a user by running
php artisan tinker < ./scripts/login_db/create_user.sh.