Skip to content

Instantly share code, notes, and snippets.

.site-header:after, .controls:after {
content: " ";
display: table;
clear: both;
}
a, a:focus, a:hover, figcaption a, figcaption a:focus, figcaption a:hover {
background-position: bottom;
background-repeat: repeat-x;
background-size: 2px 2px;
}
@wknowles
wknowles / nav.css
Last active March 8, 2016 14:44
nav info for ckd
nav {
width: 100%;
/*background: #253241;*/
text-align:center;
}
nav ul {
list-style-type: none;
margin: 0 auto;
padding: 0;
@wknowles
wknowles / creating-coastal-vignettes-for-web-mapping.md
Last active December 31, 2017 17:27
a guide to creating coastal vignettes for use in web maps. Using Natural Earth data, GDAL and QGIS.

Creating coastal vignettes for web mapping.

Summary

To start with I downloaded Natural Earth 1:50m land shapefile. This was then reprojected to Web Mercator / EPSG:3857. I ran a series of buffers on the reprojected shapefile within QGIS. These were then combined, exported to Mapbox and styled. The final map turned out like this:

coastal vignetts

View the full web map on Mapbox.

@wknowles
wknowles / clip-and-reproject-shapefile.sh
Created April 19, 2016 07:03
quick script to clip and re-project a shapefile
#!/bin/bash
base_file='ne_50m_land' # change this to the filename of your shapefile
echo "clipping shapefile ${base_file}.shp"
ogr2ogr -f "ESRI Shapefile" ${base_file}_clipped.shp $base_file.shp -clipsrc -180 -85.06 180 85.06
echo "setting ${base_file} to web mercator projection"
ogr2ogr -t_srs EPSG:3857 ${base_file}_clipped_3857.shp ${base_file}_clipped.shp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wknowles
wknowles / endeavour.geojson
Last active September 10, 2016 08:21
Cooks first voyage on Endeavour. Data from Climatological Database for the World's Oceans 1750-1850 (CLIWOC), version 1.5 data release -- https://pendientedemigracion.ucm.es/info/cliwoc/cliwoc15.htm
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wknowles
wknowles / twitter.json
Created September 27, 2016 21:20 — forked from hrp/twitter.json
Example JSON response from Twitter streaming API
{
"text": "RT @PostGradProblem: In preparation for the NFL lockout, I will be spending twice as much time analyzing my fantasy baseball team during ...",
"truncated": true,
"in_reply_to_user_id": null,
"in_reply_to_status_id": null,
"favorited": false,
"source": "<a href=\"http://twitter.com/\" rel=\"nofollow\">Twitter for iPhone</a>",
"in_reply_to_screen_name": null,
"in_reply_to_status_id_str": null,
"id_str": "54691802283900928",
@wknowles
wknowles / districts.geojson
Created September 30, 2016 14:30
philadelphia L&I districts
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wknowles
wknowles / README.md
Last active October 3, 2016 17:54 — forked from wsvekla/README.md
2010 Census Geography with D3 and TopoJSON
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bells and Whistles</title>
<meta charset="utf-8">
<link rel="stylesheet" href="https://mapzen.com/js/mapzen.css">
<script src="https://mapzen.com/js/mapzen.min.js"></script>
<style>
#map {
height: 100%;