function calculateBounds(json) {
			// Calculate bounding box transforms for entire dataset.
			bounds = path.bounds(json),
					scale = .95 / Math.max((bounds[1][0] - bounds[0][0]) / width, (bounds[1][1] - bounds[0][1]) / height),
					translate = [
					(width - scale * (bounds[1][0] + bounds[0][0])) / 2,
					(height - scale * (bounds[1][1] + bounds[0][1])) / 2
				];

			// Update the projection.
			projection.scale(scale).translate(translate);
		}
/**
		 * Calculates the bound of the map and converts the coordinates
		 * of the features to projected coordinates.
		 * @param {JSON} json GeoJson containing the features
		 */
Calculates the bound of the map and converts the coordinates
of the features to projected coordinates.
@param {JSON} json GeoJson containing the features
Calculates the bound of the map and converts the coordinates of the features to projected coordinates . @param { JSON } json GeoJson containing the features
function calculateBounds(json) {
			bounds = path.bounds(json),
					scale = .95 / Math.max((bounds[1][0] - bounds[0][0]) / width, (bounds[1][1] - bounds[0][1]) / height),
					translate = [
					(width - scale * (bounds[1][0] + bounds[0][0])) / 2,
					(height - scale * (bounds[1][1] + bounds[0][1])) / 2
				];
			projection.scale(scale).translate(translate);
		}
function calculateBounds ( json ) { bounds = path . bounds ( json ) , scale = .95 / Math . max ( ( bounds [ 1 ] [ 0 ] - bounds [ 0 ] [ 0 ] ) / width , ( bounds [ 1 ] [ 1 ] - bounds [ 0 ] [ 1 ] ) / height ) , translate = [ ( width - scale * ( bounds [ 1 ] [ 0 ] + bounds [ 0 ] [ 0 ] ) ) / 2 , ( height - scale * ( bounds [ 1 ] [ 1 ] + bounds [ 0 ] [ 1 ] ) ) / 2 ] ; projection . scale ( scale ) . translate ( translate ) ; }
Calculates the bound of the map and converts the coordinates
 of the features to projected coordinates.
Calculates the bound of the map and converts the coordinates of the features to projected coordinates .
// Calculate bounding box transforms for entire dataset. // Update the projection.