geojson-map-fit-mercator

Finds the optimal bearing, zoom and center point for fitting a set of GeoJSON features in a Mapbox GL or LibreMap Mercator map.

linear-least-squares

Finds the best curve to fit a set of points through minimizing the sum of the squares of the offset of each point from the curve.