← Back to live globe
UC22 · Crops & Agriculture

Global Crops & Agriculture

FAO STAT 2022 production data for eight major crops across 85+ countries, rendered as a colour-scaled point cloud on a WebGL globe. Switch between production volume, yield efficiency, and arable land percentage — click any country for detailed statistics.

85+

Countries covered

8

Crops tracked

3

FAO indicators

2022

Year of data

80+

Arable land records

24 hrs

Cache TTL

FAO STAT

Data source

Annual

Update frequency

Data Pipeline

🌱
01

FAO STAT 2022 Crop Dataset

The UN Food and Agriculture Organization (FAO) STAT database is the authoritative global source for agricultural production statistics. The QCL domain covers crop production in tonnes, yield in tonnes per hectare, and area harvested in hectares. This implementation uses a curated static extract of 2022 data for 8 major crops — wheat, rice, maize, soybeans, coffee, cocoa, sugarcane, and cotton — spanning 80+ producing countries, ensuring reliable offline availability without dependency on FAO's legacy HTTP API.

FAO STAT QCL domain8 crop types80+ countriesProduction · Yield · Area harvested
📐
02

Normalisation & Projection

Each crop dataset is normalised independently: the maximum production value for the selected crop becomes 1.0, and all other countries are scaled proportionally. This per-crop normalisation means the colour gradient always spans the full range regardless of absolute production scale — allowing meaningful comparison between high-volume crops like sugarcane (>700M t/yr) and low-volume crops like cocoa (~4M t/yr). Country centroids provide approximate lat/lng for point placement on the globe surface.

Per-crop max normalisationCountry centroid lat/lng0.0 – 0.8 altitude mappingThree view modes: production / yield / arable
🌍
03

Three.js BufferGeometry Point Cloud

Each country is rendered as a glowing sprite particle in a Three.js BufferGeometry point cloud attached directly to the globe.gl scene graph. Point altitude above the globe surface is proportional to the normalised production value, creating a visual 3D bar-chart effect on the sphere. The sprite texture is a radial canvas gradient from bright yellow-green at the centre to transparent at the edges, softened to avoid harsh edges at all viewing distances.

Three.js BufferGeometry32×32 canvas sprite textureAltitude ∝ productionVertex colour array — green gradient
🎨
04

Green Choropleth Colour Scale

The five-stop green gradient — dark navy (#1a1a2e) for no data, dark forest (#1a5f2a) for low, mid-green (#3d9142), bright green (#7ec850), to yellow-green (#c8f070) for very high — echoes vegetation mapping conventions and distinguishes agricultural intensity at a glance. The gradient is computed client-side by linear interpolation between stop colours, with the normalised value clamped to [0, 1] and mapped through the colour ramp.

5-stop green gradientLinear colour interpolationLow → High: #1a5f2a → #c8f070Vertex colours updated on crop/view change
🖱
05

Raycaster Hover & Click Interaction

Mouse hover and click events are handled by a Three.js Raycaster with a 4-unit point threshold. On hover, a floating tooltip shows the country name and its value for the selected crop/view. On click, the globe animates to centre on the selected country and the sidebar detail panel opens with full statistics: production in thousand tonnes, yield in t/ha, harvested area in thousand ha, and percentage of world total. The top-10 producers leaderboard updates instantly when the crop or view mode changes.

Three.js Raycaster4-unit point thresholdHover tooltipClick → fly to country + stats panel

About FAO STAT

The Food and Agriculture Organization of the United Nations (FAO) maintains FAOSTAT, the world's largest freely accessible database of food and agriculture statistics. The QCL domain (Crops and Livestock Products) covers production quantity, yield, and area harvested for over 200 crop items across 200+ countries and territories, with annual data going back to 1961.

Production figures are reported by national statistical offices and validated by FAO regional experts. Values are expressed in tonnes for production and tonnes per hectare for yield. Arable land percentages are sourced from the World Bank World Development Indicators (AG.LND.AGRI.ZS), which draws from FAO land-use surveys.

Highlights

Three view modes

Switch between production volume (thousand tonnes), yield (tonnes/hectare), and arable land percentage to reveal different aspects of agricultural geography — a country can be a top producer by volume but mid-range on yield efficiency.

Altitude = magnitude

Point altitude above the globe surface scales with the normalised production value, creating an intuitive 3D bar-chart-on-a-sphere effect. High-producing countries (China and India for rice; USA and Brazil for maize) visibly tower above others.

Crop diversity

The eight crops span five commodity categories: cereals (wheat, rice, maize), oilseeds (soybeans), beverages (coffee, cocoa), energy/fibre (sugarcane, cotton). Together they account for the majority of global calorie supply and traded agricultural commodity value.

Tech Stack

🌾

Data source

FAO STAT 2022 (static extract)

🌍

Globe

globe.gl + Three.js WebGL

🎨

Visualisation

BufferGeometry point cloud

📊

Crops

Wheat, Rice, Maize, Soy, Coffee, Cocoa, Sugarcane, Cotton

📍

Interaction

Hover tooltip + click detail panel

🌈

Colour scale

5-stop green gradient (#1a5f2a → #c8f070)

📐

Normalisation

Per-crop max-value scaling

Cache

24-hour edge cache