Look at this map.... Did you notice that there changes along the x axis? Charles Joseph Minard’s visualization of Napoleon’s Russian campaign of 1812, (Tufte, 1983)
It is a type of thematic map, with the main purpose of represent, with the purpose of representing movement. For some author (Dodge et al., 2008), is a kind of hybrid map: a base map with flow diagram.
Common characteristics in visual variables:
# OD Matrix, available on https://plotly.com/python/lines-on-maps/
print('OD Dataset size {}'.format(df_flight_paths.shape))
df_flight_paths.head()
OD Dataset size (178, 8)
start_lat | start_lon | end_lat | end_lon | airline | airport1 | airport2 | cnt | |
---|---|---|---|---|---|---|---|---|
0 | 32.895951 | -97.037200 | 35.040222 | -106.609194 | AA | DFW | ABQ | 444 |
1 | 41.979595 | -87.904464 | 30.194533 | -97.669872 | AA | ORD | AUS | 166 |
2 | 32.895951 | -97.037200 | 41.938874 | -72.683228 | AA | DFW | BDL | 162 |
3 | 18.439417 | -66.001833 | 41.938874 | -72.683228 | AA | SJU | BDL | 56 |
4 | 32.895951 | -97.037200 | 33.562943 | -86.753550 | AA | DFW | BHM | 168 |
fig.update_layout(title_text = 'Feb. 2011 American Airline flight paths<br>(Hover for airport names)',
showlegend = False,
geo = dict(scope = 'north america',
projection_type = 'azimuthal equal area',
showland = True,
landcolor = 'rgb(243, 243, 243)',
countrycolor = 'rgb(204, 204, 204)',
),
)
fig.show()
fig = plt.figure(figsize=(15,5))
gs = gridspec.GridSpec(nrows=1, ncols=3)
# Varying density along a streamline
ax0 = fig.add_subplot(gs[0, 0])
ax0.streamplot(X, Y, U, V, density=[0.5, 1])
ax0.set_title('Varying Density')
# Varying line width along a streamline
ax1 = fig.add_subplot(gs[0, 1])
lw = 5*speed / speed.max()
ax1.streamplot(X, Y, U, V, density=0.6, color='k', linewidth=lw)
ax1.set_title('Varying Line Width')
# With a obstacle "Masking"
ax2 = fig.add_subplot(gs[0,2])
ax2.streamplot(X, Y, U, V, color='r')
ax2.set_title('Streamplot with Masking')
ax2.imshow(~mask, extent=(-w, w, -w, w), alpha=0.5,
interpolation='nearest', cmap='gray', aspect='auto')
plt.show()
based on Jenny et al., 2018 and Andrienko et al., 2008
Geometry design tips, available on Jenny et al., 2018)
Groynes in fluvial erosion, image avaiable on Buczyńska et al., 2018
%%html
<iframe src="https://aamontalvo.github.io/MagangueEsp2/index.html" width="900" height="800"></iframe>