A modified version of d3.geo.albersUsaPr
that includes Puerto Rico, close to Hawaii instead of in the gulf. cf. http://bl.ocks.org/mbostock/5629120
- Get your DMA data into an sqlite file. This sqlite file must contain the county FIPS, the name of the DMA area, and the unique DMA code for that area.
- Create a county sqlite file from a county shapefile that contains county FIPS.
- Join DMA sqlite with a geographic enabled county polygon sqlite file to create a DMA sqlite file that has a geometry column.
- Load the DMA sqlite file into Qgis
- Use the dissolve tool to create the larger dma shapes from the smaller counties (Vector>Geoprocessing Tools>Dissolve)
- The
Input vector layer
is the DMA sqlite file - The
Dissolve Field
is whatever unique ID each DMA has. So all the counties surrounding around Mobile Alabama and Pensacola Florida, for instance, would use the dissolve field that containedMobile, AL-Pensacola, FL
.
- View your new DMA polygons, and save as an sqlite file, in whatever projection you need it in.
Troubleshooting:
The UNOCHA data was mined from the UNOCHA website and saved locally as zipped Shp files. The following steps were taken for processing all admin and populated places files from raw data into tilemill.
- Unzip Shapefile
- Load into QGIS and save three versions of the file in different projections and file types; SQlite with WGS 84, Shapefile with WGS 84, and SQlite file Google Mercator. The first two are for data download purposes. The last one is for use in Tilemill.
- Note: You can also reproject these files by using tools like the ogr2ogr tool in GDAL, but I decided that it was easier to view and save the data through a UI like QGIS.
- Note: Not all files are named well in their raw forms. In general, admin 1 means the largest boundaries subnational boundaries, admin 2 means the next largest subnational boundaries, and so on.
For the following files, additional joins have to be made to create the final file:
Chad Population at the Admin 2 le
var map, interaction; | |
var mm = com.modestmaps; | |
var layer = 'danwood.crime10hex'; | |
var urlBase ='http://api.tiles.mapbox.com/v3/mapbox.mapbox-light,'; | |
var url = urlBase + layer + '.jsonp'; | |
wax.tilejson (url, function(tilejson) { | |
tilejson.minzoom = 1; | |
tilejson.maxzoom = 16; |
Over the last two months, the OSM data sprint has turned into the OSM data 5K and we've gotten some pretty awesome stuff accomplished. I'd like to supply some relevant links and talk a little bit about what we've accomplished and learned these last two months.
Our major focus on OSM data quality stems from the use of OSM in MapBox Streets. In the early days of MB Streets we noticed major national and subnational boundaries missing from MB Streets at certain zoom levels. In OSM the borders are tagged inconsistently so it makes rendering them in tilemill a bit difficult. We tried to standardize this by adding appropriate boundary and admin level tags to areas where the boundaries existed but were tagged wrong.
We used Ian's map to identify places where there were missing boundaries in MB streets (yellow boundaries without green boundaries for subnational, purple without black for national).
new TWTR.Widget({ | |
version: 2, | |
type: 'search', | |
search: '#ICC OR #demandjustice', | |
//The above was changed from 'amnesty' to '#ICC OR demandjustice' | |
interval: 30000, | |
title: 'Amnesty Tweets', | |
subject: '', | |
width: 250, |
<div id="iframe_container"> | |
<iframe src="http://EXAMPLE.GOV"></iframe> | |
</div> |
//COULD CREATE THIS ARRAY WITH A FOR LOOP PULLING FROM THE INDEX | |
// TRASH! var breakdown = [{"DR":[]},{"DI":[]},{"MP":[]},{"LT":[]},{"DA":[]},{"FD":[]}] | |
var markers = []; | |
//build map elements | |
var map = mapbox.map('map'); | |
map.addLayer(mapbox.layer().id('grassroots.map-lv8enaf8')); | |
map.addLayer(mapbox.layer().id('grassroots.africa-protraction')); | |
map.ui.zoomer.add(); |
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":["-82.821443","34.358034"]},"properties":{"Name":"Hartwell Dam","Initial Year":"1962","Generating Units":"5","Average Energy":"486,000 MWH","System Name":"GA-AL-SC"}},{"type":"Feature","geometry":{"type":"Point","coordinates":["-82.594035","34.02549"]},"properties":{"Name":"Richard B. Russell Dam","Initial Year":"1985","Generating Units":"8 (4 Turbine)","Average Energy":"756,000 MWH","System Name":"GA-AL-SC"}},{"type":"Feature","geometry":{"type":"Point","coordinates":["-82.199761","33.661175"]},"properties":{"Name":"J. Strom Thurmond Dam","Initial Year":"1953","Generating Units":"7","Average Energy":"731,000 MWH","System Name":"GA-AL-SC"}},{"type":"Feature","geometry":{"type":"Point","coordinates":["-84.67015","34.613714"]},"properties":{"Name":"Carters Dam","Initial Year":"1975","Generating Units":"4 (2 Turbine)","Average Energy":"398,000 MWH","System Name":"GA-AL-SC"}},{"type":"Feature","geometry":{"type":"Po |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title></title> | |
<script src='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.js'></script> | |
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.css' rel='stylesheet' /> | |
<!--[if lte IE 8]> | |
<link href='//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.ie.css' rel='stylesheet'> | |
<![endif]--> |