This map is a snapshot view of the Obama Administration’s work in partnership with local communities. The map is made up of data sets from initiatives across more than 15 Federal agencies. We are adding datasets and features to the map as we build it, so check back for updates (or help us add them!).
The map is a self-contained front-end application and can be served entirely statically via the web server application of your choice.
The map code uses the Leaflet web mapping library (and a number of plugins, see “Dependencies” below) and jQuery, but not much else. Data actually loaded in the map is in TopoJSON format, but GeoJSON and CSV format files of the data are included and used to provide a data download option for users.
Build scripts (bash-based shell scripts that use some node packages for minification of JavaScript and CSS) are provided in the buildtools
folder. There are a few dependencies you'll need for the script to run. You can install those (once you have node
and npm
available) with the following commands:
$ npm install -g uglify-js
$ npm install -g clean-css
$ npm install -g enhance-css
Once you’ve made your code changes, you can go to that folder and run the main build script:
$ cd buildtools
$ ./build.sh
To view the results, you can check out one of the three builds available in the dist
folder. If you’re starting from scratch, the gh
build, setup for GitHub Pages-based deployment, is easy to work with on your local development machine.
If you only want to build one deployment target, or only want to build assets or data files, you can do that by adding the arguments --target=<mytarget>
and --task=<mytask>
. For more on that, try the following:
$ ./build.sh --help
Most of the data on the map is from community-led initiatives around the country. We’ve also added summary layers, which allow you to hover over a state or county to see what initiatives are in that location. This map also includes background statistical and demographic information, such as US Census data on counties of persistent poverty, and data from a recent Harvard University study which reports upward economic mobility data by county (Where is the Land of Opportunity? The Geography of Intergenerational Mobility in the United States. Chetty et al. Quarterly Journal of Economics. 2014).
Data and map parameters are contained in the datasets.json
file in the top-level data
folder. To add a new data set, you can simply add a new entry to the datasets
object in that file, and put the data files in the appropriate locations, and it should show up and get added to the map.
Feedback: Your feedback is critical to the continuous process of updating and improving the map. We'll work to address any comments you provide. Please provide your feedback to us by clicking on “Issues.”
Code: If you’re a front-end coder and want to fix bugs or add features, we welcome your help! All contributions to the project are dedicated to the public domain.
Here’s a short list of features (small and big) we’d love to get to in the near future:
- Ability to pin and un-pin the layers control pane. (See this JSFiddle for a pin button.)
- Addition of a customizable fly-out pane on the left that allows for storytelling about the data we’re mapping.
- Addition of story views that combine information, map controls and collections of specific data layers to provide a perspective-based view of the data on the map.
- New layers from available public data (Census, labor & job-related, economic, etc.)
If you have a great idea that’s not on our list, let us know!
- jQuery (jQuery License Page/MIT License)
- TopoJSON (BSD 3-Clause License)
- Leaflet (BSD 2-Clause License)
- Leaflet plugins:
- Leaflet Providers (BSD 2-Clause License)
- Leaflet.groupedlayercontrol (MIT License)
- Leaflet.ZoomBox: (ISC License)
- Leaflet.defaultextent (MIT License)
- Leaflet.geojsonCSS (MIT License)
- Leaflet.vector-markers (MIT License)
- Leaflet.Spin (MIT License)
- Leaflet-locatecontrol (MIT License)
- Leaflet-pip (Public Domain/Unlicense)
- Leaflet GeoSearch (BSD 2-Clause License)
- Leaflet.Pancontrol (BSD 2-Clause License)
- Spin.js (MIT License)
- FontAwesome (License Info)
This work of the United States Government is in the public domain. Our goal is to encourage broad access, use, and reuse without copyright restriction within the United States and internationally. It is also available under a Creative Commons CC0 license.