A web-based project for visualizing global weather conditions using animated wind data and map projections. The application runs entirely in the browser and is supported by a lightweight Node.js development server.
This project was created as a learning exercise in JavaScript and browser-based visualization and is inspired by the earlier Tokyo Wind Map project.
- Visualizes global wind patterns on an interactive world map
- Uses weather forecast data from the Global Forecast System (GFS)
- Combines SVG and HTML5 Canvas for rendering
- Designed to be deployed as a static site (e.g. S3-style hosting)
- Includes a minimal Node.js server for local development
Note: The file
dev-server.jsis located in the repository root (not/server).
- Node.js
- npm
- Clone the repository
- Install dependencies
- Start the development server
The development server serves files from the public/ directory and contains almost no server-side logic. It exists to simulate static hosting behavior.
Once running, open your browser and navigate to:
http://localhost:8080
Linux note: On Ubuntu, Mint, and elementary OS, use
nodejsinstead ofnodedue to a naming conflict.
dev-server.js— Local development serverpublic/index.html— Main entry pointpublic/libs/earth/— Core visualization logicpublic/data/— Map and weather datapublic/data/weather/current/— Sample weather layer
Map data is sourced from Natural Earth and converted into TopoJSON format. Multiple map resolutions are used:
- Larger scale (simplified) for animation
- Smaller scale (detailed) for static display
The conversion process requires:
- GDAL
- TopoJSON
After processing, generated TopoJSON files are placed in:
public/data/
Weather data comes from the Global Forecast System (GFS) operated by the US National Weather Service.
- Forecasts are produced four times daily
- Data is downloaded from NOMADS
- Original files are in GRIB2 format
- Only selected wind vector records are extracted
The extracted data is converted to JSON and stored in:
public/data/weather/current/
To reduce download size:
- M+ Fonts are subset to include only required characters
- Font analysis logic lives in
server/font/findChars.js - Subsetting is performed using the M+Web FONTS Subsetter
- Resulting fonts are stored in
public/styles/
The Mono Social Icons Font is used for scalable social icons and can be subset using Font Squirrel’s WebFont Generator.
Key technical challenges addressed in this project:
-
Interpolation: GFS data is provided on a 1° grid and interpolated in the browser using bilinear interpolation
-
Projection distortion: Different map projections distort motion differently; distortion is calculated per point
-
Layered rendering:
- SVG for the world map
- One Canvas for animated particles
- One Canvas for the color overlay
-
Globe masking: A detached Canvas is used to determine globe boundaries
-
State management:
- Configuration is stored in the URL hash
- Backbone.js models and events propagate state changes across components
This event-driven flow can occasionally produce transient visual artifacts.
- hint.fm Wind Map
- D3.js visualization library
Feedback and contributions are welcome, especially those that improve clarity, structure, and best practices.