View LexHex.md

Create a hexbin grid with equal-area and equilateral hexagons

Using hexbin grids is a great way to aggregate data. However, with the commonly used Web Mercator projection, it is impossible to balance the technical necessity of uniform area across all of the hexbins with the aesthetics of equilateralness for each hexbin in the grid. You can have one or the other, but not both. You'll need to use a different projection to help generate an appropriate compromise between the area and shape of hexbins. This walk-thru is meant to show how to make a map of Lexington, KY with equal-area hexbins. In particular, it explains how to create hexbins that are not only equal-area, but also equilateral.

Prerequisites

View add_to_gdb.py
'''
A Python script to take the feature classes in an MXD file and add them to a geodatabase
'''
import arcpy
# Specify MXD with data to send to GDB
# TODO Make this so you don't have to have ArcGIS open. User should be able to take a user input and export to GDB of choice
mxd = arcpy.mapping.MapDocument('CURRENT')
# Specify the data frame where your features are
View cluck.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>TangramJS - Mixing with raster tiles</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<style>
body {
margin: 0;
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>TangramJS - Add Scene to Map</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<style>
body {
margin: 0;
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>TangramJS - Mixing with raster tiles</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<style>
body {
margin: 0;
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>TangramJS - Mixing with raster tiles</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<!-- <link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" /> -->
<link rel="stylesheet" href="https://mapzen.com/js/mapzen.css">
<style>
body {
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>A simple map</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<style>
body {
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Starter map</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<style>
body {
margin: 0;
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Starter map</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<style>
body {
margin: 0;