D3 Flashcards

1
Q

GeoJSON format

A

A standard way of representing geographic features in JavaScript.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

TopoJSON

A

Extension of GeoJSON that encodes topology. Geometries are stitched together in shared line segments: i.e. a shared boundary between California and Nevada is represented once.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Topology

A

The way in which constituent parts are interrelated or arranged.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Constituent

A

Being part of the whole

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

d3.geo.path()

A

Display geographic shapes. Returns an accessor function. Given a geometry (array of arcs) or feature object, it generates the path data string suitable for the “d” attribute of an SVG path element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Projection (d3.geo.albersUsa())

A

Convert locations (latitude and longitude) to pixel coordinates. Provides the surface (a mapping of the 3d globe to a 2d surface) for geo paths to be drawn.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Bind data to map with .datum or .data

A

.datum will render all the features objects as one node, .data will create it’s own node for each feature. The former is faster, the latter gives you fine-grain control over each feature

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

topojson.feature(topology, object)

A

Returns the GeoJSON Feature or FeatureCollection for the specified object in the given topology.

{
type: featureCollection,
features: [array of features]
}

You access features through .features property on return object. topology is a topojson object and object is the particular object (in objects property) that you want to use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Path

A

Takes in data through d attribute to draw a shape, which can consist of straight lines and curves.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Path: M & m

A

Move to commands. Like lifting a pen and starting to draw in a new location on the SVG. uppercase M indicates absolute coordinates will follow. lowercase m indicates relative coordinates will follow.

(Capitalization is absolute, lowercase is relative)

If command is followed by multiple pairs of coordinates, these coordinates are treated as lineto commands. Lineto will be relative or absolute depending on the (M/m) used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

lineto: (L, l, H, h, V, v)

A

Draw straight lines from current point to a new point.
L/l - draw a line from start to end point.
H/h - draw a horizontal line from the current point
V/v - draw a vertical line from the current point

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Closepath (Z,z)

A

Ends the current subpath and results in a straight line being drawn from that point to the initial point of the path.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

SVG Optimization

A

When including embeds from vector graphic software it is encouraged to run code through an SVG Optimizer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Path Curves: Cubic Bezier (C, c, S, s)

A

Todo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Path Curves: Quadratic Bezier (Q,q,T,t)

A

Todo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Path Curves: Elliptical arc (A, a)

A

Todo