The 2D Map - CS-GY 6313 - Fall 2025
2025-10-24
What is a map for?
Snow’s Innovation:



“Not all geographical data should be on a map.”

Better for: Spatial patterns, regional clustering

Better for: Ranking, exact value lookup
The Challenge:
You must choose what to distort:

Any 2D map is a lie. The question is: what kind of lie?
Preserves shape & angles

Use: Navigation (constant compass bearing)
Preserves relative area

Use: Thematic maps (choropleths)
Preserves distance from center

Use: Distance calculations


Interactive Tissot tool: mgimond.github.io/tissot

The Problem: Greenland looks bigger than Africa
Reality: Africa is 14× larger than Greenland

The Solution: Use equal-area for thematic maps
Rule: If you shade areas, you MUST use an equal-area projection.
How Mercator exaggerates territories far from the equator

Definition:
Regions are shaded based on a value
Use Cases:
Good for: Seeing broad regional patterns

Definition:
Symbols (e.g., circles) are scaled based on a value
Use Cases:
Good for: Showing where the values are, not just the land area

Definition:
Geometry (area) is distorted to represent a quantity
Use Cases:
Good for: De-emphasizing misleading land area

Definition:
Shows movement or connections between regions
Use Cases:
Visual encoding: Line width ∝ quantity flowing
Choropleth maps are the most common and most misused type of map.
⚠️ Avoid these traps to create honest visualizations ⚠️
NEVER USE RAW COUNTS ON A CHOROPLETH MAP
A map of “Total Crimes” is just a map of “Total People”

What we expect: Regular grid, equal-sized circles

What we see: Circle sizes vary dramatically by latitude
The same principle applies to data: you must normalize to avoid misleading comparisons.
Same data, different binning methods:
Divides range into equal steps
Same number of items per bin
Finds “natural” clusters

| Method | Best For | Pitfall |
|---|---|---|
| Equal Interval | Evenly distributed data | Dominated by outliers |
| Quantile | Ranking & comparison | Hides natural clustering |
| Natural Breaks | Data with natural groups | Can be arbitrary with uniform data |
| Manual | Expert knowledge | Subjective, hard to defend |
Key Takeaway
There is no single “right” method, but you must be aware of your choice and able to defend it.

Problems:


For data from low to high with no meaningful middle:
Examples: Viridis, Blues, YlOrRd
For data with a meaningful midpoint:
Examples: RdBu (Red-White-Blue), BrBG, PiYG
Use ColorBrewer
colorbrewer2.org provides perceptually-uniform, colorblind-safe palettes
Large, sparse regions visually dominate small, dense regions

The Problem:

Land area dominates

Shows where votes are

Distorts geography by value

Geographically “wrong” but topologically “right”
What Beck realized:
His innovations:
The tube map is our bridge: it shows that sometimes the most effective visualization deliberately distorts reality to better serve the user’s task.
When you see a map, ask:
When you make a map, remember:
Next Time: Urban Visualization & Network-Geographic Hybrids
This lecture was developed using materials from:
Not all geographical data needs a map.
Maps use the x and y spatial dimensions to encode geography.
This means x and y cannot be used to encode other data variables (unlike a bar chart or scatterplot).
So when is a map the right choice?
Use a map when: The spatial relationship is the question.
Use a bar chart when: You need precise comparisons or rankings.
Why? Maps introduce area bias—Montana looks more “important” than Rhode Island simply due to land area.
GeoJSON is the lingua franca of web mapping.
FeatureCollection: A list of all featuresFeature: A single geographic “thing” (park, city, road)geometry: The shape (Point, LineString, Polygon)properties: Non-spatial data (name, population, ID){
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "NYU Bobst Library",
"type": "Library"
},
"geometry": {
"type": "Point",
"coordinates": [-73.997421, 40.729454]
}
},
{
"type": "Feature",
"properties": { "name": "W 4th Street", "type": "Street" },
"geometry": {
"type": "LineString",
"coordinates": [
[-74.000277, 40.731868],
[-73.997873, 40.731557]
]
}
},
{
"type": "Feature",
"properties": { "name": "Washington Square Park" },
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-73.999, 40.732], [-73.996, 40.732],
[-73.996, 40.730], [-73.999, 40.730],
[-73.999, 40.732]
]
]
}
}
]
}TopoJSON is an optimized version of GeoJSON.
Instead of storing the border between Colorado and Utah twice, TopoJSON stores the arc once and notes it’s shared by both states.
For choropleth maps, how you “bin” your data into color classes can completely change the story.

Same data. Different bins. Different conclusions.
Divides the range into equal-sized steps (e.g., 0-10, 10-20, 20-30).
Puts the same number of data points in each bin.
Finds “natural” clusters/gaps in the data using statistical optimization.
| Method | Best For | Watch Out For |
|---|---|---|
| Equal Interval | Evenly distributed data; meaningful intervals | Outliers dominating the map |
| Quantile | Ranking; highly skewed data | Hiding natural clustering; arbitrary bin edges |
| Jenks Natural Breaks | Data with natural groups/gaps | Uniform data; hard to explain to audience |
| Manual | Expert knowledge; specific breakpoints | Subjectivity; cherry-picking |
Key Takeaway
Always justify your choice. Show the data distribution (histogram) and explain why your classification makes sense for your story.
Leaflet is a lightweight, open-source JavaScript library for interactive maps.
Let’s build a simple example using our NYU GeoJSON data.
<!-- 1. Include Leaflet CSS & JS from a CDN -->
<link rel="stylesheet"
href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"/>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<!-- 2. Style the map container to fill the screen -->
<style>
#map { height: 100vh; }
</style>
<!-- 3. Create the map div -->
<body>
<div id="map"></div>
</body>// 3. Define our GeoJSON data
const myGeoJSON = { /* ... from example.geojson ... */ };
// 4. Add GeoJSON layer to the map
L.geoJSON(myGeoJSON, {
// For each feature, bind a popup with its name
onEachFeature: function (feature, layer) {
if (feature.properties && feature.properties.name) {
let popup = '<h4>' + feature.properties.name + '</h4>';
popup += '<p>' + feature.properties.description + '</p>';
layer.bindPopup(popup);
}
}
}).addTo(map);
// Points, lines, and polygons are automatically styled
// Click any feature to see its popup
// Pan and zoom the map to exploreLet’s see it in action!
Open: examples/leaflet_example.html
