Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • informationsvisualisierung-2024/infovis-projekt
1 result
Show changes
Commits on Source (4)
......@@ -82,7 +82,9 @@ body {
border-radius: var(--rounded);
}
button:hover {
cursor: pointer
}
.legend button:active {
background: #ffffff44;
......
......@@ -47,16 +47,28 @@ view global local =
Html.div [ style "width" "100%" ]
[ Html.div [ style "display" "flex", style "flex-direction" "row", style "align-items" "center", style "margin-bottom" "0.5rem" ]
[ Html.div []
[-- Html.h2 [ style "margin-top" "0" ]
-- [ Html.text "Force directed Graph" ]
Html.div [ style "display" "flex", style "flex-direction" "row", style "gap" "0.5rem" ]
[ Html.button [ Local.ChangeVersion 0 |> propagate |> onClick ]
[ -- Html.h2 [ style "margin-top" "0" ]
-- [ Html.text "Force directed Graph" ]
Html.div [ style "display" "flex", style "flex-direction" "row", style "gap" "0.5rem" ]
[ Html.button
[ Local.ChangeVersion 0 |> propagate |> onClick
, Html.Attributes.title "Radialkräfte, die Schengen-Länder auf einen inneren und Drittländer auf einen äußeren Kreis zwingen"
]
[ Html.text "Version 1" ]
, Html.button [ Local.ChangeVersion 1 |> propagate |> onClick ]
, Html.button
[ Local.ChangeVersion 1 |> propagate |> onClick
, Html.Attributes.title "Gleichmäßig abstoßende Kraft auf allen Knoten"
]
[ Html.text "Version 2" ]
, Html.button [ Local.ChangeVersion 2 |> propagate |> onClick ]
, Html.button
[ Local.ChangeVersion 2 |> propagate |> onClick
, Html.Attributes.title "Abstoßende Kräfte skaliert mit dem Verhältnis von angenommenen zu abgelehnten Visas + Kollisionskraft, die einen Radius um jeden Knoten simuliert (Schengenländer größer, Drittländer kleiner) "
]
[ Html.text "Version 3" ]
, Html.button [ Local.ChangeVersion 3 |> propagate |> onClick ]
, Html.button
[ Local.ChangeVersion 3 |> propagate |> onClick
, Html.Attributes.title "Kantenlänge skaliert mit dem Verhältnis von angenommenen zu abgelehnten Visas + Gleichmäßig abstoßende Kraft auf jedem Knoten + Gleichmäßige Kollisionskraft"
]
[ Html.text "Version 4" ]
]
]
......@@ -250,7 +262,7 @@ postInit data local =
( i.id, { strength = 4.0, x = w / 2, y = h / 2, radius = min h w / 3.0 } )
else
( i.id, { strength = 4.0, x = w / 2, y = h / 2, radius = min h w / 1.2 } )
( i.id, { strength = 4.0, x = w / 2, y = h / 2, radius = min h w / 1.3 } )
)
|> Force.customRadial
, Graph.nodes graph
......@@ -268,7 +280,7 @@ postInit data local =
]
1 ->
[ Force.manyBodyStrength -8 <|
[ Force.manyBodyStrength -7 <|
List.map .id <|
Graph.nodes graph
]
......@@ -343,7 +355,7 @@ postInit data local =
|> List.Statistics.mean
|> Maybe.withDefault 0
in
{ source = e.from, target = e.to, distance = (min w h / 1.5) * meanIssRat, strength = Just 1 }
{ source = e.from, target = e.to, distance = (min w h / 1.6) * meanIssRat, strength = Just 1 }
)
|> Force.customLinks 3
, Force.manyBodyStrength -30 <|
......@@ -360,52 +372,6 @@ postInit data local =
(h / 2)
]
--Force.customLinks 1
-- (List.map link (Graph.edges graph))
--, Graph.edges graph
-- |> List.map
-- (\i ->
-- if
-- isSchengen
-- (case Graph.get i.from graph of
-- Just ctx ->
-- ctx.node _ -> Graph.Node 0 (Force.entity 0 "")
-- )
-- data
-- && isSchengen
-- (case Graph.get i.to graph of
-- Just ctx ->
-- ctx.node
-- _ ->
-- Graph.Node 0 (Force.entity 0 "")
-- )
-- data
-- || not
-- (isSchengen
-- (case Graph.get i.from graph of
-- Just ctx ->
-- ctx.node
-- _ ->
-- Graph.Node 0 (Force.entity 0 "")
-- )
-- data
-- )
-- && not
-- (isSchengen
-- (case Graph.get i.to graph of
-- Just ctx ->
-- ctx.node
-- _ ->
-- Graph.Node 0 (Force.entity 0 "")
-- )
-- data
-- )
-- then
-- { source = i.from, target = i.to, distance = 3, strength = Just 2 }
-- else
-- { source = i.from, target = i.to, distance = 10, strength = Just 1 }
-- )
-- |> Force.customLinks 1
list =
Force.computeSimulation (Force.simulation forces) <| List.map .label <| Graph.nodes graph
in
......