Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Esri/wind-js
An demo animation of wind on a Canvas layer in the JSAPI
https://github.com/Esri/wind-js
canvas cartography esri gfs-data javascript javascript-library visualization web-development wind
Last synced: 3 months ago
JSON representation
An demo animation of wind on a Canvas layer in the JSAPI
- Host: GitHub
- URL: https://github.com/Esri/wind-js
- Owner: Esri
- License: mit
- Created: 2014-01-15T05:24:29.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-05-02T18:14:57.000Z (over 7 years ago)
- Last Synced: 2024-08-25T00:56:16.143Z (5 months ago)
- Topics: canvas, cartography, esri, gfs-data, javascript, javascript-library, visualization, web-development, wind
- Language: JavaScript
- Size: 1.44 MB
- Stars: 733
- Watchers: 66
- Forks: 214
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
- awesome-canvas - wind-js - js/)] - An demo animation of wind on a Canvas layer in the JSAPI. ![](https://img.shields.io/github/stars/Esri/wind-js?style=social) ![](https://img.shields.io/github/forks/Esri/wind-js?style=social) (Plugins / Others)
README
# Wind-JS
Check out the live [demo](http://esri.github.io/wind-js/)
![Wind JS](https://f.cloud.github.com/assets/351164/2349895/36ba1c9a-a569-11e3-859d-5d753ea0898c.jpeg)
This project is an experiment in client-side data processing and visualization. Most of the code in this project is taken from https://github.com/cambecc/earth and has been re-purposed to support easier application to a variety of mapping APIs and Frameworks.
## How it works
The code for this project uses nothing but an HTML5 Canvas element and pure Javascript. The data come from the Global Forecast System which produces a large variety of datasets as continuous global gridded datasets (more info below). The data is passed into a JS class called `Windy` which takes the bounds of the map, the data, and the canvas element and then applies a [Bilinear Interpolation](http://en.wikipedia.org/wiki/Bilinear_interpolation) to generate a smooth surface. Once the surface has been generated a function randomly places "particles" onto the canvas at random x/y points. Each particle is then "evolved", moving in a direction and at a velocity dictated by the interpolated surface.
## The Data
Before [GFS data](http://nomads.ncdc.noaa.gov/data.php?name=access#hires_weather_datasets) can be used with this code it has to be converted into JSON. To do this we used another awesome project by [@cambecc](https://github.com/cambecc) called [`grib2json`](https://github.com/cambecc/grib2json). That tool converts data in the GRIB2 file format into a JSON structure with the grid represented as an array. An example result of that tool can be seen in the `gfs.json` file.
## Resources
* https://github.com/cambecc/earth
* http://earth.nullschool.net/
* [http://nomads.ncdc.noaa.gov/data.php...](http://nomads.ncdc.noaa.gov/data.php?name=access#hires_weather_datasets)
* http://developers.arcgis.com
* [twitter@esri](http://twitter.com/esri)## Issues
Find a bug or want to request a new feature? Please let us know by submitting an issue.
## Contributing
Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing).
## Credit
All the credit for this work goes to [@cambecc](https://github.com/cambecc) for creating [cambecc/earth](https://github.com/cambecc/earth). The majority of this code is directly taken from there, since it's utterly awesome.
## Licensing
This project inherits an MIT license from [cambecc/earth](https://github.com/cambecc/earth) because 95% of the code here was copied from that project.
A copy of the license is available in the repository's [license.txt]( https://raw.github.com/Esri/wind-js/master/license.txt) file.