Sargassum seaweed map with MapLibre GL JS
Sargassum is a brown seaweed that floats in clumps, held up by little gas-filled bladders. Since 2011, it has bloomed nearly every year in a band across the tropical Atlantic, from West Africa to the Gulf of Mexico, that scientists call the Great Atlantic Sargassum Belt. Currents carry it onto beaches by the ton, and as it rots there it gives off hydrogen sulfide, which smells of rotten eggs. This map plays a year of it, week by week from November 2025 to October 2026, with the coasts where it was likely washing ashore glowing green.
Each square is about 11 km across, and its color is how much of the sea's surface sargassum covered there, on average, over the week. Even where it's thickest, that's well under 1%: the seaweed floats in scattered clumps and long lines, with open water between them, and a square counts as fullest at 0.4%.
In November the belt is a thin line across the middle of the ocean. It thickens through the winter and spring, and by April it stretches from West Africa to the Lesser Antilles, with currents carrying it on into the Caribbean. The Caribbean fills up through the spring, and the Gulf of Mexico in June and July, while the belt in the open Atlantic thins out, and by October most of it is gone. USF's monthly outlooks put 2026 as the second-biggest sargassum year on record, after 2025. In June the Gulf held about 5 million metric tons of it, nearly twice its record from 2025.
The seaweed is harmless at sea, where it shelters fish, crabs, and young turtles. Washed up in heaps, it starts to rot, and the hydrogen sulfide it gives off smells of rotten eggs even in tiny amounts and irritates eyes and lungs in larger ones, so Martinique and Guadeloupe measure it in the air near their beaches. The green glow marks the coasts where it was likely washing ashore that week: those with the most sargassum in the squares just offshore. It doesn't measure how much of it washed up, which depends on each beach's winds and currents.
The squares come from the Sargassum Watch System at the University of South Florida's Optical Oceanography Lab, which maps floating algae across the Atlantic every day from NASA's and NOAA's satellites. Its weekly maps, at 1 km, cover 12 regions, and each square here is the average of every clear 1 km pixel in it that week. Where clouds hid a square all week, it keeps the week before's, for up to two weeks. The straight edges in the open sea are where USF's regions end. USF's maps leave out the water right along the coast, so the glow is drawn on the land next to the nearest squares of open sea.
Build it yourself
A Node.js script downloads one week of USF's maps, June 22 to 28, 2026, and makes everything but the sargassum in them see-through, and a page lays them over a dark map. It's one week of the map above, in USF's own colors, from blue for a little sargassum to red for the most. It was tested with MapLibre GL JS 6.15 in Chromium and Node.js 22.
What you need
- Node.js 22 or later.
- A browser key with the Map tiles product, made as API keys shows. Add
http://localhost:*to its allowed origins, so it works from your computer while you build. Map tiles are free, and signing up takes a minute, with no credit card. USF's maps need no key.
Collect the maps
Make a folder for the map, and in it a file called sargassum.mjs:
import { mkdir, writeFile } from "node:fs/promises";
import { crc32 } from "node:zlib";
// Each region's west, south, east, and north edges, from USF's Google Earth files.
const regions = {
GCOOS: [-98, 18, -79, 31],
SECOORA: [-92, 21, -75, 38],
YUCATAN: [-90, 15, -82, 22],
JAMAICA: [-82, 15, -75, 22],
PANAMA: [-84, 7.5, -75, 15],
ECARIB: [-75, 10, -60, 23],
BERMUDA: [-69, 27, -59, 37],
C_ATLANTIC: [-63, 0, -38, 22],
CE_ATLANTIC: [-38, 0, -11.5, 22],
N_BRAZIL: [-51, -10, -32, 0],
GOG: [-16, 0, 10, 7],
ANGOLA: [4, -15, 14, 0],
};
// June 22 to 28, 2026: days 173 to 179 of the year.
const week = "c20261732026179";
// Colors 1 to 235 are sargassum, up to 0.4% of the surface or more, so they stay. Color 0, sea with none, and the
// colors above 235, land, coasts, and clouds, turn see-through.
const alpha = Buffer.alloc(256);
alpha.fill(255, 1, 236);
const tRNS = Buffer.alloc(12 + alpha.length);
tRNS.writeUInt32BE(alpha.length, 0);
tRNS.write("tRNS", 4, "latin1");
alpha.copy(tRNS, 8);
tRNS.writeUInt32BE(crc32(tRNS.subarray(4, 8 + alpha.length)), 8 + alpha.length);
await mkdir("maps", { recursive: true });
for (const region of Object.keys(regions)) {
const url = `https://optics.marine.usf.edu/subscription/multi_sensor_fusion/${region}/2026/comp/179/${week}.1KM.${region}.7DAY.L3D.FAD.png`;
const response = await fetch(url);
if (!response.ok) throw new Error(`USF returned ${response.status} for ${region}`);
const png = Buffer.from(await response.arrayBuffer());
const firstImageData = png.indexOf("IDAT") - 4;
await writeFile(`maps/${region}.png`, Buffer.concat([png.subarray(0, firstImageData), tRNS, png.subarray(firstImageData)]));
console.log(`Saved ${region}`);
}
await writeFile("regions.json", JSON.stringify(regions));
- USF keeps each region's map for each week at an address made of the region, the year, and the days of the year the week starts and ends. A week ending on another day works too, as long as it's from May 2025 or later, when these maps start.
- Each map is a PNG that stores up to 256 colors once and a number for each pixel. A PNG can say how see-through each of its colors is in a
tRNSchunk, so the script adds one just before the pixels, without changing them, and finishes it with the checksum every PNG chunk ends with.
Run it:
node sargassum.mjs
It downloads about 3 MB, prints the name of each region as it saves its map, and writes maps/ and regions.json.
Make the page
Next to regions.json, make index.html, with your browser key in place of mapricot_pk_…:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>A week of sargassum</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/maplibre-gl@6.15.0/dist/maplibre-gl.css">
<script type="importmap">
{
"imports": {
"maplibre-gl": "https://cdn.jsdelivr.net/npm/maplibre-gl@6.15.0/+esm"
}
}
</script>
</head>
<body style="margin: 0">
<div id="map" style="height: 100vh"></div>
<script type="module">
import * as maplibregl from "maplibre-gl";
const map = new maplibregl.Map({
container: "map",
style: "https://api.mapricot.com/tiles/v1/styles/dark.json?key=mapricot_pk_…",
bounds: [
[-98, -4],
[12, 32],
],
attributionControl: { customAttribution: "Sargassum: USF Optical Oceanography Lab" },
});
await map.once("load");
const labels = map.getStyle().layers.find((layer) => layer.type === "symbol").id;
const regions = await (await fetch("regions.json")).json();
for (const [region, [west, south, east, north]] of Object.entries(regions)) {
map.addSource(region, {
type: "image",
url: `maps/${region}.png`,
coordinates: [
[west, north],
[east, north],
[east, south],
[west, south],
],
});
map.addLayer({ id: region, type: "raster", source: region }, labels);
}
</script>
</body>
</html>
- Each region's map is an image source, which MapLibre stretches between the four corners it's given. It goes under the first layer of names, so the names of places stay on top.
- USF's maps are flat grids of longitude and latitude, while the map is in Web Mercator, which spreads latitudes further apart toward the poles. So the middle of each picture sits a little north of where it belongs, up to about 40 km off the southeastern US. The map above draws its squares row by row to avoid that.
Open it
Serve the folder with npx serve or python3 -m http.server, and open the address it prints. Opened straight from the file, the map stays blank, as Open the page explains. You should see the sargassum belt from West Africa to the Gulf of Mexico in streaks of blue, green, yellow, and red, with the most in the Gulf of Mexico and the Caribbean, and gaps where clouds hid the sea all week.
Data
- Sargassum: Sargassum Watch System, Optical Oceanography Lab, College of Marine Science, University of South Florida: weekly floating algae density from MODIS-Aqua, NOAA-20 VIIRS, and PACE OCI, by the method in Qi et al. (2026), and its monthly outlooks (credit the lab)
- Map: OpenStreetMap contributors (ODbL), in Mapricot's map tiles