This is an interface built using Mapbox to display census blocks, and explore their metadata. Future iterations might also display data layers on top of those census blocks, as well as controls for the visualization.
This project was built with Peter Weyland, Dave Thompson, and Alex Price at the 2017 Hack Austin hackathon, in Austin, Texas.
You can read about the background and process on Medium.
We use Mapbox for maps and block rendering, United States Census Bureau data for the blocks, and React + Next.js to bring it all together.
- Run
yarn
to install dependencies - Add the /config directory to root
- Add a
tokens.js
file to/config
. It should look like this:
const MAPBOX_ACCESS_TOKEN = 'Your token here'
// Create a token at mapbox.com/studio/account/tokens
module.exports = {
MAPBOX_ACCESS_TOKEN
}
- Run
yarn run dev
- Open
localhost:3000
- ???
- Profit
- Create a Mapbox account
- Upload the ShapeFile from the
/data
directory as a Tileset in Mapbox. Here's a link. - Generate an access token here.
- You'll need to change some references in
/components/map/index.js
, as the current example uses census block groups for Austin, off of my account.