O & Network Visualization
O & Network Visualization
Maps
GEOVISUALIZATION: MAPS
Geovisualization
Wiki
Geospatial Data Visualization
Data Variable:
categorical-nominal (independent variable)
quantitative (dependent variable), Categorical
visual variable:
Color-saturation, color-hue, position, size.
Types of Map
https://www.icsm.gov.au/education/fundamentals-
mapping
Types of Map
https://www.icsm.gov.au/education/fundamentals-
mapping
Types of Map
https://www.icsm.gov.au/education/fundamentals-
mapping
Types of Map
https://www.icsm.gov.au/education/fundamentals-
mapping
Thematic Map example
Confirmed cases of coronavirus disease (COVID-19)
https://google.org/crisisresponse/covid19-map?hl=en
Thematic Map example
xperience.arcgis.com/experience/96dd742462124fa0b38ddedb9b25e429
Types of Map
https://www.icsm.gov.au/education/fundamentals-
mapping
Types of Map
https://www.icsm.gov.au/education/fundamentals-
mapping
Geovisualizaton
https://datavizcatalogue.com/methods/
choropleth.html
Geopandas plot
Via a plugin carto
gdf.plot(
column='Count’,
cmap='YlOrRd’,
linewidth=0.8,
edgecolor='0',
legend=True,
markersize=[39.739192, -104.990337],
legend_kwds={'label’:
"Number of landslides“
}
)
https://www.bloomberg
.com/news/articles/201
9-02-24/spain-tops-italy-
as-world-s-healthiest-
nation-while-u-s-slips
Geovisualization: Choropleth
Perceptual limitations.
can't accurately read or compare
values from the map.
uses area to encode values. So
large areas with low density (such
as the state of Nevada) are
overrepresented visually
Perceptual limitations.
can't accurately read or compare
values from the map.
uses area to encode values. So
large areas with low density (such
as the state of Nevada) are
overrepresented visually
https://www.270towin.com/maps/sabatos-crystal-ball-2020-president
Geovisualization: Bubble Map
Bubble map of
Coronavirus
cases
www.cnn.com
Geovisualization: Bubble Map
Anatomy of Bubble Map
https://datavizcatalogue.com/methods/bubble_map.html
Geovisualization: Bubble Map
https://www.nytimes.com/interactive/2016/11/01/upshot/many-ways-to-map-election-results.html
Geovisualization: Bubble Map
Note: Overly large bubbles can overlap other bubbles and regions
on the map, so this needs to be accounted for.
Geovisualization: Dot Map
https://www.e-education.psu.edu/natureofgeoinfo/sites/www.e-education.psu.edu.natureofgeoinfo/files/image/hisp_dots.gif
Dot Density Map
http://axismaps.github.io/thematic-cartography/articles/dot_density.html
Dot Density Map
Example:
Earthquake map in north western part
of US.
Disadvantage:
Difficult to estimate numbers from the
map
most dot density maps distribute
dots randomly, so precise locations
of the phenomenon is not exact.
scattermapbox: https://plotly.com/javascript/mapbox-layers/
Geovisualization: Hexbin Map
https://www.r-graph-gallery.com/328-hexbin-m
Geovisualization: Heat Map
Heat maps are useful when you have to represent large sets of
continuous data on a map using a color spectrum (usually red-to-
blue or red-to-green).
A heat map is different from a chloropleth map in that the colors in
a heat map may not correspond to geographical boundaries.
densitymapbox: https://plotly.com/javascript/mapbox-
density-heatmaps/
Geovisualization: Connection Map
Plotly line_geo
https://datavizcatalogue.com/methods/connection_map.html
Geovisualization: Cartogram
Polulation
estimate
in 2100
http://metrocosm.com/how-to-make-
cartograms-with-animation/
Geovisualization: Cartogram
Source: https://realitycheck.wordpress.com/2006/11/01/the-india-social-cartogram-project-maps/
https://www.weforum.org/agenda/2018/09/this-fascinating-world-map-
was-drawn-based-on-country-populations/
Geovisualization: Cartogram
https://www.weforum.org/agenda/2018/09/this-fascinating-world-map-
was-drawn-based-on-country-populations/
/
Geovisualization: Cartogram
Shape Preserving:
Ex: “How much is your vote
worth” map from NY-Times.
(Nov 2008]
This map shows each state re-
sized in proportion to the
relative influence of the
individual voters who live
there. The numbers indicate
the total delegates to the
Electoral College from each
state, and how many eligible
voters a single delegate from
each state represents.
https://archive.nytimes.com/www.nytimes.com/interactive/2008/11/02/opini
on/20081102_OPCHART.html?_r=1
Noncontiguous Area Cartogram
Dorling Cartogram
Replaces shape by circles
Circles are distributed to
represent original topology
See
https://www.jasondavies.com/
maps/dorling-world/
Demers cartogram
a variation of Dorling cartogram,
but it uses rectangles instead of
circles, and attempts to retain
visual cues at the expense of
minimum distance. [Wiki]
Ex: NY Times 2012: Building a path
victory.
d3 Examples:
https://bl.ocks.org/cmgiven/9d6bc
46cf586738458c13dd2b5dadd84
https://www.nytimes.com/elections/2012/ratings/electoral-map.html
(recap) Choropleth
https://en.wikipedia.org/wiki/2020_coronavirus_pandemic_in_the_United
_States
(recap) Bubble Map
https://www.e-education.psu.edu/natureofgeoinfo/sites/www.e-education.psu.edu.natureofgeoinfo/files/image/hisp_dots.gif
Dot Density Map
http://axismaps.github.io/thematic-cartography/articles/dot_density.html
Dot Density Map
Example:
Earthquake map in north western part
of US.
Disadvantage:
Difficult to estimate numbers from the
map
most dot density maps distribute
dots randomly, so precise locations
of the phenomenon is not exact.
scattermapbox: https://plotly.com/javascript/mapbox-layers/
Geovisualization: Hexbin Map
https://www.r-graph-gallery.com/328-hexbin-m
Geovisualization: Heat Map
Heat maps are useful when you have to represent large sets of
continuous data on a map using a color spectrum (usually red-to-
blue or red-to-green).
A heat map is different from a chloropleth map in that the colors in
a heat map may not correspond to geographical boundaries.
densitymapbox: https://plotly.com/javascript/mapbox-
density-heatmaps/
Geovisualization: Connection Map
Plotly line_geo
https://datavizcatalogue.com/methods/connection_map.html
Geovisualization: Cartogram
Polulation
estimate
in 2100
http://metrocosm.com/how-to-make-
cartograms-with-animation/
Geovisualization: Cartogram
Source: https://realitycheck.wordpress.com/2006/11/01/the-india-social-cartogram-project-maps/
https://www.weforum.org/agenda/2018/09/this-fascinating-world-map-
was-drawn-based-on-country-populations/
Geovisualization: Cartogram
https://www.weforum.org/agenda/2018/09/this-fascinating-world-map-
was-drawn-based-on-country-populations/
/
Geovisualization: Cartogram
Shape Preserving:
Ex: “How much is your vote
worth” map from NY-Times.
(Nov 2008]
This map shows each state re-
sized in proportion to the
relative influence of the
individual voters who live
there. The numbers indicate
the total delegates to the
Electoral College from each
state, and how many eligible
voters a single delegate from
each state represents.
https://archive.nytimes.com/www.nytimes.com/interactive/2008/11/02/opini
on/20081102_OPCHART.html?_r=1
Noncontiguous Area Cartogram
Dorling Cartogram
Replaces shape by circles
Circles are distributed to
represent original topology
See
https://www.jasondavies.com/
maps/dorling-world/
Demers cartogram
a variation of Dorling cartogram,
but it uses rectangles instead of
circles, and attempts to retain
visual cues at the expense of
minimum distance. [Wiki]
Ex: NY Times 2012: Building a path
victory.
d3 Examples:
https://bl.ocks.org/cmgiven/9d6bc
46cf586738458c13dd2b5dadd84
https://www.nytimes.com/elections/2012/ratings/electoral-map.html
Geovisualization: Part 2
GEO-COORDINATES, GEOPROJECTIONS, GEOJSON
Geo Coordinate System
https://www.latlong.net/
Latitude, Longitude
https://www.britannica.com/science/latitude
Geo Coordinate System
https://www.latlong.net/
Latitude
Lines of Latitude
https://www.britannica.com/science/latitude
Geo Coordinate System
https://www.latlong.net/
Longitude
Latitude and Longitude
Parallels Meridians
https://mgimond.github.io/Spatial/coordinate-systems.html
Map Projections
Orange Peel Problem: Can not flatten orange without tearing, squashing or
stretching.
Flattening the Earth for a map projection, introduces distortion
shape, distance, direction, or land area
https://en.wikipedia.org/wiki/List_of_map_projections
Map Projections
Created by Flemish
cartographer Gerardus
Mercator in 1569 – a
time when Antarctica
hadn’t even been
discovered.
Mercator Projections
Distortions: Wiki
Distortions: Wiki
Wiki
Gall-Peters Map
Wiki
Gall-Peters Map
Preserves all areas: Map areas all have the correct sizes relative to
each other.
Due to James Gall (British Clergyman, 1855) and Arno Peters
(Germal Filmmaker and Journalist, 1973
Distortions:
Area may be right but shapes
are not.
Winkel-Tripel Map
Proposed by German
cartographer Oswald Winkel in
1921.
Attempts to minimize three major
types of distortion – area,
direction, and distance. (Triple or
Tripel in Germany)
National Geographic Society
adopted the Winkel tripel map in
1998. Many US schools have
followed suit.
Winket-Tripel Map
Distortion
Does not preserve angle.
The map doesn’t preserve angles,
so can not replace Mercator for
navigation purposes.
Albers Map
Distortions:
In general: scale and shape
are not preserved
Principles of Map Projections
Conic: Conic projections project the sphere onto a cone, and then unroll the
cone onto the plane.
Cylindrical: Cylindrical projections project the sphere onto a containing
cylinder, and then unroll the cylinder onto the plane. Pseudocylindrical
projections are a generalization of cylindrical projections.
Azimuthal or Planar Projection: rays radiating from a point intercept the globe
onto a plane at various angles. Depending on the location of the ray originating
point we get different projection:
Gnomonic: The ray originating point is at the center of the globe.
Stereographic: The ray originating point is at the pole.
Orthographic: The ray originating point is infinitely far away. So the orthographic
projection maps each point on the earth to the closest point on the plane.
Composite: Composite consist of several projections that are composed into a
single display.
Cylindrical Map Projections
http://geokov.com/education/map-projection.aspx
Cylindrical map projections
ex: Mercator
Used for wall maps even though it
inflates the Arctic.
Used by navigators and even
Google Maps use the Mercator
projections
it’s all because of the unique
properties of cylinders and north
always facing up.
Cylindrical Projection
Cylindrical Map Projections
http://geokov.com/education/map-projection.aspx
Conic Map Projections
http://geokov.com/education/map-projection.aspx
Conic Map projection
See Also:
https://gisgeography.com/azimuthal-projection-
https://mgimond.github.io/Spatial/coordinate-systems.html
orthographic-stereographic-gnomonic/
Planar Projections
Orthographic
The resulting map from this
projection looks like to seeing
Earth from deep space.
All the projection lines are
orthogonal to the projection
plane.
Distortions:
There is great distortion
Orthographic projection
towards the borders of the
map.
https://gisgeography.com/azimuthal-projection-orthographic-
stereographic-gnomonic/
Planar Projections
Perspective
They can be visualized as projection of points on the sphere to the
plane by shining rays of light from a light source (or point of
perspective).
Light source can be emitted from different positions giving different
azimuthal map projections.
ex: Gnomonic:
Planar Projections
https://gisgeography.com/azimuthal-projection-orthographic-stereographic-gnomonic/
Planar Projections
Perspective: Stereographic
The light source may be through of
as if placed at the opposite end
where the tangent plane touches
the reference globe.
This map projection is also
commonly used for navigation
maps because of it preserves
shapes (conformal).
it’s been used to map large
continents or oceans including the Stereographic projection
Arctic and Antarctic.
http://geokov.com/education/map-projection.aspx
GeoJSON
Wiki
GeoJSON
Contents:
Geographical Features:
points (addresses and locations),
line strings (streets, highways and boundaries),
polygons (countries, provinces, tracts of land), and
multi-part collections of these types.
Non-Geographical Features:
identification, …
non-standard: Mobile coverage, navigation app service coverage etc..
GeoJSON: Features
Features are combination of geometry and properties.
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [102.0, 0.5]
},
"properties": {
"name": "null island“
}
}
GeoJSON: Position
Wiki
GeoJSON: Geometry
Point: Polygon:
{ {
"type": "Point", "type": "Polygon",
"coordinates": [30, 10] "coordinates": [
} [[30, 10], [40, 40], [20, 40], [10, 20], [30, 10]]
LineString: ]
{ }
"type": "LineString",
"coordinates": [ {
[30, 10], [10, 30], [40, 40] "type": "Polygon",
] "coordinates": [
} [[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]],
[[20, 30], [35, 35], [30, 20], [20, 30]]
]
}
GeoJSON : Geometry
MultiPoint: MultiPolygon:
{ {
"type": "MultiPoint", "type": "MultiPolygon",
"coordinates": [ "coordinates": [
[10, 40], [40, 30], [20, 20], [30, 10] [
] [[30, 20], [45, 40], [10, 40], [30, 20]]
} ],
MultiLineString: [
{ [[15, 5], [40, 10], [10, 20], [5, 10], [15, 5]]
"type": "MultiLineString", ]
"coordinates": [ ]
[[10, 10], [20, 20], [10, 40]], }
[[40, 40], [30, 30], [40, 20], [30, 10]]
]
}
GeoJSON: Features
Features are combination of geometry and properties.
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [102.0, 0.5]
},
"properties": {
"name": "null island“
}
}
GeoJSON: Features
Features are combination of geometry and properties.
{
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [{
"type": "Point",
"coordinates": [0, 0]
}, {
"type": "LineString",
"coordinates": [[0, 0], [1, 0]]
}]
},…
GeoJSON: Features
Features are combination of geometry and properties.
{
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [{
"type": "Point",
"coordinates": [0, 0]
}, {
"type": "LineString",
"coordinates": [[0, 0], [1, 0]]
}]
},…
GeoJSON example
FeatureCollection Array of Features, is the most common thing you’ll
see at the top level of GeoJSON files in the field.
{ "type": "FeatureCollection",
"features": [
{ "type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [102.0, 0.5]
},
"properties": {
"prop0": "value0"
}
}, …
GeoJSON example
}
}, …
]} Features are combination of geometry and properties. Position: [longitude, latitude[, elevation]]
Sample DataSet
https://catalog.data.gov/dataset?res_format=GeoJSON
https://ec.europa.eu/eurostat/web/gisco/geodata/reference-
data/administrative-units-statistical-units/countries
Plotly Express Projections
See: https://plotly.com/python/map-configuration/#map-projections
Network/Graph, and
Hierarchy Visualization
Graph Layout
Layouts
Graph Layout
Node-link layout
Chord layout for Network flow
Force Simulation Layout
Hierarchy Layout
a number of hierarchy layouts for dealing with hierarchical (or tree)
data
ex: tree, cluster, treemap, pack and partition layouts
Graph/Network Visualization
Problem
Lay them out on your view window
assign position to vertices/nodes.
Show the vertices as a circle
links as lines.
Newton’s Law of Motion: The acceleration of a body is directly proportional to the acting
force F and inversely proportional to its mass m, i.e.
𝑎= or 𝑚𝑎 = 𝐹
Force depends on time: 𝐹 = 𝐹(𝑡)
( )
𝑎= ,𝑣 = .
Integrating once we get
𝑣 𝑡 = 𝑣 + ∫ 𝑎 𝜏 𝑑𝜏
𝑣 is velocity time t=0
we also get
𝑥 𝑡 = 𝑥 + ∫ 𝑣 𝜏 𝑑𝜏
𝑥 is the initial coordinate of the body
https://www.math24.net/newtons-second-law-motion/
Force Simulation: Algorithm
https://www.math24.net/newtons-second-law-motion/
User Defined Forces
A centering force – push all nodes towards the center of the graph
A repelling force – push all nodes away from each other, similar to how
charged particles repel each other
A collision force – make nodes bounce off each other upon contact
like two snooker balls.
A link force – pull nodes that are linked towards each other as if there
was a spring connecting them
A constraining force – keep nodes bound inside a particular area, such
as a box
A positioning force – pull nodes towards certain points. You could use
this to split nodes into several categories
A gravity force – pull all nodes towards the bottom of the screen with a
force proportional to their size
https://tomroth.com.au/fdg-custom/
Force
Simulation
Layout
Demo
Radial Network Layout
Chord Diagram
Used to visualize
Weighted relationships between entities (nodes).
Particularly relationship that can be shown in matrix
links (or flows) between nodes, where each link has a numeric value.
For example:
they can show migration flows between countries.
Nodes are arranged radially along a circle
The relationships between nodes connected to each other through
the use of ribbons (arcs).
Values are assigned to each connection, which is represented
proportionally by the size of each arc.
Color can be used to group the data into different categories, which
aids in making comparisons and distinguishing groups.
Chord or Ribbon
See: https://www.data-to-viz.com/graph/chord.html
Example: Global Flow of People
Source: https://www.data-to-
viz.com/story/AdjacencyMatrix.html
Also see
https://guyabel.com/
Bipartite Example
https://github.com/mattflor/chorddiag
Chord Diagram: General Guideline
https://datavizcatalogue.com/methods/sankey_diagram.html
Sankey Diagram
https://www.data-to-viz.com/graph/sankey.html
Example: Migration
Energy flow:
Source to
Sink
Hierarchy Visualization
Hierarchy
Wiki
Tree Layout
Trace = {
type: "treemap",
labels: [
"Eve", "Cain", "Seth", "Enos",
"Noam", "Abel", "Awan", "Enoch",
"Azura“
],
parents: [
"", "Eve", "Eve", "Seth", "Seth", "Eve",
"Eve", "Awan", "Eve"
]
}
https://plotly.com/javascript/treemaps/
Circle packing
https://bl.ocks.org/nitaku/8de69327a7587770f7efd70f6054d5f6
Circle packing
Pros Cons
More pleasing appearance It's not as space-efficient as a
compared to tree map Treemap, as there's a lot of empty
space within the circles.
Circle Packing reveals hierarchal
structure better than a Treemap. Area estimation from circle map is
not as good as rectangular area
estimation.
Sunburst Chart
https://plotly.com/javascript/sunburst-charts/