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
Select Git revision

Target

Select target project
  • informationsvisualisierung-2024/infovis-projekt
1 result
Select Git revision
Show changes
Commits on Source (4)
...@@ -95,7 +95,7 @@ update msg ( global, local ) = ...@@ -95,7 +95,7 @@ update msg ( global, local ) =
loadingfdg = loadingfdg =
{ fdg | loading = True } { fdg | loading = True }
in in
( ( { global | view = newView }, local ) ( ( { global | view = newView }, { local | forcedirectedgraph = loadingfdg } )
, ForceDirectedGraphView.calculateModel global.data loadingfdg |> Cmd.map ForceDirectedGraphView.propagate , ForceDirectedGraphView.calculateModel global.data loadingfdg |> Cmd.map ForceDirectedGraphView.propagate
) )
...@@ -194,14 +194,14 @@ viewHome global = ...@@ -194,14 +194,14 @@ viewHome global =
case global.progress of case global.progress of
Loading -> Loading ->
Html.div [ Html.Attributes.style "margin" "auto" ] Html.div [ Html.Attributes.style "margin" "auto" ]
[ Html.div [ Html.Attributes.class "loader" ] [] [ Html.div [ Html.Attributes.class "loader" ] []
, Html.div , Html.div
[ Html.Attributes.style "position" "relative" [ Html.Attributes.style "position" "relative"
, Html.Attributes.style "left" "1.5rem" , Html.Attributes.style "left" "1.5rem"
, Html.Attributes.style "bottom" "5rem" , Html.Attributes.style "bottom" "5rem"
]
[ Html.text "Loading Data..." ]
] ]
[ Html.text "Loading Data..." ]
]
Failure msg -> Failure msg ->
Html.text (msg |> (++) "Error while loading data. ") Html.text (msg |> (++) "Error while loading data. ")
...@@ -237,7 +237,7 @@ viewHome global = ...@@ -237,7 +237,7 @@ viewHome global =
, Html.b [] [ text "Chernoff Gesichtern" ] , Html.b [] [ text "Chernoff Gesichtern" ]
, text " vergleichen kannst." , text " vergleichen kannst."
, text " Durch " , text " Durch "
, Html.b [] [ text "Klick auf ein Drittland"] , Html.b [] [ text "Klick auf ein Drittland" ]
, text " und ggf. anschließende Auswahl eines " , text " und ggf. anschließende Auswahl eines "
, Html.b [] [ text "Konsulats" ] , Html.b [] [ text "Konsulats" ]
, text " kannst du die zur Berechnung der Gesichter verwendeten Daten filtern." , text " kannst du die zur Berechnung der Gesichter verwendeten Daten filtern."
......
...@@ -26,10 +26,12 @@ import TypedSvg.Core exposing (Attribute, Svg, text) ...@@ -26,10 +26,12 @@ import TypedSvg.Core exposing (Attribute, Svg, text)
import TypedSvg.Types exposing (AlignmentBaseline(..), AnchorAlignment(..), Paint(..), ShapeRendering(..), TextRendering(..), px) import TypedSvg.Types exposing (AlignmentBaseline(..), AnchorAlignment(..), Paint(..), ShapeRendering(..), TextRendering(..), px)
import Utils exposing (flag) import Utils exposing (flag)
icon : Html Msg icon : Html Msg
icon = icon =
Html.i [ Html.Attributes.class "fa-solid fa-hexagon-nodes fa-xl" ] [] Html.i [ Html.Attributes.class "fa-solid fa-hexagon-nodes fa-xl" ] []
w : Float w : Float
w = w =
1000 1000
...@@ -104,7 +106,7 @@ view global local = ...@@ -104,7 +106,7 @@ view global local =
] ]
, Html.div [ Html.Attributes.class "legend", style "width" "19%" ] , Html.div [ Html.Attributes.class "legend", style "width" "19%" ]
[ Html.div [ style "display" "flex" ] [ Html.div [ style "display" "flex" ]
[ Html.h3 [ style "margin-top" "0rem", style "margin-bottom" "0rem",style "align-content" "center" ] [ Html.h3 [ style "margin-top" "0rem", style "margin-bottom" "0rem", style "align-content" "center" ]
[ Html.text "Legende" [ Html.text "Legende"
] ]
, if not <| local.highlight == "" then , if not <| local.highlight == "" then
...@@ -210,9 +212,6 @@ postInit data local = ...@@ -210,9 +212,6 @@ postInit data local =
filteredData = filteredData =
filterForYears data year filterForYears data year
-- _ =
-- Debug.log "filteredData" filteredData
countryNames = countryNames =
List.map (\ent -> String.toUpper ent.state) filteredData List.map (\ent -> String.toUpper ent.state) filteredData
...@@ -343,9 +342,6 @@ postInit data local = ...@@ -343,9 +342,6 @@ postInit data local =
) )
|> List.Statistics.mean |> List.Statistics.mean
|> Maybe.withDefault 0 |> Maybe.withDefault 0
-- _ =
-- Debug.log "meanIssRat" meanIssRat
in 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.5) * meanIssRat, strength = Just 1 }
) )
...@@ -413,14 +409,11 @@ postInit data local = ...@@ -413,14 +409,11 @@ postInit data local =
list = list =
Force.computeSimulation (Force.simulation forces) <| List.map .label <| Graph.nodes graph Force.computeSimulation (Force.simulation forces) <| List.map .label <| Graph.nodes graph
in in
Task.succeed (Ok { firstInit | loading = True }) Task.succeed
|> Task.andThen (Ok
(\_ -> --(Local.Model (updateGraphWithList graph list) (Force.simulation forces) 0 True "" 0 0)
Task.succeed { local | graph = updateGraphWithList graph list, simulation = Force.simulation forces, loading = True }
(Ok )
(Local.Model (updateGraphWithList graph list) (Force.simulation forces) 0 False "" 0 0)
)
)
isSchengen : Graph.Node Local.Entity -> List Entry -> Bool isSchengen : Graph.Node Local.Entity -> List Entry -> Bool
...@@ -467,7 +460,7 @@ updateGraphWithList = ...@@ -467,7 +460,7 @@ updateGraphWithList =
calculateModel : List Entry -> Local.Model -> Cmd Local.Msg calculateModel : List Entry -> Local.Model -> Cmd Local.Msg
calculateModel data local = calculateModel data local =
Task.perform Local.RecalcEnd (Process.sleep 0 |> Task.andThen (\_ -> postInit data local)) Task.perform Local.RecalcEnd (Process.sleep 10 |> Task.andThen (\_ -> Process.sleep 0) |> Task.andThen (\_ -> postInit data local))
update : Local.Msg -> Global -> Local.Model -> ( Global, Local.Model, Cmd Msg ) update : Local.Msg -> Global -> Local.Model -> ( Global, Local.Model, Cmd Msg )
......