This notebook is based on the tutorial by Andy Woodruff at https://github.com/awoodruff/leaflet-intro.

In [1]:
using LeafletJS, GeoJSON
In [2]:
;wget https://raw.githubusercontent.com/awoodruff/leaflet-intro/gh-pages/neighborhoods.geojson
--2017-05-22 22:49:10--  https://raw.githubusercontent.com/awoodruff/leaflet-intro/gh-pages/neighborhoods.geojson
Resolving raw.githubusercontent.com... 151.101.116.133
Connecting to raw.githubusercontent.com|151.101.116.133|:443... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'
  Strict-Transport-Security: max-age=31536000
  X-Content-Type-Options: nosniff
  X-Frame-Options: deny
  X-XSS-Protection: 1; mode=block
  ETag: "25a0869041ee42bc7eb17f056f2dc6252aa5305f"
  Content-Type: text/plain; charset=utf-8
  Cache-Control: max-age=300
  X-Geo-Block-List:
  X-GitHub-Request-Id: D94C:4AAA:1B776F0:1C953A9:5923A326
  Content-Length: 1450226
  Accept-Ranges: bytes
  Date: Tue, 23 May 2017 02:49:11 GMT
  Via: 1.1 varnish
  Connection: keep-alive
  X-Served-By: cache-bos8235-BOS
  X-Cache: MISS
  X-Cache-Hits: 0
  X-Timer: S1495507751.914336,VS0,VE124
  Vary: Authorization,Accept-Encoding
  Access-Control-Allow-Origin: *
  X-Fastly-Request-ID: 23252436f6e9af12dfdf2735ba2d9c6c8c07084f
  Expires: Tue, 23 May 2017 02:54:11 GMT
  Source-Age: 0
Length: 1450226 (1.4M) [text/plain]
Saving to: ‘neighborhoods.geojson’

     0K .......... .......... .......... .......... ..........  3%  536K 3s
    50K .......... .......... .......... .......... ..........  7% 2.73M 1s
   100K .......... .......... .......... .......... .......... 10% 2.92M 1s
   150K .......... .......... .......... .......... .......... 14% 4.31M 1s
   200K .......... .......... .......... .......... .......... 17% 6.67M 1s
   250K .......... .......... .......... .......... .......... 21% 3.92M 1s
   300K .......... .......... .......... .......... .......... 24% 6.69M 1s
   350K .......... .......... .......... .......... .......... 28% 3.64M 0s
   400K .......... .......... .......... .......... .......... 31% 3.11M 0s
   450K .......... .......... .......... .......... .......... 35% 6.49M 0s
   500K .......... .......... .......... .......... .......... 38% 5.20M 0s
   550K .......... .......... .......... .......... .......... 42% 6.88M 0s
   600K .......... .......... .......... .......... .......... 45% 7.08M 0s
   650K .......... .......... .......... .......... .......... 49% 7.92M 0s
   700K .......... .......... .......... .......... .......... 52% 4.95M 0s
   750K .......... .......... .......... .......... .......... 56% 7.50M 0s
   800K .......... .......... .......... .......... .......... 60% 12.8M 0s
   850K .......... .......... .......... .......... .......... 63% 4.13M 0s
   900K .......... .......... .......... .......... .......... 67% 6.37M 0s
   950K .......... .......... .......... .......... .......... 70% 6.08M 0s
  1000K .......... .......... .......... .......... .......... 74% 8.13M 0s
  1050K .......... .......... .......... .......... .......... 77% 7.63M 0s
  1100K .......... .......... .......... .......... .......... 81% 6.93M 0s
  1150K .......... .......... .......... .......... .......... 84% 5.92M 0s
  1200K .......... .......... .......... .......... .......... 88% 8.67M 0s
  1250K .......... .......... .......... .......... .......... 91% 7.25M 0s
  1300K .......... .......... .......... .......... .......... 95% 9.97M 0s
  1350K .......... .......... .......... .......... .......... 98% 7.41M 0s
  1400K .......... ......                                     100% 17.5M=0.3s

Last-modified header missing -- time-stamps turned off.
2017-05-22 22:49:11 (4.16 MB/s) - ‘neighborhoods.geojson’ saved [1450226/1450226]

In [3]:
;wget https://raw.githubusercontent.com/awoodruff/leaflet-intro/gh-pages/rodents.geojson
--2017-05-22 22:49:11--  https://raw.githubusercontent.com/awoodruff/leaflet-intro/gh-pages/rodents.geojson
Resolving raw.githubusercontent.com... 151.101.116.133
Connecting to raw.githubusercontent.com|151.101.116.133|:443... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'
  Strict-Transport-Security: max-age=31536000
  X-Content-Type-Options: nosniff
  X-Frame-Options: deny
  X-XSS-Protection: 1; mode=block
  ETag: "72c444f2994220c7fab2ac59715411e71187b0e6"
  Content-Type: text/plain; charset=utf-8
  Cache-Control: max-age=300
  X-Geo-Block-List:
  X-GitHub-Request-Id: 2B1C:1FDD:13B87E6:1495E76:5923A326
  Content-Length: 407468
  Accept-Ranges: bytes
  Date: Tue, 23 May 2017 02:49:11 GMT
  Via: 1.1 varnish
  Connection: keep-alive
  X-Served-By: cache-bos8227-BOS
  X-Cache: MISS
  X-Cache-Hits: 0
  X-Timer: S1495507751.473299,VS0,VE99
  Vary: Authorization,Accept-Encoding
  Access-Control-Allow-Origin: *
  X-Fastly-Request-ID: 4f00f8e36307ceb1bedeffa541bc483eddab47b8
  Expires: Tue, 23 May 2017 02:54:11 GMT
  Source-Age: 0
Length: 407468 (398K) [text/plain]
Saving to: ‘rodents.geojson’

     0K .......... .......... .......... .......... .......... 12%  535K 1s
    50K .......... .......... .......... .......... .......... 25% 1.45M 0s
   100K .......... .......... .......... .......... .......... 37% 2.46M 0s
   150K .......... .......... .......... .......... .......... 50% 2.87M 0s
   200K .......... .......... .......... .......... .......... 62% 3.79M 0s
   250K .......... .......... .......... .......... .......... 75% 3.44M 0s
   300K .......... .......... .......... .......... .......... 87% 3.58M 0s
   350K .......... .......... .......... .......... .......   100% 3.60M=0.2s

Last-modified header missing -- time-stamps turned off.
2017-05-22 22:49:11 (1.78 MB/s) - ‘rodents.geojson’ saved [407468/407468]

In [4]:
nbhd = GeoJSON.parsefile("neighborhoods.geojson")
rodents = GeoJSON.parsefile("rodents.geojson");

Stamen Tiles

stamen-toner (default)

In [5]:
LeafletMap([nbhd, rodents], [42.35, -71.08])