Skip to content

Instantly share code, notes, and snippets.

View pnavarrc's full-sized avatar

Pablo Navarro pnavarrc

  • Act Now Coalition
  • Vancouver, Canada
  • 17:37 (UTC -07:00)
View GitHub Profile
@pnavarrc
pnavarrc / Makefile
Last active September 19, 2015 21:52
Orthographic Projection
# Download and Transform the 1:50m Country Shapefiles from Natural Earth
# http://www.naturalearthdata.com/downloads/110m-physical-vectors/
URL = http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_land.zip
# Download the zip file from the Natural Earth server
ne_110m_land.zip:
curl -LO $(URL)
# Unzip the shapefiles
@pnavarrc
pnavarrc / Makefile
Last active February 12, 2019 15:50
Azimutal Equal Area
# Download and Transform the 1:50m Country Shapefiles from Natural Earth
# http://www.naturalearthdata.com/downloads/110m-physical-vectors/
URL = http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_land.zip
# Download the zip file from the Natural Earth server
ne_110m_land.zip:
curl -LO $(URL)
# Unzip the shapefiles
@pnavarrc
pnavarrc / index.html
Last active May 28, 2019 04:20
Location API
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Location API</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
@pnavarrc
pnavarrc / earthquakes.csv
Last active November 28, 2018 05:53
Earthquake Map
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 15 columns, instead of 5 in line 7.
time,latitude,longitude,depth,mag,magType,nst,gap,dmin,rms,net,id,updated,place,type
2015-09-19T12:52:19.770Z,-32.3344,-72.0915,10.62,6.2,mwb,,68,0.786,0.7,us,us20003luw,2015-09-19T22:16:55.263Z,"82km W of La Ligua, Chile",earthquake
2015-09-19T09:07:08.720Z,-31.1104,-71.6113,23.23,6.1,mwp,,76,0.435,0.99,us,us20003lsq,2015-09-19T18:57:06.000Z,"69km SW of Ovalle, Chile",earthquake
2015-09-18T15:59:42.800Z,15.2337,-45.9734,10,6,mwc,,31,13.337,1.12,us,us20003lc6,2015-09-19T01:57:01.000Z,"Northern Mid-Atlantic Ridge",earthquake
2015-09-18T09:10:44.750Z,-32.4085,-72.2351,8.65,6.3,mwp,,70,0.793,1.48,us,us20003l5d,2015-09-19T11:40:16.618Z,"90km NW of Valparaiso, Chile",earthquake
2015-09-17T04:10:30.600Z,-31.5386,-71.7145,30.15,6.7,mww,,61,0.864,1.41,us,us20003kfv,2015-09-18T04:09:08.053Z,"53km W of Illapel, Chile",earthquake
2015-09-17T03:55:06.860Z,-31.083,-71.296,35,6.5,mww,,100,0.501,1.28,us,us20003kfj,2015-09-17T11:43:23.955Z,"54km S of Ovalle, Chile",earthquake
2015-09-17T01:41:09.300Z,-31.1488,-71.5533,35,6.4
@pnavarrc
pnavarrc / Makefile
Last active September 21, 2015 19:20
Inverse Projection
# Download and Transform the 1:50m Country Shapefiles from Natural Earth
# http://www.naturalearthdata.com/downloads/110m-physical-vectors/
URL = http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_land.zip
# Download the zip file from the Natural Earth server
ne_110m_land.zip:
curl -LO $(URL)
# Unzip the shapefiles
@pnavarrc
pnavarrc / Makefile
Last active September 26, 2015 14:38
Zoom Behavior (Scale)
# Download and Transform the 1:50m Country Shapefiles from Natural Earth
# http://www.naturalearthdata.com/downloads/110m-physical-vectors/
URL = http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_land.zip
# Download the zip file from the Natural Earth server
ne_110m_land.zip:
curl -LO $(URL)
# Unzip the shapefiles
@pnavarrc
pnavarrc / Makefile
Created September 21, 2015 23:58
Map Zoom and Rotate
# Download and Transform the 1:50m Country Shapefiles from Natural Earth
# http://www.naturalearthdata.com/downloads/50m-cultural-vectors/
URL = http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/cultural/ne_50m_admin_0_countries.zip
# Download the zip file from the Natural Earth server
ne_50m_admin_0_countries.zip:
curl -LO $(URL)
# Unzip the shapefiles
@pnavarrc
pnavarrc / index.html
Created September 22, 2015 01:31
Mapping with canvas
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Zoom and Rotating (Reprojecting)</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
@pnavarrc
pnavarrc / Makefile
Created September 22, 2015 12:47
D3 Geo Projection Plugin
# Download and Transform the 1:50m Country Shapefiles from Natural Earth
# http://www.naturalearthdata.com/downloads/110m-physical-vectors/
URL = http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_land.zip
# Download the zip file from the Natural Earth server
ne_110m_land.zip:
curl -LO $(URL)
# Unzip the shapefiles
@pnavarrc
pnavarrc / Makefile
Last active September 23, 2015 00:13
Adding labels to a Map
# Download and Transform the 1:50m Country Shapefiles from Natural Earth
# http://www.naturalearthdata.com/downloads/50m-cultural-vectors/
URL = http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/cultural/ne_50m_admin_0_countries.zip
# Download the zip file from the Natural Earth server
ne_50m_admin_0_countries.zip:
curl -LO $(URL)
# Unzip the shapefiles