Graph Analysis

x

In[]:=
provinces=
China
COUNTRY

regions

Out[]=

Anhui, China
,
Beijing, China
,
Chongqing, China
,
Fujian, China
,
Gansu, China
,
Guangdong, China
,
Guangxi, China
,
Guizhou, China
,
Hainan, China
,
Hebei, China
,
Heilongjiang, China
,
Henan, China
,
Hubei, China
,
Hunan, China
,
Jiangsu, China
,
Jiangxi, China
,
Jilin, China
,
Liaoning, China
,
Neimenggu, China
,
Ningxia, China
,
Qinghai, China
,
Shaanxi, China
,
Shandong, China
,
Shanghai, China
,
Shanxi, China
,
Sichuan, China
,
Tianjin, China
,
Xinjiang, China
,
Xizang, China
,
Yunnan, China
,
Zhejiang, China

In[]:=
In[]:=
coords=Map#Reverse#
capital city

coordinates
&,provinces;
In[]:=
Graph[g,VertexCoordinatescoords,VertexLabels"Name"]
Out[]=
In[]:=
GeoGraphics​​{GeoStyling[{EdgeForm[White],FaceForm[Orange]}],Map[Polygon,provinces]},​​MapLineReverseFirst[#]
capital city

coordinates
,ReverseLast[#]
capital city

coordinates
&,g​​,​​GeoBackgroundNone
Out[]=

x

In[]:=
Get["https://raw.githubusercontent.com/szhorvat/IGraphM/master/IGInstaller.m"]​​
The currently installed versions of IGraph/M are: {}
Installing IGraph/M is complete: PacletObject
Name: IGraphM
Version: 0.3.113
.
It can now be loaded using the command
<<IGraphM`
In[]:=
<<"IGraphM`"
Out[]=
IGraph/M 0.3.113 (February 9, 2020)
Evaluate
IGDocumentation[]
to get started.
In[]:=
gg=Graph[g]
Out[]=
In[]:=
ts=IGSIRProcess[gg,{2,1}]
Out[]=
TimeSeries
Time: 0. to 3.58
Data points: 60

In[]:=
ListLinePlot[ts,PlotLegendsts["ComponentNames"]]
Out[]=
0.5
1.0
1.5
2.0
2.5
3.0
3.5
5
10
15
20
25
30
S
I
R
In[]:=
ListLinePlot[ts["PathComponent",2],​​AxesLabel{"time","infected"},PlotStyleColorData[97][2]]
Out[]=