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_TOKEN
indocker-compose.yml
with 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:8000
in your browser and login with emailadmin@example.com
and passwordpassword
.
This is a Laravel project. To get started, do the following:
- Install PHP and JS dependencies with
composer install
andnpm ci
. - Copy
.env.example
to.env
and fill out the configuration. Create any necessary databases and add your the mapbox token. - Run
php artisan key:generate
which will generate an application key. - Generate compiled JS and CSS with
npm run dev
ornpm run prod
. - For development, run
php artisan serve
and 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.sql
and import it into your roads database. - Import
./scripts/roads_db/bayarea_uploaded_datasets
into the roads database. - Create a user by running
php artisan tinker < ./scripts/login_db/create_user.sh
.