geostitch

geostitch [options…] [file] Stitches the GeoJSON object in the specified input file, removing antimeridian and polar cuts, and replacing straight Cartesian line segments with geodesic segments. The input object must have coordinates in longitude and latitude in decimal degrees per RFC 7946. Antimeridian cutting, if needed, can then be re-applied after rotating to the desired projection aspect. See geoproject for an example. See also d3.geoStitch.

d3.geoCentroid()

d3.geoCentroid(feature) Returns the spherical centroid of the specified GeoJSON feature. See also path.centroid, which computes the projected planar centroid.

nest.entries()

nest.entries(array) Applies the nest operator to the specified array, returning an array of key-values entries. Conceptually, this is similar to applying map.entries to the associative array returned by nest.map, but it applies to every level of the hierarchy rather than just the first (outermost) level. Each entry in the returned array corresponds to a distinct key value returned by the first key function. The entry value depends on the number of registered key functions: if there is an add

ribbon.radius()

ribbon.radius([radius]) If radius is specified, sets the radius accessor to the specified function and returns this ribbon generator. If radius is not specified, returns the current radius accessor, which defaults to: function radius(d) { return d.radius; }

d3.min()

d3.min(array[, accessor]) Returns the minimum value in the given array using natural order. If the array is empty, returns undefined. An optional accessor function may be specified, which is equivalent to calling array.map(accessor) before computing the minimum value. Unlike the built-in Math.min, this method ignores undefined, null and NaN values; this is useful for ignoring missing data. In addition, elements are compared using natural order rather than numeric order. For example, the minim

selection.datum()

selection.datum([value]) Gets or sets the bound data for each selected element. Unlike selection.data, this method does not compute a join and does not affect indexes or the enter and exit selections. If a value is specified, sets the element’s bound data to the specified value on all selected elements. If the value is a constant, all elements are given the same datum; otherwise, if the value is a function, then the function is evaluated for each selected element, in order, being passed the

continuous.clamp()

continuous.clamp(clamp) If clamp is specified, enables or disables clamping accordingly. If clamping is disabled and the scale is passed a value outside the domain, the scale may return a value outside the range through extrapolation. If clamping is enabled, the return value of the scale is always within the scale’s range. Clamping similarly applies to continuous.invert. For example: var x = d3.scaleLinear() .domain([10, 130]) .range([0, 960]); x(-10); // -160, outside range x.inver

drag.on()

drag.on(typenames, [listener]) If listener is specified, sets the event listener for the specified typenames and returns the drag behavior. If an event listener was already registered for the same type and name, the existing listener is removed before the new listener is added. If listener is null, removes the current event listeners for the specified typenames, if any. If listener is not specified, returns the first currently-assigned listener matching the specified typenames, if any. When

d3.quadtree()

d3.quadtree([data[, x, y]]) Creates a new, empty quadtree with an empty extent and the default x- and y-accessors. If data is specified, adds the specified array of data to the quadtree. This is equivalent to: var tree = d3.quadtree() .addAll(data); If x and y are also specified, sets the x- and y- accessors to the specified functions before adding the specified array of data to the quadtree, equivalent to: var tree = d3.quadtree() .x(x) .y(y) .addAll(data);

d3.timer()

d3.timer(callback[, delay[, time]]) Schedules a new timer, invoking the specified callback repeatedly until the timer is stopped. An optional numeric delay in milliseconds may be specified to invoke the given callback after a delay; if delay is not specified, it defaults to zero. The delay is relative to the specified time in milliseconds; if time is not specified, it defaults to now. The callback is passed the (apparent) elapsed time since the timer became active. For example: var t = d3.tim