// can't yet format YamlFrontmatter (["title: Windrose charts"; "category: Polar Charts"; "categoryindex: 9 "; "index: 2"], Some { StartLine = 2 StartColumn = 0 EndLine = 6 EndColumn = 8 }) to pynb markdown

In [ ]:
#r "nuget: Plotly.NET, 2.0.0-preview.6"
#r "nuget: Plotly.NET.Interactive, 2.0.0-preview.6"

Wind rose charts

BinderScriptNotebook

Summary: This example shows how to create wind rose charts in F#.

let's first create some data for the purpose of creating example charts:

In [3]:
open Plotly.NET 
  
let r    = [77.5; 72.5; 70.0; 45.0; 22.5; 42.5; 40.0; 62.5]
let r'   = [57.5; 50.0; 45.0; 35.0; 20.0; 22.5; 37.5; 55.0]
let r''  = [40.0; 30.0; 30.0; 35.0; 7.5; 7.5; 32.5; 40.0]
let r''' = [20.0; 7.5; 15.0; 22.5; 2.5; 2.5; 12.5; 22.5]

let t = ["North"; "N-E"; "East"; "S-E"; "South"; "S-W"; "West"; "N-W"]

A wind rose is a graphic tool used by meteorologists to give a succinct view of how wind speed and direction are typically distributed at a particular location.

In [4]:
let windrose1 =
    [
        Chart.WindRose (r   ,t,Name="11-14 m/s")
        Chart.WindRose (r'  ,t,Name="8-11 m/s")
        Chart.WindRose (r'' ,t,Name="5-8 m/s")
        Chart.WindRose (r''',t,Name="< 5 m/s")
    ]
    |> Chart.Combine
In [ ]:
windrose1
Out[ ]: