The City of Boston and its Department of Innovation and Technology are sponsoring a public hackathon to develop data visualizations from the City's open data portal.
This site represents our submission to the hackathon. You can view it live at http://labs.atsid.com/boston-licensing-explorer/.
The Licensing Explorer is a tool to view existing food, entertainment, and liquor licenses for the City of Boston within the context of other map layers such as median income and population density. We thought this would be an interesting tool for both citizens and City planners to use. Citizens may be interested in finding relatively underserved regions as a way of identifying optimal locations to start a new business. City planners may be interested in finding these same regions as targets for strategic economic development efforts.
- Overlay City of Boston data points for food establishments, liquor licenses, and entertainment licenses. These points can also be viewed as a heatmap.
- View basic census tract data for the tracts in the City of Boston and bordering counties. This data includes median household income, population, land area, and a calculation of population density.
- View geoprocessed data that combines the census tracts and license points:
- Number of licenses per census tract.
- Calculations for persons per license, as an indicator of under-served regions.
- We'd like to create a weighted average 'score' for each tract, by combining the income, density, and license calculations. This would ideally be user-editable, so potential business owners or City planners could run scenarios that optimized the display for different local conditions and pinpoint the best places to put a new business.
- The spatial joining was done directly using the census tract data. Applying a buffer around each tract before computing the join could produce a more useful measurement, by accounting for establishments that occur on the tract borders and should therefore be counted more than once.
- From the Boston Open Data Portal
- From the US Census
- Census Tracts for Massachusetts (pre-culled to those counties surrounding Boston).
- Census Tract income and population data via the Census API. We load this data live from the Census API and merge it with the tract polygons using the tract GEOID.
- ArcGIS - ArcGIS was used for initial data exploration and prototyping of the map layers. A trial license supplied by Esri for the Hubhacks event was used.
- Google Maps API - the site uses Google Maps as the baseline mapping component.
- GitHub Pages - we hosted our site using a
gh-pages
branch within the GitHub repository for easy, free hosting. - node.js - we did some data prep using node.js tools, and used it for our build system.
- togeojson - GeoJSON is a geospatial JSON format, with robust support within Google Maps. We used the togeojson library to convert the US Census KML boundaries and the Boston licenses CSV files to GeoJSON for loading into Google Maps.
- geolib - we used geolib to write a spatial join script that summarized point locations within polygons in our GeoJSON files.
- grunt - grunt is a JavaScript build system for node.js. We used it for code quality (linting) and testing (with karma+mocha).
Because the app is entirely client-side, you don't really need to do anything special. Any web server that can host the project folder will do, but we've setup a development server with node + grunt so it's easy to work on.
First, make sure you have node.js installed from the node.js website.
Then, install the project development dependencies and get the grunt command line:
npm install
npm install -g grunt-cli
Start the local node server to get everything up and running:
grunt server
Now you can navigate to localhost:9001
to see the app. Note that grunt server
also starts a file watcher that will run jshint and karma whenever a file is saved.
If you want to publish the site to your gh-pages
branch so it is publicly hosted, use:
grunt publish
This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.
Graduated color palettes for the census tract symbology were obtained from COLOURlovers.com. All are Creative Commons CC-BY-NC-SA licensed.
- echo by delphian
- another pearl by velveteen.
- peach belle by Anitra
- a cold day by stinger
Data bins were obtained by first running a Jenks natural breaks categorization on the layer data, and then rounding boundary numbers to more easily-readable values.