Live Programming and Computing with Python, R, Sage, Octave, Maxima, Singular, Gap, GP, HTML & Macaulay2

User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#31

Output HTML figure with Plotly (See more options):

  1. from plotly.offline import plot
  2. import plotly.graph_objects as go
  3.  
  4. trace0 = go.Scatter(
  5.     x=[1, 2, 3, 4],
  6.     y=[10, 15, 13, 17]
  7. )
  8. trace1 = go.Scatter(
  9.     x=[1, 2, 3, 4],
  10.     y=[16, 5, 11, 9]
  11. )
  12. data = [trace0, trace1]
  13.  
  14. plot(data)


  1. import plotly.graph_objects as go
  2. import numpy as np
  3. from plotly.offline import plot
  4. np.random.seed(1)
  5.  
  6. N = 100
  7. x = np.random.rand(N)
  8. y = np.random.rand(N)
  9. colors = np.random.rand(N)
  10. sz = np.random.rand(N) * 30
  11.  
  12. fig = go.Figure()
  13. fig.add_trace(go.Scatter(
  14.     x=x,
  15.     y=y,
  16.     mode="markers",
  17.     marker=go.scatter.Marker(
  18.         size=sz,
  19.         color=colors,
  20.         opacity=0.6,
  21.         colorscale="Viridis"
  22.     )
  23. ))
  24.  
  25. plot(fig)

Attachments
plotly_fig1.png
plotly_fig2.png
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
Joseph Bundala
Expert Member
Reactions: 23
Posts: 55
Joined: 7 years ago
Has thanked: 14 times
Been thanked: 28 times
Contact:

#32

Massive development in this forum, congrats guys.
1
1 Image
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#33

The code below taken from here intends to test xarray, netCDF4, and how to project heat (outgoing long wave radiation) data on a spherical map. Check the netCDF4 datasets from here (details are ignored). The resulting output is an animated sphere.

This code uses cartopy instead of Basemap

In this code, we have imported cartopy.feature and used its COASTLINE and BORDERS attributes to retrieve the coastline and country borders, respectively. We have also made the necessary changes in the get_coastline_traces and get_country_traces functions to use these attributes.

  1. import plotly
  2. print(plotly.__version__)
  3.  
  4. import chart_studio.plotly as py
  5. from plotly.graph_objs import *
  6. from plotly.offline import plot
  7.  
  8. import numpy as np          
  9. import cartopy.crs as ccrs
  10. import cartopy.feature as cfeature
  11. import netCDF4 as nc
  12. from netCDF4 import *
  13. import urllib.request
  14.  
  15. urllib.request.urlretrieve("https://www.dropbox.com/s/h2tbnnf972i9ai8/compday.KsNOdsJTz1.nc?dl=1", "compday.KsNOdsJTz1.nc")
  16.  
  17. with nc.Dataset("./compday.KsNOdsJTz1.nc", 'r') as f:
  18.     lon = f.variables['lon'][::]
  19.     lat = f.variables['lat'][::-1]
  20.     olr = f.variables['olr'][0,::-1,:]
  21.  
  22. tmp_lon = np.array([lon[n]-360 if l>=180 else lon[n]
  23.                    for n,l in enumerate(lon)])
  24.  
  25. i_east, = np.where(tmp_lon>=0)
  26. i_west, = np.where(tmp_lon<0)  
  27. lon = np.hstack((tmp_lon[i_west], tmp_lon[i_east]))
  28.  
  29. olr_ground = np.array(olr)
  30. olr = np.hstack((olr_ground[:,i_west], olr_ground[:,i_east]))
  31.  
  32. trace1 = Contour(
  33.     z=olr,
  34.     x=lon,
  35.     y=lat,
  36.     colorscale= [[0.0, '#313695'], [0.07692307692307693, '#3a67af'], [0.15384615384615385, '#5994c5'], [0.23076923076923078, '#84bbd8'], [0.3076923076923077, '#afdbea'], [0.38461538461538464, '#d8eff5'], [0.46153846153846156, '#d6ffe1'], [0.5384615384615384, '#fef4ac'], [0.6153846153846154, '#fed987'], [0.6923076923076923, '#fdb264'], [0.7692307692307693, '#f78249'], [0.8461538461538461, '#e75435'], [0.9230769230769231, '#cc2727'], [1.0, '#a50026']],
  37.     zauto=False,
  38.     zmin=-20,
  39.     zmax=20,
  40.  
  41.     colorbar= {
  42.         "borderwidth": 0,
  43.         "outlinewidth": 0,
  44.         "thickness": 15,
  45.         "tickfont": {"size": 14},
  46.         "title": "W/m²"
  47.     },
  48.  
  49.     contours= {
  50.         "end": 20,
  51.         "showlines": False,
  52.         "size": 2,
  53.         "start": -20
  54.     }
  55. )    
  56.  
  57. m = ccrs.PlateCarree()
  58.  
  59. def make_scatter(x,y):
  60.     return Scatter(
  61.         x=x,
  62.         y=y,
  63.         mode='lines',
  64.         line=Line(color="black"),
  65.         name=' '
  66.     )
  67.  
  68. def polygons_to_traces(poly_paths, N_poly):
  69.     data = dict(
  70.         x=[],
  71.         y=[],
  72.         mode='lines',
  73.         line=Line(color="black"),
  74.         name=' '
  75.     )
  76.  
  77.     for i_poly in range(N_poly):
  78.         poly_path = poly_paths[i_poly]
  79.  
  80.         coords_cc = np.array(
  81.             [(vertex[0], vertex[1])
  82.              for (vertex, code) in poly_path.iter_segments(simplify=False)]
  83.         )
  84.  
  85.         lon_cc, lat_cc = poly_path.boundary.xy
  86.  
  87.         data['x'] = data['x'] + lon_cc.tolist() + [np.nan]
  88.         data['y'] = data['y'] + lat_cc.tolist() + [np.nan]
  89.  
  90.     return [data]
  91.  
  92. def get_coastline_traces():
  93.     poly_paths = cfeature.COASTLINE.geometries()
  94.     N_poly = 1  # only single coastline path
  95.     return polygons_to_traces(poly_paths, N_poly)
  96.  
  97. def get_country_traces():
  98.     poly_paths = cfeature.BORDERS.geometries()
  99.     N_poly = len(poly_paths)
  100.     return polygons_to_traces(poly_paths, N_poly)
  101.  
  102. traces_cc = get_coastline_traces() + get_country_traces()
  103.  
  104. data = Data([trace1] + traces_cc)
  105.  
  106. title = u"Outgoing Longwave Radiation Anomalies<br>"
  107. anno_text = ""
  108.  
  109. axis_style = dict(
  110.     zeroline=False,
  111.     showline=False,
  112.     showgrid=False,
  113.     ticks='',
  114.     showticklabels=False,
  115. )
  116.  
  117. layout = Layout(
  118.     title=title,
  119.     showlegend=False,
  120.     hovermode="closest",        
  121.     xaxis=XAxis(
  122.         axis_style,
  123.         range=[lon[0],lon[-1]]  
  124.     ),
  125.     yaxis=YAxis(
  126.         axis_style,
  127.     ),
  128.     annotations=Annotations([
  129.         Annotation(
  130.             text=anno_text,
  131.             xref='paper',
  132.             yref='paper',
  133.             x=0,
  134.             y=1,
  135.             yanchor='bottom',
  136.             showarrow=False
  137.         )
  138.     ]),
  139.     autosize=False,
  140.     width=1200,
  141.     height=800,
  142. )
  143.  
  144. fig = Figure(data=data, layout=layout)
  145. plot(fig, filename="NCEP_OLR.html")


This code uses Basemap


  1. import chart_studio.plotly  as py
  2. from plotly.offline import plot
  3. import numpy as np          
  4. from scipy.io import netcdf  
  5. from mpl_toolkits.basemap import Basemap
  6. import warnings
  7.  
  8. import netCDF4 as nc
  9. from netCDF4 import *
  10. import urllib.request
  11. #import xarray as xr
  12.  
  13. urllib.request.urlretrieve("https://www.dropbox.com/s/h2tbnnf972i9ai8/compday.KsNOdsJTz1.nc?dl=1", "compday.KsNOdsJTz1.nc")
  14.  
  15. #Read data from a netCDF file:
  16. with warnings.catch_warnings():
  17.     warnings.simplefilter("ignore")
  18.     #with xr.open_dataset('./olr-daily_v01r02-preliminary_20200101_20201231.nc') as f:
  19.     with nc.Dataset('./compday.KsNOdsJTz1.nc', 'r') as f:
  20.         lon = f.variables['lon'][::]       # copy longitude as list
  21.         lat = f.variables['lat'][::-1]     # invert the latitude vector -> South to North
  22.         olr = f.variables['olr'][0,::-1,:] # olr= outgoing longwave radiation
  23.     #f.fp  
  24.  
  25. # Shift 'lon' from [0,360] to [-180,180]
  26. tmp_lon = np.array([lon[n]-360 if l>=180 else lon[n]
  27.                    for n,l in enumerate(lon)])  # => [0,180]U[-180,2.5]
  28.  
  29. i_east, = np.where(tmp_lon>=0)  # indices of east lon
  30. i_west, = np.where(tmp_lon<0)   # indices of west lon
  31. lon = np.hstack((tmp_lon[i_west], tmp_lon[i_east]))  # stack the 2 halves
  32.  
  33. # Correspondingly, shift the olr array
  34. olr_ground = np.array(olr)
  35. olr = np.hstack((olr_ground[:,i_west], olr_ground[:,i_east]))
  36.  
  37. #The lon and lat are the geographical coordinates on a planar map, and the array olr
  38. #represents the scalar field defined on this map.
  39. from numpy import pi, sin, cos
  40.  
  41. def degree2radians(degree):
  42.     #convert degrees to radians
  43.     return degree*pi/180
  44.  
  45. def mapping_map_to_sphere(lon, lat, radius=1):
  46.     #this function maps the points of coords (lon, lat) to points onto the  sphere of radius radius
  47.  
  48.     lon=np.array(lon, dtype=np.float64)
  49.     lat=np.array(lat, dtype=np.float64)
  50.     lon=degree2radians(lon)
  51.     lat=degree2radians(lat)
  52.     xs=radius*cos(lon)*cos(lat)
  53.     ys=radius*sin(lon)*cos(lat)
  54.     zs=radius*sin(lat)
  55.     return xs, ys, zs
  56.  
  57. #The next cell functions are modified versions of the functions with the
  58. #same name from a notebook by the Plotly user @Dreamshot, https://plot.ly/~Dreamshot/9152.
  59. #They extract the lon and lat coordinates of the points on the coastlines and country boundaries:
  60.  
  61. # Make shortcut to Basemap object,
  62. # not specifying projection type for this example
  63. m = Basemap()
  64.  
  65.  
  66. # Functions converting coastline/country polygons to lon/lat traces
  67. def polygons_to_traces(poly_paths, N_poly):
  68.     '''
  69.   pos arg 1. (poly_paths): paths to polygons
  70.   pos arg 2. (N_poly): number of polygon to convert
  71.   '''
  72.     # init. plotting list
  73.     lons=[]
  74.     lats=[]
  75.  
  76.     for i_poly in range(N_poly):
  77.         poly_path = poly_paths[i_poly]
  78.  
  79.         # get the Basemap coordinates of each segment
  80.         coords_cc = np.array(
  81.             [(vertex[0],vertex[1])
  82.              for (vertex,code) in poly_path.iter_segments(simplify=False)]
  83.         )
  84.  
  85.         # convert coordinates to lon/lat by 'inverting' the Basemap projection
  86.         lon_cc, lat_cc = m(coords_cc[:,0],coords_cc[:,1], inverse=True)
  87.  
  88.  
  89.         lats.extend(lat_cc.tolist()+[None])
  90.         lons.extend(lon_cc.tolist()+[None])
  91.  
  92.  
  93.     return lons, lats
  94.  
  95. # Function generating coastline lon/lat
  96. def get_coastline_traces():
  97.     poly_paths = m.drawcoastlines().get_paths() # coastline polygon paths
  98.     N_poly = 91  # use only the 91st biggest coastlines (i.e. no rivers)
  99.     cc_lons, cc_lats= polygons_to_traces(poly_paths, N_poly)
  100.     return cc_lons, cc_lats
  101.  
  102. # Function generating country lon/lat
  103. def get_country_traces():
  104.     poly_paths = m.drawcountries().get_paths() # country polygon paths
  105.     N_poly = len(poly_paths)  # use all countries
  106.     country_lons, country_lats= polygons_to_traces(poly_paths, N_poly)
  107.     return country_lons, country_lats
  108.  
  109. # Get list of of coastline, country, and state lon/lat
  110.  
  111. cc_lons, cc_lats=get_coastline_traces()
  112. country_lons, country_lats=get_country_traces()
  113.  
  114. #concatenate the lon/lat for coastlines and country boundaries:
  115. lons=cc_lons+[None]+country_lons
  116. lats=cc_lats+[None]+country_lats
  117.  
  118. #Map them onto the sphere:
  119.  
  120. xs, ys, zs=mapping_map_to_sphere(lons, lats, radius=1.01)# here the radius is slightly greater than 1
  121.                                                          #to ensure lines visibility; otherwise (with radius=1)
  122.                                                          # some lines are hidden by contours colors
  123.  
  124. boundaries=dict(type='scatter3d',
  125.                x=xs,
  126.                y=ys,
  127.                z=zs,
  128.                mode='lines',
  129.                line=dict(color='black', width=1)
  130.               )
  131.  
  132.  
  133. #Define a Plotly colorscale:
  134.  
  135. colorscale=[[0.0, '#313695'],
  136.  [0.07692307692307693, '#3a67af'],
  137.  [0.15384615384615385, '#5994c5'],
  138.  [0.23076923076923078, '#84bbd8'],
  139.  [0.3076923076923077, '#afdbea'],
  140.  [0.38461538461538464, '#d8eff5'],
  141.  [0.46153846153846156, '#d6ffe1'],
  142.  [0.5384615384615384, '#fef4ac'],
  143.  [0.6153846153846154, '#fed987'],
  144.  [0.6923076923076923, '#fdb264'],
  145.  [0.7692307692307693, '#f78249'],
  146.  [0.8461538461538461, '#e75435'],
  147.  [0.9230769230769231, '#cc2727'],
  148.  [1.0, '#a50026']]
  149.  
  150. #In order to plot the scalar field as a heatmap onto the sphere,
  151. #we define the sphere as a surface colored according to the olr values.
  152. #To ensure color continuity we extend the lon list with [180]
  153. #(its last value was lon[-1]=177.5). In this way we can identify lon=-180 with lon=180.
  154.  
  155. clons=np.array(lon.tolist()+[180], dtype=np.float64)
  156. clats=np.array(lat, dtype=np.float64)
  157. clons, clats=np.meshgrid(clons, clats)
  158.  
  159. #Map the meshgrids clons, clats onto the sphere:
  160.  
  161. XS, YS, ZS=mapping_map_to_sphere(clons, clats)
  162.  
  163. #The sphere points are colormapped according to the values of the numpy
  164. #array, OLR, that extends the array olr, to ensure color continuity:
  165.  
  166. nrows, ncolumns=clons.shape
  167. OLR=np.zeros(clons.shape, dtype=np.float64)
  168. OLR[:, :ncolumns-1]=np.copy(np.array(olr,  dtype=np.float64))
  169. OLR[:, ncolumns-1]=np.copy(olr[:, 0])
  170.  
  171. #Define the text to be displayed on hover:
  172.  
  173. text=[['lon: '+'{:.2f}'.format(clons[i,j])+'<br>lat: '+'{:.2f}'.format(clats[i, j])+
  174.         '<br>W: '+'{:.2f}'.format(OLR[i][j]) for j in range(ncolumns)] for i in range(nrows)]
  175.  
  176. sphere=dict(type='surface',
  177.             x=XS,
  178.             y=YS,
  179.             z=ZS,
  180.             colorscale=colorscale,
  181.             surfacecolor=OLR,
  182.             cmin=-20,
  183.             cmax=20,
  184.             colorbar=dict(thickness=20, len=0.75, ticklen=4, title= 'W/m²'),
  185.             text=text,
  186.             hoverinfo='text')
  187.  
  188. #Set the plot layout:
  189.  
  190. noaxis=dict(showbackground=False,
  191.             showgrid=False,
  192.             showline=False,
  193.             showticklabels=False,
  194.             ticks='',
  195.             title='',
  196.             zeroline=False)
  197.  
  198. layout3d=dict(title='Outgoing Longwave Radiation Anomalies<br>Mock Projection',
  199.               font=dict(family='Balto', size=14),
  200.               width=800,
  201.               height=800,
  202.               scene=dict(xaxis=noaxis,
  203.                          yaxis=noaxis,
  204.                          zaxis=noaxis,
  205.                          aspectratio=dict(x=1,
  206.                                           y=1,
  207.                                           z=1),
  208.                          camera=dict(eye=dict(x=1.15,
  209.                                      y=1.15,
  210.                                      z=1.15)
  211.                                     )
  212.             ),
  213.             paper_bgcolor='rgba(235,235,235, 0.9)'  
  214.            )
  215.  
  216. fig=dict(data=[sphere, boundaries], layout=layout3d)
  217. #py.sign_in('empet', 'api_key')
  218. #py.iplot(fig, filename='radiation-map2sphere')
  219. plot(fig, filename='radiation-map2sphere')

Reproduced using the original data:

Image
Attachments
Longwave_radiation.png
(244.45 KiB) Not downloaded yet
Longwave_radiation.png
(244.45 KiB) Not downloaded yet
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#34

This code is taken from here. Test Plotly by running it directly from our forum, go here.

  1. # Get this figure: fig = py.get_figure("https://plotly.com/~jackp/8612/")
  2. # Get this figure's data: data = py.get_figure("https://plotly.com/~jackp/8612/").get_data()
  3. # Add data to this figure: py.plot(Data([Scatter(x=[1, 2], y=[2, 3])]), filename ="d3-globe", fileopt="extend")
  4.  
  5. # Get figure documentation: https://plotly.com/python/get-requests/
  6. # Add data documentation: https://plotly.com/python/file-options/
  7.  
  8. # If you're using unicode in your file, you may need to specify the encoding.
  9. # You can reproduce this figure in Python with the following code!
  10.  
  11. # Learn about API authentication here: https://plotly.com/python/getting-started
  12. # Find your api_key here: https://plotly.com/settings/api
  13.  
  14. import chart_studio.plotly as py
  15. from plotly.graph_objs import *
  16. from plotly.offline import plot
  17. #py.sign_in('TSSFL', 'VIrC8tjxOn2nwujbiwrk')
  18. trace1 = {
  19.   "line": {
  20.     "color": "rgb(213,62,79)",
  21.     "width": 2
  22.   },
  23.   "mode": "lines",
  24.   "type": "scattergeo",
  25.   "lat": [28.88868792, 28.68086614, 28.06371535, 27.05598738, 25.68830153, 24.00221423, 22.04895641, 19.8878768, 17.58463872, 15.2092249, 12.83381107, 10.530573, 8.36949339, 6.416235563, 4.730148269, 3.362462415, 2.354734444, 1.737583661, 1.529761881, 1.737583661, 2.354734444, 3.362462415, 4.730148269, 6.416235563, 8.36949339, 10.530573, 12.83381107, 15.2092249, 17.58463872, 19.8878768, 22.04895641, 24.00221423, 25.68830153, 27.05598738, 28.06371535, 28.68086614, 28.88868792, 28.68086614, 28.06371535, 27.05598738, 25.68830153, 24.00221423, 22.04895641, 19.8878768, 17.58463872, 15.2092249, 12.83381107, 10.530573, 8.36949339, 6.416235563, 4.730148269, 3.362462415, 2.354734444, 1.737583661, 1.529761881, 1.737583661, 2.354734444, 3.362462415, 4.730148269, 6.416235563, 8.36949339, 10.530573, 12.83381107, 15.2092249, 17.58463872, 19.8878768, 22.04895641, 24.00221423, 25.68830153, 27.05598738, 28.06371535, 28.68086614, 28.88868792, 28.68086614, 28.06371535, 27.05598738, 25.68830153, 24.00221423, 22.04895641, 19.8878768, 17.58463872, 15.2092249, 12.83381107, 10.530573, 8.36949339, 6.416235563, 4.730148269, 3.362462415, 2.354734444, 1.737583661, 1.529761881, 1.737583661, 2.354734444, 3.362462415, 4.730148269, 6.416235563, 8.36949339, 10.530573, 12.83381107, 15.2092249, 17.58463872, 19.8878768, 22.04895641, 24.00221423, 25.68830153, 27.05598738, 28.06371535, 28.68086614, 28.88868792, 28.68086614, 28.06371535, 27.05598738, 25.68830153, 24.00221423, 22.04895641, 19.8878768, 17.58463872, 15.2092249, 12.83381107, 10.530573, 8.36949339, 6.416235563, 4.730148269, 3.362462415, 2.354734444, 1.737583661, 1.529761881, 1.737583661, 2.354734444, 3.362462415, 4.730148269, 6.416235563, 8.36949339, 10.530573, 12.83381107, 15.2092249, 17.58463872, 19.8878768, 22.04895641, 24.00221423, 25.68830153, 27.05598738, 28.06371535, 28.68086614, 28.88868792],
  26.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  27. }
  28. trace2 = {
  29.   "line": {
  30.     "color": "rgb(244,109,67)",
  31.     "width": 2
  32.   },
  33.   "mode": "lines",
  34.   "type": "scattergeo",
  35.   "lat": [35.66353499, 35.40450219, 34.63527438, 33.37922416, 31.67451596, 29.572946500000004, 27.138370899999998, 24.44476249, 21.57396522, 18.6132068, 15.65244838, 12.78165111, 10.088042699999999, 7.653467094, 5.551897632, 3.84718944, 2.591139213, 1.8219114019999998, 1.562878605, 1.8219114019999998, 2.591139213, 3.84718944, 5.551897632, 7.653467094, 10.088042699999999, 12.78165111, 15.65244838, 18.6132068, 21.57396522, 24.44476249, 27.138370899999998, 29.572946500000004, 31.67451596, 33.37922416, 34.63527438, 35.40450219, 35.66353499, 35.40450219, 34.63527438, 33.37922416, 31.67451596, 29.572946500000004, 27.138370899999998, 24.44476249, 21.57396522, 18.6132068, 15.65244838, 12.78165111, 10.088042699999999, 7.653467094, 5.551897632, 3.84718944, 2.591139213, 1.8219114019999998, 1.562878605, 1.8219114019999998, 2.591139213, 3.84718944, 5.551897632, 7.653467094, 10.088042699999999, 12.78165111, 15.65244838, 18.6132068, 21.57396522, 24.44476249, 27.138370899999998, 29.572946500000004, 31.67451596, 33.37922416, 34.63527438, 35.40450219, 35.66353499, 35.40450219, 34.63527438, 33.37922416, 31.67451596, 29.572946500000004, 27.138370899999998, 24.44476249, 21.57396522, 18.6132068, 15.65244838, 12.78165111, 10.088042699999999, 7.653467094, 5.551897632, 3.84718944, 2.591139213, 1.8219114019999998, 1.562878605, 1.8219114019999998, 2.591139213, 3.84718944, 5.551897632, 7.653467094, 10.088042699999999, 12.78165111, 15.65244838, 18.6132068, 21.57396522, 24.44476249, 27.138370899999998, 29.572946500000004, 31.67451596, 33.37922416, 34.63527438, 35.40450219, 35.66353499, 35.40450219, 34.63527438, 33.37922416, 31.67451596, 29.572946500000004, 27.138370899999998, 24.44476249, 21.57396522, 18.6132068, 15.65244838, 12.78165111, 10.088042699999999, 7.653467094, 5.551897632, 3.84718944, 2.591139213, 1.8219114019999998, 1.562878605, 1.8219114019999998, 2.591139213, 3.84718944, 5.551897632, 7.653467094, 10.088042699999999, 12.78165111, 15.65244838, 18.6132068, 21.57396522, 24.44476249, 27.138370899999998, 29.572946500000004, 31.67451596, 33.37922416, 34.63527438, 35.40450219, 35.66353499],
  36.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  37. }
  38. trace3 = {
  39.   "line": {
  40.     "color": "rgb(253,174,97)",
  41.     "width": 2
  42.   },
  43.   "mode": "lines",
  44.   "type": "scattergeo",
  45.   "lat": [42.17084108, 41.86841711, 40.97033422, 39.50388019, 37.51361249, 35.06000439, 32.21760754, 29.07278673, 25.72109573, 22.264374, 18.80765227, 15.45596128, 12.31114047, 9.468743617000001, 7.01513552, 5.024867819, 3.558413789, 2.660330895, 2.357906931, 2.660330895, 3.558413789, 5.024867819, 7.01513552, 9.468743617000001, 12.31114047, 15.45596128, 18.80765227, 22.264374, 25.72109573, 29.07278673, 32.21760754, 35.06000439, 37.51361249, 39.50388019, 40.97033422, 41.86841711, 42.17084108, 41.86841711, 40.97033422, 39.50388019, 37.51361249, 35.06000439, 32.21760754, 29.07278673, 25.72109573, 22.264374, 18.80765227, 15.45596128, 12.31114047, 9.468743617000001, 7.01513552, 5.024867819, 3.558413789, 2.660330895, 2.357906931, 2.660330895, 3.558413789, 5.024867819, 7.01513552, 9.468743617000001, 12.31114047, 15.45596128, 18.80765227, 22.264374, 25.72109573, 29.07278673, 32.21760754, 35.06000439, 37.51361249, 39.50388019, 40.97033422, 41.86841711, 42.17084108, 41.86841711, 40.97033422, 39.50388019, 37.51361249, 35.06000439, 32.21760754, 29.07278673, 25.72109573, 22.264374, 18.80765227, 15.45596128, 12.31114047, 9.468743617000001, 7.01513552, 5.024867819, 3.558413789, 2.660330895, 2.357906931, 2.660330895, 3.558413789, 5.024867819, 7.01513552, 9.468743617000001, 12.31114047, 15.45596128, 18.80765227, 22.264374, 25.72109573, 29.07278673, 32.21760754, 35.06000439, 37.51361249, 39.50388019, 40.97033422, 41.86841711, 42.17084108, 41.86841711, 40.97033422, 39.50388019, 37.51361249, 35.06000439, 32.21760754, 29.07278673, 25.72109573, 22.264374, 18.80765227, 15.45596128, 12.31114047, 9.468743617000001, 7.01513552, 5.024867819, 3.558413789, 2.660330895, 2.357906931, 2.660330895, 3.558413789, 5.024867819, 7.01513552, 9.468743617000001, 12.31114047, 15.45596128, 18.80765227, 22.264374, 25.72109573, 29.07278673, 32.21760754, 35.06000439, 37.51361249, 39.50388019, 40.97033422, 41.86841711, 42.17084108],
  46.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  47. }
  48. trace4 = {
  49.   "line": {
  50.     "color": "rgb(254,224,139)",
  51.     "width": 2
  52.   },
  53.   "mode": "lines",
  54.   "type": "scattergeo",
  55.   "lat": [47.91202142, 47.58046432, 46.5958672, 44.98814655, 42.80615215, 40.1161828, 36.99997184, 33.55220379, 29.87763731, 26.08792226, 22.29820721, 18.62364074, 15.17587268, 12.05966173, 9.369692375, 7.187697975, 5.579977327000001, 4.595380207, 4.263823103, 4.595380207, 5.579977327000001, 7.187697975, 9.369692375, 12.05966173, 15.17587268, 18.62364074, 22.29820721, 26.08792226, 29.87763731, 33.55220379, 36.99997184, 40.1161828, 42.80615215, 44.98814655, 46.5958672, 47.58046432, 47.91202142, 47.58046432, 46.5958672, 44.98814655, 42.80615215, 40.1161828, 36.99997184, 33.55220379, 29.87763731, 26.08792226, 22.29820721, 18.62364074, 15.17587268, 12.05966173, 9.369692375, 7.187697975, 5.579977327000001, 4.595380207, 4.263823103, 4.595380207, 5.579977327000001, 7.187697975, 9.369692375, 12.05966173, 15.17587268, 18.62364074, 22.29820721, 26.08792226, 29.87763731, 33.55220379, 36.99997184, 40.1161828, 42.80615215, 44.98814655, 46.5958672, 47.58046432, 47.91202142, 47.58046432, 46.5958672, 44.98814655, 42.80615215, 40.1161828, 36.99997184, 33.55220379, 29.87763731, 26.08792226, 22.29820721, 18.62364074, 15.17587268, 12.05966173, 9.369692375, 7.187697975, 5.579977327000001, 4.595380207, 4.263823103, 4.595380207, 5.579977327000001, 7.187697975, 9.369692375, 12.05966173, 15.17587268, 18.62364074, 22.29820721, 26.08792226, 29.87763731, 33.55220379, 36.99997184, 40.1161828, 42.80615215, 44.98814655, 46.5958672, 47.58046432, 47.91202142, 47.58046432, 46.5958672, 44.98814655, 42.80615215, 40.1161828, 36.99997184, 33.55220379, 29.87763731, 26.08792226, 22.29820721, 18.62364074, 15.17587268, 12.05966173, 9.369692375, 7.187697975, 5.579977327000001, 4.595380207, 4.263823103, 4.595380207, 5.579977327000001, 7.187697975, 9.369692375, 12.05966173, 15.17587268, 18.62364074, 22.29820721, 26.08792226, 29.87763731, 33.55220379, 36.99997184, 40.1161828, 42.80615215, 44.98814655, 46.5958672, 47.58046432, 47.91202142],
  56.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  57. }
  58. trace5 = {
  59.   "line": {
  60.     "color": "rgb(255,255,191)",
  61.     "width": 2
  62.   },
  63.   "mode": "lines",
  64.   "type": "scattergeo",
  65.   "lat": [52.5, 52.15817444, 51.14308397, 49.48557159, 47.23599997, 44.46272122, 41.25, 37.69545322, 33.907084000000005, 30.0, 26.092916, 22.30454678, 18.75, 15.53727878, 12.76400003, 10.51442841, 8.856916032, 7.841825557000001, 7.5, 7.841825557000001, 8.856916032, 10.51442841, 12.76400003, 15.53727878, 18.75, 22.30454678, 26.092916, 30.0, 33.907084000000005, 37.69545322, 41.25, 44.46272122, 47.23599997, 49.48557159, 51.14308397, 52.15817444, 52.5, 52.15817444, 51.14308397, 49.48557159, 47.23599997, 44.46272122, 41.25, 37.69545322, 33.907084000000005, 30.0, 26.092916, 22.30454678, 18.75, 15.53727878, 12.76400003, 10.51442841, 8.856916032, 7.841825557000001, 7.5, 7.841825557000001, 8.856916032, 10.51442841, 12.76400003, 15.53727878, 18.75, 22.30454678, 26.092916, 30.0, 33.907084000000005, 37.69545322, 41.25, 44.46272122, 47.23599997, 49.48557159, 51.14308397, 52.15817444, 52.5, 52.15817444, 51.14308397, 49.48557159, 47.23599997, 44.46272122, 41.25, 37.69545322, 33.907084000000005, 30.0, 26.092916, 22.30454678, 18.75, 15.53727878, 12.76400003, 10.51442841, 8.856916032, 7.841825557000001, 7.5, 7.841825557000001, 8.856916032, 10.51442841, 12.76400003, 15.53727878, 18.75, 22.30454678, 26.092916, 30.0, 33.907084000000005, 37.69545322, 41.25, 44.46272122, 47.23599997, 49.48557159, 51.14308397, 52.15817444, 52.5, 52.15817444, 51.14308397, 49.48557159, 47.23599997, 44.46272122, 41.25, 37.69545322, 33.907084000000005, 30.0, 26.092916, 22.30454678, 18.75, 15.53727878, 12.76400003, 10.51442841, 8.856916032, 7.841825557000001, 7.5, 7.841825557000001, 8.856916032, 10.51442841, 12.76400003, 15.53727878, 18.75, 22.30454678, 26.092916, 30.0, 33.907084000000005, 37.69545322, 41.25, 44.46272122, 47.23599997, 49.48557159, 51.14308397, 52.15817444, 52.5],
  66.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  67. }
  68. trace6 = {
  69.   "line": {
  70.     "color": "rgb(230,245,152)",
  71.     "width": 2
  72.   },
  73.   "mode": "lines",
  74.   "type": "scattergeo",
  75.   "lat": [55.7361769, 55.40461979, 54.42002267, 52.81230202, 50.63030762, 47.94033827, 44.82412732, 41.37635926, 37.70179279, 33.91207774, 30.12236269, 26.44779621, 23.00002816, 19.8838172, 17.19384785, 15.01185345, 13.404132800000001, 12.41953568, 12.08797858, 12.41953568, 13.404132800000001, 15.01185345, 17.19384785, 19.8838172, 23.00002816, 26.44779621, 30.12236269, 33.91207774, 37.70179279, 41.37635926, 44.82412732, 47.94033827, 50.63030762, 52.81230202, 54.42002267, 55.40461979, 55.7361769, 55.40461979, 54.42002267, 52.81230202, 50.63030762, 47.94033827, 44.82412732, 41.37635926, 37.70179279, 33.91207774, 30.12236269, 26.44779621, 23.00002816, 19.8838172, 17.19384785, 15.01185345, 13.404132800000001, 12.41953568, 12.08797858, 12.41953568, 13.404132800000001, 15.01185345, 17.19384785, 19.8838172, 23.00002816, 26.44779621, 30.12236269, 33.91207774, 37.70179279, 41.37635926, 44.82412732, 47.94033827, 50.63030762, 52.81230202, 54.42002267, 55.40461979, 55.7361769, 55.40461979, 54.42002267, 52.81230202, 50.63030762, 47.94033827, 44.82412732, 41.37635926, 37.70179279, 33.91207774, 30.12236269, 26.44779621, 23.00002816, 19.8838172, 17.19384785, 15.01185345, 13.404132800000001, 12.41953568, 12.08797858, 12.41953568, 13.404132800000001, 15.01185345, 17.19384785, 19.8838172, 23.00002816, 26.44779621, 30.12236269, 33.91207774, 37.70179279, 41.37635926, 44.82412732, 47.94033827, 50.63030762, 52.81230202, 54.42002267, 55.40461979, 55.7361769, 55.40461979, 54.42002267, 52.81230202, 50.63030762, 47.94033827, 44.82412732, 41.37635926, 37.70179279, 33.91207774, 30.12236269, 26.44779621, 23.00002816, 19.8838172, 17.19384785, 15.01185345, 13.404132800000001, 12.41953568, 12.08797858, 12.41953568, 13.404132800000001, 15.01185345, 17.19384785, 19.8838172, 23.00002816, 26.44779621, 30.12236269, 33.91207774, 37.70179279, 41.37635926, 44.82412732, 47.94033827, 50.63030762, 52.81230202, 54.42002267, 55.40461979, 55.7361769],
  76.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  77. }
  78. trace7 = {
  79.   "line": {
  80.     "color": "rgb(171,221,164)",
  81.     "width": 2
  82.   },
  83.   "mode": "lines",
  84.   "type": "scattergeo",
  85.   "lat": [57.64209307, 57.3396691, 56.44158621, 54.97513218, 52.98486448, 50.53125638, 47.68885953, 44.54403872, 41.19234773, 37.735626, 34.27890427, 30.92721327, 27.78239246, 24.93999561, 22.48638751, 20.49611981, 19.02966578, 18.13158289, 17.82915892, 18.13158289, 19.02966578, 20.49611981, 22.48638751, 24.93999561, 27.78239246, 30.92721327, 34.27890427, 37.735626, 41.19234773, 44.54403872, 47.68885953, 50.53125638, 52.98486448, 54.97513218, 56.44158621, 57.3396691, 57.64209307, 57.3396691, 56.44158621, 54.97513218, 52.98486448, 50.53125638, 47.68885953, 44.54403872, 41.19234773, 37.735626, 34.27890427, 30.92721327, 27.78239246, 24.93999561, 22.48638751, 20.49611981, 19.02966578, 18.13158289, 17.82915892, 18.13158289, 19.02966578, 20.49611981, 22.48638751, 24.93999561, 27.78239246, 30.92721327, 34.27890427, 37.735626, 41.19234773, 44.54403872, 47.68885953, 50.53125638, 52.98486448, 54.97513218, 56.44158621, 57.3396691, 57.64209307, 57.3396691, 56.44158621, 54.97513218, 52.98486448, 50.53125638, 47.68885953, 44.54403872, 41.19234773, 37.735626, 34.27890427, 30.92721327, 27.78239246, 24.93999561, 22.48638751, 20.49611981, 19.02966578, 18.13158289, 17.82915892, 18.13158289, 19.02966578, 20.49611981, 22.48638751, 24.93999561, 27.78239246, 30.92721327, 34.27890427, 37.735626, 41.19234773, 44.54403872, 47.68885953, 50.53125638, 52.98486448, 54.97513218, 56.44158621, 57.3396691, 57.64209307, 57.3396691, 56.44158621, 54.97513218, 52.98486448, 50.53125638, 47.68885953, 44.54403872, 41.19234773, 37.735626, 34.27890427, 30.92721327, 27.78239246, 24.93999561, 22.48638751, 20.49611981, 19.02966578, 18.13158289, 17.82915892, 18.13158289, 19.02966578, 20.49611981, 22.48638751, 24.93999561, 27.78239246, 30.92721327, 34.27890427, 37.735626, 41.19234773, 44.54403872, 47.68885953, 50.53125638, 52.98486448, 54.97513218, 56.44158621, 57.3396691, 57.64209307],
  86.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  87. }
  88. trace8 = {
  89.   "line": {
  90.     "color": "rgb(102,194,165)",
  91.     "width": 2
  92.   },
  93.   "mode": "lines",
  94.   "type": "scattergeo",
  95.   "lat": [58.4371214, 58.1780886, 57.40886079, 56.15281056, 54.44810237, 52.34653291, 49.9119573, 47.21834889, 44.34755162, 41.3867932, 38.42603478, 35.55523751, 32.8616291, 30.427053499999996, 28.32548404, 26.62077584, 25.36472562, 24.59549781, 24.33646501, 24.59549781, 25.36472562, 26.62077584, 28.32548404, 30.427053499999996, 32.8616291, 35.55523751, 38.42603478, 41.3867932, 44.34755162, 47.21834889, 49.9119573, 52.34653291, 54.44810237, 56.15281056, 57.40886079, 58.1780886, 58.4371214, 58.1780886, 57.40886079, 56.15281056, 54.44810237, 52.34653291, 49.9119573, 47.21834889, 44.34755162, 41.3867932, 38.42603478, 35.55523751, 32.8616291, 30.427053499999996, 28.32548404, 26.62077584, 25.36472562, 24.59549781, 24.33646501, 24.59549781, 25.36472562, 26.62077584, 28.32548404, 30.427053499999996, 32.8616291, 35.55523751, 38.42603478, 41.3867932, 44.34755162, 47.21834889, 49.9119573, 52.34653291, 54.44810237, 56.15281056, 57.40886079, 58.1780886, 58.4371214, 58.1780886, 57.40886079, 56.15281056, 54.44810237, 52.34653291, 49.9119573, 47.21834889, 44.34755162, 41.3867932, 38.42603478, 35.55523751, 32.8616291, 30.427053499999996, 28.32548404, 26.62077584, 25.36472562, 24.59549781, 24.33646501, 24.59549781, 25.36472562, 26.62077584, 28.32548404, 30.427053499999996, 32.8616291, 35.55523751, 38.42603478, 41.3867932, 44.34755162, 47.21834889, 49.9119573, 52.34653291, 54.44810237, 56.15281056, 57.40886079, 58.1780886, 58.4371214, 58.1780886, 57.40886079, 56.15281056, 54.44810237, 52.34653291, 49.9119573, 47.21834889, 44.34755162, 41.3867932, 38.42603478, 35.55523751, 32.8616291, 30.427053499999996, 28.32548404, 26.62077584, 25.36472562, 24.59549781, 24.33646501, 24.59549781, 25.36472562, 26.62077584, 28.32548404, 30.427053499999996, 32.8616291, 35.55523751, 38.42603478, 41.3867932, 44.34755162, 47.21834889, 49.9119573, 52.34653291, 54.44810237, 56.15281056, 57.40886079, 58.1780886, 58.4371214],
  96.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  97. }
  98. trace9 = {
  99.   "line": {
  100.     "color": "rgb(50,136,189)",
  101.     "width": 2
  102.   },
  103.   "mode": "lines",
  104.   "type": "scattergeo",
  105.   "lat": [58.47023812, 58.26241634, 57.64526556, 56.63753759, 55.26985173, 53.58376444, 51.63050661, 49.469427, 47.16618893, 44.7907751, 42.41536128, 40.1121232, 37.95104359, 35.99778577, 34.31169847, 32.94401262, 31.93628465, 31.31913386, 31.11131208, 31.31913386, 31.93628465, 32.94401262, 34.31169847, 35.99778577, 37.95104359, 40.1121232, 42.41536128, 44.7907751, 47.16618893, 49.469427, 51.63050661, 53.58376444, 55.26985173, 56.63753759, 57.64526556, 58.26241634, 58.47023812, 58.26241634, 57.64526556, 56.63753759, 55.26985173, 53.58376444, 51.63050661, 49.469427, 47.16618893, 44.7907751, 42.41536128, 40.1121232, 37.95104359, 35.99778577, 34.31169847, 32.94401262, 31.93628465, 31.31913386, 31.11131208, 31.31913386, 31.93628465, 32.94401262, 34.31169847, 35.99778577, 37.95104359, 40.1121232, 42.41536128, 44.7907751, 47.16618893, 49.469427, 51.63050661, 53.58376444, 55.26985173, 56.63753759, 57.64526556, 58.26241634, 58.47023812, 58.26241634, 57.64526556, 56.63753759, 55.26985173, 53.58376444, 51.63050661, 49.469427, 47.16618893, 44.7907751, 42.41536128, 40.1121232, 37.95104359, 35.99778577, 34.31169847, 32.94401262, 31.93628465, 31.31913386, 31.11131208, 31.31913386, 31.93628465, 32.94401262, 34.31169847, 35.99778577, 37.95104359, 40.1121232, 42.41536128, 44.7907751, 47.16618893, 49.469427, 51.63050661, 53.58376444, 55.26985173, 56.63753759, 57.64526556, 58.26241634, 58.47023812, 58.26241634, 57.64526556, 56.63753759, 55.26985173, 53.58376444, 51.63050661, 49.469427, 47.16618893, 44.7907751, 42.41536128, 40.1121232, 37.95104359, 35.99778577, 34.31169847, 32.94401262, 31.93628465, 31.31913386, 31.11131208, 31.31913386, 31.93628465, 32.94401262, 34.31169847, 35.99778577, 37.95104359, 40.1121232, 42.41536128, 44.7907751, 47.16618893, 49.469427, 51.63050661, 53.58376444, 55.26985173, 56.63753759, 57.64526556, 58.26241634, 58.47023812],
  106.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  107. }
  108. trace10 = {
  109.   "line": {
  110.     "color": "rgb(213,62,79)",
  111.     "width": 2
  112.   },
  113.   "mode": "lines",
  114.   "type": "scattergeo",
  115.   "lat": [-28.88868792, -28.68086614, -28.06371535, -27.05598738, -25.68830153, -24.00221423, -22.04895641, -19.8878768, -17.58463872, -15.2092249, -12.83381107, -10.530573, -8.36949339, -6.416235563, -4.730148269, -3.362462415, -2.354734444, -1.737583661, -1.529761881, -1.737583661, -2.354734444, -3.362462415, -4.730148269, -6.416235563, -8.36949339, -10.530573, -12.83381107, -15.2092249, -17.58463872, -19.8878768, -22.04895641, -24.00221423, -25.68830153, -27.05598738, -28.06371535, -28.68086614, -28.88868792, -28.68086614, -28.06371535, -27.05598738, -25.68830153, -24.00221423, -22.04895641, -19.8878768, -17.58463872, -15.2092249, -12.83381107, -10.530573, -8.36949339, -6.416235563, -4.730148269, -3.362462415, -2.354734444, -1.737583661, -1.529761881, -1.737583661, -2.354734444, -3.362462415, -4.730148269, -6.416235563, -8.36949339, -10.530573, -12.83381107, -15.2092249, -17.58463872, -19.8878768, -22.04895641, -24.00221423, -25.68830153, -27.05598738, -28.06371535, -28.68086614, -28.88868792, -28.68086614, -28.06371535, -27.05598738, -25.68830153, -24.00221423, -22.04895641, -19.8878768, -17.58463872, -15.2092249, -12.83381107, -10.530573, -8.36949339, -6.416235563, -4.730148269, -3.362462415, -2.354734444, -1.737583661, -1.529761881, -1.737583661, -2.354734444, -3.362462415, -4.730148269, -6.416235563, -8.36949339, -10.530573, -12.83381107, -15.2092249, -17.58463872, -19.8878768, -22.04895641, -24.00221423, -25.68830153, -27.05598738, -28.06371535, -28.68086614, -28.88868792, -28.68086614, -28.06371535, -27.05598738, -25.68830153, -24.00221423, -22.04895641, -19.8878768, -17.58463872, -15.2092249, -12.83381107, -10.530573, -8.36949339, -6.416235563, -4.730148269, -3.362462415, -2.354734444, -1.737583661, -1.529761881, -1.737583661, -2.354734444, -3.362462415, -4.730148269, -6.416235563, -8.36949339, -10.530573, -12.83381107, -15.2092249, -17.58463872, -19.8878768, -22.04895641, -24.00221423, -25.68830153, -27.05598738, -28.06371535, -28.68086614, -28.88868792],
  116.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  117. }
  118. trace11 = {
  119.   "line": {
  120.     "color": "rgb(244,109,67)",
  121.     "width": 2
  122.   },
  123.   "mode": "lines",
  124.   "type": "scattergeo",
  125.   "lat": [-35.66353499, -35.40450219, -34.63527438, -33.37922416, -31.67451596, -29.572946500000004, -27.138370899999998, -24.44476249, -21.57396522, -18.6132068, -15.65244838, -12.78165111, -10.088042699999999, -7.653467094, -5.551897632, -3.84718944, -2.591139213, -1.8219114019999998, -1.562878605, -1.8219114019999998, -2.591139213, -3.84718944, -5.551897632, -7.653467094, -10.088042699999999, -12.78165111, -15.65244838, -18.6132068, -21.57396522, -24.44476249, -27.138370899999998, -29.572946500000004, -31.67451596, -33.37922416, -34.63527438, -35.40450219, -35.66353499, -35.40450219, -34.63527438, -33.37922416, -31.67451596, -29.572946500000004, -27.138370899999998, -24.44476249, -21.57396522, -18.6132068, -15.65244838, -12.78165111, -10.088042699999999, -7.653467094, -5.551897632, -3.84718944, -2.591139213, -1.8219114019999998, -1.562878605, -1.8219114019999998, -2.591139213, -3.84718944, -5.551897632, -7.653467094, -10.088042699999999, -12.78165111, -15.65244838, -18.6132068, -21.57396522, -24.44476249, -27.138370899999998, -29.572946500000004, -31.67451596, -33.37922416, -34.63527438, -35.40450219, -35.66353499, -35.40450219, -34.63527438, -33.37922416, -31.67451596, -29.572946500000004, -27.138370899999998, -24.44476249, -21.57396522, -18.6132068, -15.65244838, -12.78165111, -10.088042699999999, -7.653467094, -5.551897632, -3.84718944, -2.591139213, -1.8219114019999998, -1.562878605, -1.8219114019999998, -2.591139213, -3.84718944, -5.551897632, -7.653467094, -10.088042699999999, -12.78165111, -15.65244838, -18.6132068, -21.57396522, -24.44476249, -27.138370899999998, -29.572946500000004, -31.67451596, -33.37922416, -34.63527438, -35.40450219, -35.66353499, -35.40450219, -34.63527438, -33.37922416, -31.67451596, -29.572946500000004, -27.138370899999998, -24.44476249, -21.57396522, -18.6132068, -15.65244838, -12.78165111, -10.088042699999999, -7.653467094, -5.551897632, -3.84718944, -2.591139213, -1.8219114019999998, -1.562878605, -1.8219114019999998, -2.591139213, -3.84718944, -5.551897632, -7.653467094, -10.088042699999999, -12.78165111, -15.65244838, -18.6132068, -21.57396522, -24.44476249, -27.138370899999998, -29.572946500000004, -31.67451596, -33.37922416, -34.63527438, -35.40450219, -35.66353499],
  126.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  127. }
  128. trace12 = {
  129.   "line": {
  130.     "color": "rgb(253,174,97)",
  131.     "width": 2
  132.   },
  133.   "mode": "lines",
  134.   "type": "scattergeo",
  135.   "lat": [-42.17084108, -41.86841711, -40.97033422, -39.50388019, -37.51361249, -35.06000439, -32.21760754, -29.07278673, -25.72109573, -22.264374, -18.80765227, -15.45596128, -12.31114047, -9.468743617000001, -7.01513552, -5.024867819, -3.558413789, -2.660330895, -2.357906931, -2.660330895, -3.558413789, -5.024867819, -7.01513552, -9.468743617000001, -12.31114047, -15.45596128, -18.80765227, -22.264374, -25.72109573, -29.07278673, -32.21760754, -35.06000439, -37.51361249, -39.50388019, -40.97033422, -41.86841711, -42.17084108, -41.86841711, -40.97033422, -39.50388019, -37.51361249, -35.06000439, -32.21760754, -29.07278673, -25.72109573, -22.264374, -18.80765227, -15.45596128, -12.31114047, -9.468743617000001, -7.01513552, -5.024867819, -3.558413789, -2.660330895, -2.357906931, -2.660330895, -3.558413789, -5.024867819, -7.01513552, -9.468743617000001, -12.31114047, -15.45596128, -18.80765227, -22.264374, -25.72109573, -29.07278673, -32.21760754, -35.06000439, -37.51361249, -39.50388019, -40.97033422, -41.86841711, -42.17084108, -41.86841711, -40.97033422, -39.50388019, -37.51361249, -35.06000439, -32.21760754, -29.07278673, -25.72109573, -22.264374, -18.80765227, -15.45596128, -12.31114047, -9.468743617000001, -7.01513552, -5.024867819, -3.558413789, -2.660330895, -2.357906931, -2.660330895, -3.558413789, -5.024867819, -7.01513552, -9.468743617000001, -12.31114047, -15.45596128, -18.80765227, -22.264374, -25.72109573, -29.07278673, -32.21760754, -35.06000439, -37.51361249, -39.50388019, -40.97033422, -41.86841711, -42.17084108, -41.86841711, -40.97033422, -39.50388019, -37.51361249, -35.06000439, -32.21760754, -29.07278673, -25.72109573, -22.264374, -18.80765227, -15.45596128, -12.31114047, -9.468743617000001, -7.01513552, -5.024867819, -3.558413789, -2.660330895, -2.357906931, -2.660330895, -3.558413789, -5.024867819, -7.01513552, -9.468743617000001, -12.31114047, -15.45596128, -18.80765227, -22.264374, -25.72109573, -29.07278673, -32.21760754, -35.06000439, -37.51361249, -39.50388019, -40.97033422, -41.86841711, -42.17084108],
  136.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  137. }
  138. trace13 = {
  139.   "line": {
  140.     "color": "rgb(254,224,139)",
  141.     "width": 2
  142.   },
  143.   "mode": "lines",
  144.   "type": "scattergeo",
  145.   "lat": [-47.91202142, -47.58046432, -46.5958672, -44.98814655, -42.80615215, -40.1161828, -36.99997184, -33.55220379, -29.87763731, -26.08792226, -22.29820721, -18.62364074, -15.17587268, -12.05966173, -9.369692375, -7.187697975, -5.579977327000001, -4.595380207, -4.263823103, -4.595380207, -5.579977327000001, -7.187697975, -9.369692375, -12.05966173, -15.17587268, -18.62364074, -22.29820721, -26.08792226, -29.87763731, -33.55220379, -36.99997184, -40.1161828, -42.80615215, -44.98814655, -46.5958672, -47.58046432, -47.91202142, -47.58046432, -46.5958672, -44.98814655, -42.80615215, -40.1161828, -36.99997184, -33.55220379, -29.87763731, -26.08792226, -22.29820721, -18.62364074, -15.17587268, -12.05966173, -9.369692375, -7.187697975, -5.579977327000001, -4.595380207, -4.263823103, -4.595380207, -5.579977327000001, -7.187697975, -9.369692375, -12.05966173, -15.17587268, -18.62364074, -22.29820721, -26.08792226, -29.87763731, -33.55220379, -36.99997184, -40.1161828, -42.80615215, -44.98814655, -46.5958672, -47.58046432, -47.91202142, -47.58046432, -46.5958672, -44.98814655, -42.80615215, -40.1161828, -36.99997184, -33.55220379, -29.87763731, -26.08792226, -22.29820721, -18.62364074, -15.17587268, -12.05966173, -9.369692375, -7.187697975, -5.579977327000001, -4.595380207, -4.263823103, -4.595380207, -5.579977327000001, -7.187697975, -9.369692375, -12.05966173, -15.17587268, -18.62364074, -22.29820721, -26.08792226, -29.87763731, -33.55220379, -36.99997184, -40.1161828, -42.80615215, -44.98814655, -46.5958672, -47.58046432, -47.91202142, -47.58046432, -46.5958672, -44.98814655, -42.80615215, -40.1161828, -36.99997184, -33.55220379, -29.87763731, -26.08792226, -22.29820721, -18.62364074, -15.17587268, -12.05966173, -9.369692375, -7.187697975, -5.579977327000001, -4.595380207, -4.263823103, -4.595380207, -5.579977327000001, -7.187697975, -9.369692375, -12.05966173, -15.17587268, -18.62364074, -22.29820721, -26.08792226, -29.87763731, -33.55220379, -36.99997184, -40.1161828, -42.80615215, -44.98814655, -46.5958672, -47.58046432, -47.91202142],
  146.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  147. }
  148. trace14 = {
  149.   "line": {
  150.     "color": "rgb(255,255,191)",
  151.     "width": 2
  152.   },
  153.   "mode": "lines",
  154.   "type": "scattergeo",
  155.   "lat": [-52.5, -52.15817444, -51.14308397, -49.48557159, -47.23599997, -44.46272122, -41.25, -37.69545322, -33.907084000000005, -30.0, -26.092916, -22.30454678, -18.75, -15.53727878, -12.76400003, -10.51442841, -8.856916032, -7.841825557000001, -7.5, -7.841825557000001, -8.856916032, -10.51442841, -12.76400003, -15.53727878, -18.75, -22.30454678, -26.092916, -30.0, -33.907084000000005, -37.69545322, -41.25, -44.46272122, -47.23599997, -49.48557159, -51.14308397, -52.15817444, -52.5, -52.15817444, -51.14308397, -49.48557159, -47.23599997, -44.46272122, -41.25, -37.69545322, -33.907084000000005, -30.0, -26.092916, -22.30454678, -18.75, -15.53727878, -12.76400003, -10.51442841, -8.856916032, -7.841825557000001, -7.5, -7.841825557000001, -8.856916032, -10.51442841, -12.76400003, -15.53727878, -18.75, -22.30454678, -26.092916, -30.0, -33.907084000000005, -37.69545322, -41.25, -44.46272122, -47.23599997, -49.48557159, -51.14308397, -52.15817444, -52.5, -52.15817444, -51.14308397, -49.48557159, -47.23599997, -44.46272122, -41.25, -37.69545322, -33.907084000000005, -30.0, -26.092916, -22.30454678, -18.75, -15.53727878, -12.76400003, -10.51442841, -8.856916032, -7.841825557000001, -7.5, -7.841825557000001, -8.856916032, -10.51442841, -12.76400003, -15.53727878, -18.75, -22.30454678, -26.092916, -30.0, -33.907084000000005, -37.69545322, -41.25, -44.46272122, -47.23599997, -49.48557159, -51.14308397, -52.15817444, -52.5, -52.15817444, -51.14308397, -49.48557159, -47.23599997, -44.46272122, -41.25, -37.69545322, -33.907084000000005, -30.0, -26.092916, -22.30454678, -18.75, -15.53727878, -12.76400003, -10.51442841, -8.856916032, -7.841825557000001, -7.5, -7.841825557000001, -8.856916032, -10.51442841, -12.76400003, -15.53727878, -18.75, -22.30454678, -26.092916, -30.0, -33.907084000000005, -37.69545322, -41.25, -44.46272122, -47.23599997, -49.48557159, -51.14308397, -52.15817444, -52.5],
  156.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  157. }
  158. trace15 = {
  159.   "line": {
  160.     "color": "rgb(230,245,152)",
  161.     "width": 2
  162.   },
  163.   "mode": "lines",
  164.   "type": "scattergeo",
  165.   "lat": [-55.7361769, -55.40461979, -54.42002267, -52.81230202, -50.63030762, -47.94033827, -44.82412732, -41.37635926, -37.70179279, -33.91207774, -30.12236269, -26.44779621, -23.00002816, -19.8838172, -17.19384785, -15.01185345, -13.404132800000001, -12.41953568, -12.08797858, -12.41953568, -13.404132800000001, -15.01185345, -17.19384785, -19.8838172, -23.00002816, -26.44779621, -30.12236269, -33.91207774, -37.70179279, -41.37635926, -44.82412732, -47.94033827, -50.63030762, -52.81230202, -54.42002267, -55.40461979, -55.7361769, -55.40461979, -54.42002267, -52.81230202, -50.63030762, -47.94033827, -44.82412732, -41.37635926, -37.70179279, -33.91207774, -30.12236269, -26.44779621, -23.00002816, -19.8838172, -17.19384785, -15.01185345, -13.404132800000001, -12.41953568, -12.08797858, -12.41953568, -13.404132800000001, -15.01185345, -17.19384785, -19.8838172, -23.00002816, -26.44779621, -30.12236269, -33.91207774, -37.70179279, -41.37635926, -44.82412732, -47.94033827, -50.63030762, -52.81230202, -54.42002267, -55.40461979, -55.7361769, -55.40461979, -54.42002267, -52.81230202, -50.63030762, -47.94033827, -44.82412732, -41.37635926, -37.70179279, -33.91207774, -30.12236269, -26.44779621, -23.00002816, -19.8838172, -17.19384785, -15.01185345, -13.404132800000001, -12.41953568, -12.08797858, -12.41953568, -13.404132800000001, -15.01185345, -17.19384785, -19.8838172, -23.00002816, -26.44779621, -30.12236269, -33.91207774, -37.70179279, -41.37635926, -44.82412732, -47.94033827, -50.63030762, -52.81230202, -54.42002267, -55.40461979, -55.7361769, -55.40461979, -54.42002267, -52.81230202, -50.63030762, -47.94033827, -44.82412732, -41.37635926, -37.70179279, -33.91207774, -30.12236269, -26.44779621, -23.00002816, -19.8838172, -17.19384785, -15.01185345, -13.404132800000001, -12.41953568, -12.08797858, -12.41953568, -13.404132800000001, -15.01185345, -17.19384785, -19.8838172, -23.00002816, -26.44779621, -30.12236269, -33.91207774, -37.70179279, -41.37635926, -44.82412732, -47.94033827, -50.63030762, -52.81230202, -54.42002267, -55.40461979, -55.7361769],
  166.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  167. }
  168. trace16 = {
  169.   "line": {
  170.     "color": "rgb(171,221,164)",
  171.     "width": 2
  172.   },
  173.   "mode": "lines",
  174.   "type": "scattergeo",
  175.   "lat": [-57.64209307, -57.3396691, -56.44158621, -54.97513218, -52.98486448, -50.53125638, -47.68885953, -44.54403872, -41.19234773, -37.735626, -34.27890427, -30.92721327, -27.78239246, -24.93999561, -22.48638751, -20.49611981, -19.02966578, -18.13158289, -17.82915892, -18.13158289, -19.02966578, -20.49611981, -22.48638751, -24.93999561, -27.78239246, -30.92721327, -34.27890427, -37.735626, -41.19234773, -44.54403872, -47.68885953, -50.53125638, -52.98486448, -54.97513218, -56.44158621, -57.3396691, -57.64209307, -57.3396691, -56.44158621, -54.97513218, -52.98486448, -50.53125638, -47.68885953, -44.54403872, -41.19234773, -37.735626, -34.27890427, -30.92721327, -27.78239246, -24.93999561, -22.48638751, -20.49611981, -19.02966578, -18.13158289, -17.82915892, -18.13158289, -19.02966578, -20.49611981, -22.48638751, -24.93999561, -27.78239246, -30.92721327, -34.27890427, -37.735626, -41.19234773, -44.54403872, -47.68885953, -50.53125638, -52.98486448, -54.97513218, -56.44158621, -57.3396691, -57.64209307, -57.3396691, -56.44158621, -54.97513218, -52.98486448, -50.53125638, -47.68885953, -44.54403872, -41.19234773, -37.735626, -34.27890427, -30.92721327, -27.78239246, -24.93999561, -22.48638751, -20.49611981, -19.02966578, -18.13158289, -17.82915892, -18.13158289, -19.02966578, -20.49611981, -22.48638751, -24.93999561, -27.78239246, -30.92721327, -34.27890427, -37.735626, -41.19234773, -44.54403872, -47.68885953, -50.53125638, -52.98486448, -54.97513218, -56.44158621, -57.3396691, -57.64209307, -57.3396691, -56.44158621, -54.97513218, -52.98486448, -50.53125638, -47.68885953, -44.54403872, -41.19234773, -37.735626, -34.27890427, -30.92721327, -27.78239246, -24.93999561, -22.48638751, -20.49611981, -19.02966578, -18.13158289, -17.82915892, -18.13158289, -19.02966578, -20.49611981, -22.48638751, -24.93999561, -27.78239246, -30.92721327, -34.27890427, -37.735626, -41.19234773, -44.54403872, -47.68885953, -50.53125638, -52.98486448, -54.97513218, -56.44158621, -57.3396691, -57.64209307],
  176.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  177. }
  178. trace17 = {
  179.   "line": {
  180.     "color": "rgb(102,194,165)",
  181.     "width": 2
  182.   },
  183.   "mode": "lines",
  184.   "type": "scattergeo",
  185.   "lat": [-58.4371214, -58.1780886, -57.40886079, -56.15281056, -54.44810237, -52.34653291, -49.9119573, -47.21834889, -44.34755162, -41.3867932, -38.42603478, -35.55523751, -32.8616291, -30.427053499999996, -28.32548404, -26.62077584, -25.36472562, -24.59549781, -24.33646501, -24.59549781, -25.36472562, -26.62077584, -28.32548404, -30.427053499999996, -32.8616291, -35.55523751, -38.42603478, -41.3867932, -44.34755162, -47.21834889, -49.9119573, -52.34653291, -54.44810237, -56.15281056, -57.40886079, -58.1780886, -58.4371214, -58.1780886, -57.40886079, -56.15281056, -54.44810237, -52.34653291, -49.9119573, -47.21834889, -44.34755162, -41.3867932, -38.42603478, -35.55523751, -32.8616291, -30.427053499999996, -28.32548404, -26.62077584, -25.36472562, -24.59549781, -24.33646501, -24.59549781, -25.36472562, -26.62077584, -28.32548404, -30.427053499999996, -32.8616291, -35.55523751, -38.42603478, -41.3867932, -44.34755162, -47.21834889, -49.9119573, -52.34653291, -54.44810237, -56.15281056, -57.40886079, -58.1780886, -58.4371214, -58.1780886, -57.40886079, -56.15281056, -54.44810237, -52.34653291, -49.9119573, -47.21834889, -44.34755162, -41.3867932, -38.42603478, -35.55523751, -32.8616291, -30.427053499999996, -28.32548404, -26.62077584, -25.36472562, -24.59549781, -24.33646501, -24.59549781, -25.36472562, -26.62077584, -28.32548404, -30.427053499999996, -32.8616291, -35.55523751, -38.42603478, -41.3867932, -44.34755162, -47.21834889, -49.9119573, -52.34653291, -54.44810237, -56.15281056, -57.40886079, -58.1780886, -58.4371214, -58.1780886, -57.40886079, -56.15281056, -54.44810237, -52.34653291, -49.9119573, -47.21834889, -44.34755162, -41.3867932, -38.42603478, -35.55523751, -32.8616291, -30.427053499999996, -28.32548404, -26.62077584, -25.36472562, -24.59549781, -24.33646501, -24.59549781, -25.36472562, -26.62077584, -28.32548404, -30.427053499999996, -32.8616291, -35.55523751, -38.42603478, -41.3867932, -44.34755162, -47.21834889, -49.9119573, -52.34653291, -54.44810237, -56.15281056, -57.40886079, -58.1780886, -58.4371214],
  186.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  187. }
  188. trace18 = {
  189.   "line": {
  190.     "color": "rgb(50,136,189)",
  191.     "width": 2
  192.   },
  193.   "mode": "lines",
  194.   "type": "scattergeo",
  195.   "lat": [-58.47023812, -58.26241634, -57.64526556, -56.63753759, -55.26985173, -53.58376444, -51.63050661, -49.469427, -47.16618893, -44.7907751, -42.41536128, -40.1121232, -37.95104359, -35.99778577, -34.31169847, -32.94401262, -31.93628465, -31.31913386, -31.11131208, -31.31913386, -31.93628465, -32.94401262, -34.31169847, -35.99778577, -37.95104359, -40.1121232, -42.41536128, -44.7907751, -47.16618893, -49.469427, -51.63050661, -53.58376444, -55.26985173, -56.63753759, -57.64526556, -58.26241634, -58.47023812, -58.26241634, -57.64526556, -56.63753759, -55.26985173, -53.58376444, -51.63050661, -49.469427, -47.16618893, -44.7907751, -42.41536128, -40.1121232, -37.95104359, -35.99778577, -34.31169847, -32.94401262, -31.93628465, -31.31913386, -31.11131208, -31.31913386, -31.93628465, -32.94401262, -34.31169847, -35.99778577, -37.95104359, -40.1121232, -42.41536128, -44.7907751, -47.16618893, -49.469427, -51.63050661, -53.58376444, -55.26985173, -56.63753759, -57.64526556, -58.26241634, -58.47023812, -58.26241634, -57.64526556, -56.63753759, -55.26985173, -53.58376444, -51.63050661, -49.469427, -47.16618893, -44.7907751, -42.41536128, -40.1121232, -37.95104359, -35.99778577, -34.31169847, -32.94401262, -31.93628465, -31.31913386, -31.11131208, -31.31913386, -31.93628465, -32.94401262, -34.31169847, -35.99778577, -37.95104359, -40.1121232, -42.41536128, -44.7907751, -47.16618893, -49.469427, -51.63050661, -53.58376444, -55.26985173, -56.63753759, -57.64526556, -58.26241634, -58.47023812, -58.26241634, -57.64526556, -56.63753759, -55.26985173, -53.58376444, -51.63050661, -49.469427, -47.16618893, -44.7907751, -42.41536128, -40.1121232, -37.95104359, -35.99778577, -34.31169847, -32.94401262, -31.93628465, -31.31913386, -31.11131208, -31.31913386, -31.93628465, -32.94401262, -34.31169847, -35.99778577, -37.95104359, -40.1121232, -42.41536128, -44.7907751, -47.16618893, -49.469427, -51.63050661, -53.58376444, -55.26985173, -56.63753759, -57.64526556, -58.26241634, -58.47023812],
  196.   "lon": [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0, 102.5, 105.0, 107.5, 110.0, 112.5, 115.0, 117.5, 120.0, 122.5, 125.0, 127.5, 130.0, 132.5, 135.0, 137.5, 140.0, 142.5, 145.0, 147.5, 150.0, 152.5, 155.0, 157.5, 160.0, 162.5, 165.0, 167.5, 170.0, 172.5, 175.0, 177.5, 180.0, 182.5, 185.0, 187.5, 190.0, 192.5, 195.0, 197.5, 200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5, 325.0, 327.5, 330.0, 332.5, 335.0, 337.5, 340.0, 342.5, 345.0, 347.5, 350.0, 352.5, 355.0, 357.5, 360.0]
  197. }
  198. data = Data([trace1, trace2, trace3, trace4, trace5, trace6, trace7, trace8, trace9, trace10, trace11, trace12, trace13, trace14, trace15, trace16, trace17, trace18])
  199. layout = {
  200.   "geo": {
  201.     "lataxis": {
  202.       "showgrid": True,
  203.       "gridcolor": "rgb(102, 102, 102)",
  204.       "gridwidth": 0.5
  205.     },
  206.     "lonaxis": {
  207.       "showgrid": True,
  208.       "gridcolor": "rgb(102, 102, 102)",
  209.       "gridwidth": 0.5
  210.     },
  211.     "showland": True,
  212.     "lakecolor": "rgb(0, 255, 255)",
  213.     "landcolor": "rgb(230, 145, 56)",
  214.     "showlakes": True,
  215.     "showocean": True,
  216.     "oceancolor": "rgb(0, 255, 255)",
  217.     "projection": {
  218.       "type": "orthographic",
  219.       "rotation": {
  220.         "lat": 40,
  221.         "lon": -100,
  222.         "roll": 0
  223.       }
  224.     },
  225.     "countrywidth": 0.5,
  226.     "showcountries": True
  227.   },
  228.   "title": "Contour lines over globe<br>(Click and drag to rotate)",
  229.   "showlegend": False
  230. }
  231. fig = Figure(data=data, layout=layout)
  232. #plot_url = py.plot(fig)
  233. plot(fig, filename="contour_lines.html")


Output:

0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#35

Plotly templating of the Outgoing Longwave Radiation Anomalies map.

This code uses cartopy instead of the code below that uses Basemap:

In this code, we have imported cartopy.feature and used its COASTLINE and BORDERS attributes to retrieve the coastline and country borders, respectively. We have also made the necessary changes in the get_coastline_traces and get_country_traces functions to use these attributes.
  1. import plotly
  2. print(plotly.__version__)
  3.  
  4. import chart_studio.plotly as py
  5. from plotly.graph_objs import *
  6. from plotly.offline import plot
  7.  
  8. import numpy as np          
  9. import cartopy.crs as ccrs
  10. import cartopy.feature as cfeature
  11. import netCDF4 as nc
  12. from netCDF4 import *
  13. import urllib.request
  14.  
  15. urllib.request.urlretrieve("https://www.dropbox.com/s/h2tbnnf972i9ai8/compday.KsNOdsJTz1.nc?dl=1", "compday.KsNOdsJTz1.nc")
  16.  
  17. with nc.Dataset("./compday.KsNOdsJTz1.nc", 'r') as f:
  18.     lon = f.variables['lon'][::]
  19.     lat = f.variables['lat'][::-1]
  20.     olr = f.variables['olr'][0,::-1,:]
  21.  
  22. tmp_lon = np.array([lon[n]-360 if l>=180 else lon[n]
  23.                    for n,l in enumerate(lon)])
  24.  
  25. i_east, = np.where(tmp_lon>=0)
  26. i_west, = np.where(tmp_lon<0)  
  27. lon = np.hstack((tmp_lon[i_west], tmp_lon[i_east]))
  28.  
  29. olr_ground = np.array(olr)
  30. olr = np.hstack((olr_ground[:,i_west], olr_ground[:,i_east]))
  31.  
  32. trace1 = Contour(
  33.     z=olr,
  34.     x=lon,
  35.     y=lat,
  36.     colorscale= [[0.0, '#313695'], [0.07692307692307693, '#3a67af'], [0.15384615384615385, '#5994c5'], [0.23076923076923078, '#84bbd8'], [0.3076923076923077, '#afdbea'], [0.38461538461538464, '#d8eff5'], [0.46153846153846156, '#d6ffe1'], [0.5384615384615384, '#fef4ac'], [0.6153846153846154, '#fed987'], [0.6923076923076923, '#fdb264'], [0.7692307692307693, '#f78249'], [0.8461538461538461, '#e75435'], [0.9230769230769231, '#cc2727'], [1.0, '#a50026']],
  37.     zauto=False,
  38.     zmin=-20,
  39.     zmax=20,
  40.  
  41.     colorbar= {
  42.         "borderwidth": 0,
  43.         "outlinewidth": 0,
  44.         "thickness": 15,
  45.         "tickfont": {"size": 14},
  46.         "title": "W/m²"
  47.     },
  48.  
  49.     contours= {
  50.         "end": 20,
  51.         "showlines": False,
  52.         "size": 2,
  53.         "start": -20
  54.     }
  55. )    
  56.  
  57. m = ccrs.PlateCarree()
  58.  
  59. def make_scatter(x,y):
  60.     return Scatter(
  61.         x=x,
  62.         y=y,
  63.         mode='lines',
  64.         line=Line(color="black"),
  65.         name=' '
  66.     )
  67.  
  68. def polygons_to_traces(poly_paths, N_poly):
  69.     data = dict(
  70.         x=[],
  71.         y=[],
  72.         mode='lines',
  73.         line=Line(color="black"),
  74.         name=' '
  75.     )
  76.  
  77.     for i_poly in range(N_poly):
  78.         poly_path = poly_paths[i_poly]
  79.  
  80.         coords_cc = np.array(
  81.             [(vertex[0], vertex[1])
  82.              for (vertex, code) in poly_path.iter_segments(simplify=False)]
  83.         )
  84.  
  85.         lon_cc, lat_cc = poly_path.boundary.xy
  86.  
  87.         data['x'] = data['x'] + lon_cc.tolist() + [np.nan]
  88.         data['y'] = data['y'] + lat_cc.tolist() + [np.nan]
  89.  
  90.     return [data]
  91.  
  92. def get_coastline_traces():
  93.     poly_paths = cfeature.COASTLINE.geometries()
  94.     N_poly = 1  # only single coastline path
  95.     return polygons_to_traces(poly_paths, N_poly)
  96.  
  97. def get_country_traces():
  98.     poly_paths = cfeature.BORDERS.geometries()
  99.     N_poly = len(poly_paths)
  100.     return polygons_to_traces(poly_paths, N_poly)
  101.  
  102. traces_cc = get_coastline_traces() + get_country_traces()
  103.  
  104. data = Data([trace1] + traces_cc)
  105.  
  106. title = u"Outgoing Longwave Radiation Anomalies<br>"
  107. anno_text = ""
  108.  
  109. axis_style = dict(
  110.     zeroline=False,
  111.     showline=False,
  112.     showgrid=False,
  113.     ticks='',
  114.     showticklabels=False,
  115. )
  116.  
  117. layout = Layout(
  118.     title=title,
  119.     showlegend=False,
  120.     hovermode="closest",        
  121.     xaxis=XAxis(
  122.         axis_style,
  123.         range=[lon[0],lon[-1]]  
  124.     ),
  125.     yaxis=YAxis(
  126.         axis_style,
  127.     ),
  128.     annotations=Annotations([
  129.         Annotation(
  130.             text=anno_text,
  131.             xref='paper',
  132.             yref='paper',
  133.             x=0,
  134.             y=1,
  135.             yanchor='bottom',
  136.             showarrow=False
  137.         )
  138.     ]),
  139.     autosize=False,
  140.     width=1200,
  141.     height=800,
  142. )
  143.  
  144. fig = Figure(data=data, layout=layout)
  145. plot(fig, filename="NCEP_OLR.html")


This code uses Basemap

  1. import plotly
  2. print(plotly.__version__)
  3.  
  4. import chart_studio.plotly as py
  5. from plotly.graph_objs import *
  6. from plotly.offline import plot
  7.  
  8. import numpy as np          
  9. #from scipy.io import netcdf  
  10.  
  11. from mpl_toolkits.basemap import Basemap
  12. import netCDF4 as nc
  13. from netCDF4 import *
  14. import urllib.request
  15. #import xarray as xr
  16.  
  17. urllib.request.urlretrieve("https://www.dropbox.com/s/h2tbnnf972i9ai8/compday.KsNOdsJTz1.nc?dl=1", "compday.KsNOdsJTz1.nc")#your file from the NCEP reanalysis plotter
  18.  
  19. # Retrieve data from NetCDF file
  20. with nc.Dataset("./compday.KsNOdsJTz1.nc", 'r') as f:
  21.     lon = f.variables['lon'][::]    # copy as list
  22.     lat = f.variables['lat'][::-1]  # invert the latitude vector -> South to North
  23.     olr = f.variables['olr'][0,::-1,:]  # squeeze out the time dimension,
  24.                                         # invert latitude index
  25.  
  26. # Shift 'lon' from [0,360] to [-180,180], make numpy array
  27. tmp_lon = np.array([lon[n]-360 if l>=180 else lon[n]
  28.                    for n,l in enumerate(lon)])  # => [0,180]U[-180,2.5]
  29.  
  30. i_east, = np.where(tmp_lon>=0)  # indices of east lon
  31. i_west, = np.where(tmp_lon<0)   # indices of west lon
  32. lon = np.hstack((tmp_lon[i_west], tmp_lon[i_east]))  # stack the 2 halves
  33.  
  34. # Correspondingly, shift the 'precip' array
  35. olr_ground = np.array(olr)
  36. olr = np.hstack((olr_ground[:,i_west], olr_ground[:,i_east]))
  37.  
  38. trace1 = Contour(
  39.     z=olr,
  40.     x=lon,
  41.     y=lat,
  42.     colorscale= [[0.0, '#313695'], [0.07692307692307693, '#3a67af'], [0.15384615384615385, '#5994c5'], [0.23076923076923078, '#84bbd8'], [0.3076923076923077, '#afdbea'], [0.38461538461538464, '#d8eff5'], [0.46153846153846156, '#d6ffe1'], [0.5384615384615384, '#fef4ac'], [0.6153846153846154, '#fed987'], [0.6923076923076923, '#fdb264'], [0.7692307692307693, '#f78249'], [0.8461538461538461, '#e75435'], [0.9230769230769231, '#cc2727'], [1.0, '#a50026']],
  43.     zauto=False,  # custom contour levels
  44.     zmin=-20,      # first contour level
  45.     zmax=20,        # last contour level  => colorscale is centered about 0
  46.  
  47.  
  48. colorbar= {
  49.     "borderwidth": 0,
  50.     "outlinewidth": 0,
  51.     "thickness": 15,
  52.     "tickfont": {"size": 14},
  53.     "title": "W/m²"}, #gives your legend some units                                                                    
  54.  
  55. contours= {
  56.     "end": 20,
  57.     "showlines": False,
  58.     "size": 2, #this is your contour interval
  59.     "start": -20}    
  60.  
  61. )    
  62.  
  63. # Make shortcut to Basemap object,
  64. # not specifying projection type for this example
  65. m = Basemap()
  66.  
  67. # Make trace-generating function (return a Scatter object)
  68. def make_scatter(x,y):
  69.     return Scatter(
  70.         x=x,
  71.         y=y,
  72.         mode='lines',
  73.         line=Line(color="black"),
  74.         name=' '  # no name on hover
  75.     )
  76.  
  77. # Functions converting coastline/country polygons to lon/lat traces
  78. def polygons_to_traces(poly_paths, N_poly):
  79.     '''
  80.   pos arg 1. (poly_paths): paths to polygons
  81.   pos arg 2. (N_poly): number of polygon to convert
  82.   '''
  83.     # init. plotting list
  84.     data = dict(
  85.         x=[],
  86.         y=[],
  87.         mode='lines',
  88.         line=Line(color="black"),
  89.         name=' '
  90.     )
  91.  
  92.     for i_poly in range(N_poly):
  93.         poly_path = poly_paths[i_poly]
  94.  
  95.         # get the Basemap coordinates of each segment
  96.         coords_cc = np.array(
  97.             [(vertex[0],vertex[1])
  98.              for (vertex,code) in poly_path.iter_segments(simplify=False)]
  99.         )
  100.  
  101.         # convert coordinates to lon/lat by 'inverting' the Basemap projection
  102.         lon_cc, lat_cc = m(coords_cc[:,0],coords_cc[:,1], inverse=True)
  103.  
  104.  
  105.         # add plot.ly plotting options
  106.         data['x'] = data['x'] + lon_cc.tolist() + [np.nan]
  107.         data['y'] = data['y'] + lat_cc.tolist() + [np.nan]
  108.  
  109.         # traces.append(make_scatter(lon_cc,lat_cc))
  110.  
  111.     return [data]
  112.  
  113. # Function generating coastline lon/lat traces
  114. def get_coastline_traces():
  115.     poly_paths = m.drawcoastlines().get_paths() # coastline polygon paths
  116.     N_poly = 91  # use only the 91st biggest coastlines (i.e. no rivers)
  117.     return polygons_to_traces(poly_paths, N_poly)
  118.  
  119. # Function generating country lon/lat traces
  120. def get_country_traces():
  121.     poly_paths = m.drawcountries().get_paths() # country polygon paths
  122.     N_poly = len(poly_paths)  # use all countries
  123.     return polygons_to_traces(poly_paths, N_poly)
  124.  
  125. # Get list of of coastline, country, and state lon/lat traces
  126. traces_cc = get_coastline_traces()+get_country_traces()
  127.  
  128. data = Data([trace1]+traces_cc)
  129.  
  130. title = u"Outgoing Longwave Radiation Anomalies<br>"
  131. anno_text = ""
  132. #anno_text = "Data courtesy of \
  133. #<a href='http://www.esrl.noaa.gov/psd/data/composites/day/'>\
  134. #NOAA Earth System Research Laboratory</a>"
  135.  
  136. axis_style = dict(
  137.     zeroline=False,
  138.     showline=False,
  139.     showgrid=False,
  140.     ticks='',
  141.     showticklabels=False,
  142. )
  143.  
  144. layout = Layout(
  145.     title=title,
  146.     showlegend=False,
  147.     hovermode="closest",        # highlight closest point on hover
  148.     xaxis=XAxis(
  149.         axis_style,
  150.         range=[lon[0],lon[-1]]  # restrict y-axis to range of lon
  151.     ),
  152.     yaxis=YAxis(
  153.         axis_style,
  154.     ),
  155.     annotations=Annotations([
  156.         Annotation(
  157.             text=anno_text,
  158.             xref='paper',
  159.             yref='paper',
  160.             x=0,
  161.             y=1,
  162.             yanchor='bottom',
  163.             showarrow=False
  164.         )
  165.     ]),
  166.     autosize=False,
  167.     width=1200,
  168.     height=800,
  169. )
  170.  
  171. fig = Figure(data=data, layout=layout)
  172. #py.iplot(fig, filename="NCEP OLR", width=1000)
  173. plot(fig, filename="NCEP_OLR.html")


Reproduced with original data:

Image
Attachments
NCEP_olr.png
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#36

An example code that uses SpiceyPy to locate the position of Cassini (the code is from here):

  1. #Below is an example that uses spiceypy to plot the position
  2. #of the Cassini spacecraft relative to the barycenter of Saturn.
  3. import numpy as np
  4. import matplotlib.pyplot as plt
  5. from mpl_toolkits.mplot3d import Axes3D
  6.  
  7. #First import spiceypy and test it out.
  8.  
  9. import spiceypy as spice
  10.  
  11. # Print out the toolkit version
  12. print(spice.tkvrsn("TOOLKIT"))
  13.  
  14. #You will need to download the following kernels from the NAIF
  15. #servers via the links provided. After the kernels have been
  16. #downloaded to a common directory write a metakernel
  17. #containing the file names for each downloaded kernel
  18.  
  19. import urllib.request
  20.  
  21. urllib.request.urlretrieve("https://naif.jpl.nasa.gov/pub/naif/generic_kernels/lsk/a_old_versions/naif0009.tls", 'naif0009.tls')
  22. urllib.request.urlretrieve("https://naif.jpl.nasa.gov/pub/naif/CASSINI/kernels/sclk/cas00084.tsc", 'cas00084.tsc')
  23. urllib.request.urlretrieve("https://naif.jpl.nasa.gov/pub/naif/CASSINI/kernels/pck/cpck05Mar2004.tpc", 'cpck05Mar2004.tpc')  
  24. urllib.request.urlretrieve("https://naif.jpl.nasa.gov/pub/naif/CASSINI/kernels/fk/release.11/cas_v37.tf", 'cas_v37.tf')  
  25. urllib.request.urlretrieve("https://naif.jpl.nasa.gov/pub/naif/CASSINI/kernels/ck/04135_04171pc_psiv2.bc", '04135_04171pc_psiv2.bc')  
  26. urllib.request.urlretrieve("https://naif.jpl.nasa.gov/pub/naif/CASSINI/kernels/spk/030201AP_SK_SM546_T45.bsp", '030201AP_SK_SM546_T45.bsp')  
  27. urllib.request.urlretrieve("https://naif.jpl.nasa.gov/pub/naif/CASSINI/kernels/ik/release.11/cas_iss_v09.ti", 'cas_iss_v09.ti')    
  28. urllib.request.urlretrieve("https://naif.jpl.nasa.gov/pub/naif/CASSINI/kernels/spk/020514_SE_SAT105.bsp", '020514_SE_SAT105.bsp')
  29. urllib.request.urlretrieve("https://naif.jpl.nasa.gov/pub/naif/CASSINI/kernels/spk/981005_PLTEPH-DE405S.bsp", '981005_PLTEPH-DE405S.bsp')
  30.  
  31. spice.furnsh("./naif0009.tls")  
  32. #spice.furnsh("./cas00084.tsc")
  33. spice.furnsh("./cpck05Mar2004.tpc")
  34. spice.furnsh("./cas_v37.tf")
  35. spice.furnsh("./04135_04171pc_psiv2.bc")
  36. spice.furnsh("./030201AP_SK_SM546_T45.bsp")
  37. #spice.furnsh("./cas_iss_v09.ti")
  38. #spice.furnsh("./020514_SE_SAT105.bsp")
  39. #spice.furnsh("./981005_PLTEPH-DE405S.bsp")
  40.  
  41. step = 4000
  42. # we are going to get positions between these two dates
  43. utc = ['Jun 20, 2004', 'Dec 1, 2005']
  44.  
  45. #Get et values one and two, we could vectorize str2et
  46. etOne = spice.str2et(utc[0])
  47. etTwo = spice.str2et(utc[1])
  48. print("ET One: {}, ET Two: {}".format(etOne, etTwo))
  49.  
  50. #Get times
  51. times = [x*(etTwo-etOne)/step + etOne for x in range(step)]
  52.  
  53. #Check first few times:
  54. print(times[0:3])
  55.  
  56. #Check the documentation on spkpos before continuing
  57. help(spice.spkpos)
  58.  
  59. #Run spkpos as a vectorized function
  60. positions, lightTimes = spice.spkpos('Cassini', times, 'J2000', 'NONE', 'SATURN BARYCENTER')
  61.  
  62. # Positions is a 3xN vector of XYZ positions
  63. print("Positions: ")
  64. print(positions[0])
  65.  
  66. # Light times is a N vector of time
  67. print("Light Times: ")
  68. print(lightTimes[0])
  69.  
  70. # Clean up the kernels
  71. spice.kclear()
  72.  
  73. #We will use matplotlib’s 3D plotting to visualize Cassini’s coordinates.
  74. #We first convert the positions list to a 2D numpy array for easier indexing in the plot.
  75.  
  76. positions = positions.T # positions is shaped (4000, 3), let's transpose to (3, 4000) for easier indexing
  77. fig = plt.figure(figsize=(9, 9))
  78. ax  = fig.add_subplot(111, projection='3d')
  79. ax.plot(positions[0], positions[1], positions[2])
  80. plt.title('SpiceyPy Cassini Position Example from Jun 20, 2004 to Dec 1, 2005')
  81. plt.show()

Attachments
Cassini_position.png
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#37

Folium is a Python library used for visualizing geospatial data. It is easy to use and yet a powerful library. Folium is a Python wrapper for Leaflet. js which is a leading open-source JavaScript library for plotting interactive maps.

Test Folium with the following codes (taken from this Jupyter notebook, see this kaggle post as well):

  1. import numpy as np
  2. import folium
  3. from folium import plugins
  4.  
  5. m = folium.Map(location=[35.68159659061569, 139.76451516151428], zoom_start=16)
  6.  
  7. # Lon, Lat order.
  8. lines = [
  9.     {
  10.         "coordinates": [
  11.             [139.76451516151428, 35.68159659061569],
  12.             [139.75964426994324, 35.682590062684206],
  13.         ],
  14.         "dates": ["2017-06-02T00:00:00", "2017-06-02T00:10:00"],
  15.         "color": "red",
  16.     },
  17.     {
  18.         "coordinates": [
  19.             [139.75964426994324, 35.682590062684206],
  20.             [139.7575843334198, 35.679505030038506],
  21.         ],
  22.         "dates": ["2017-06-02T00:10:00", "2017-06-02T00:20:00"],
  23.         "color": "blue",
  24.     },
  25.     {
  26.         "coordinates": [
  27.             [139.7575843334198, 35.679505030038506],
  28.             [139.76337790489197, 35.678040905014065],
  29.         ],
  30.         "dates": ["2017-06-02T00:20:00", "2017-06-02T00:30:00"],
  31.         "color": "green",
  32.         "weight": 15,
  33.     },
  34.     {
  35.         "coordinates": [
  36.             [139.76337790489197, 35.678040905014065],
  37.             [139.76451516151428, 35.68159659061569],
  38.         ],
  39.         "dates": ["2017-06-02T00:30:00", "2017-06-02T00:40:00"],
  40.         "color": "#FFFFFF",
  41.     },
  42. ]
  43.  
  44. features = [
  45.     {
  46.         "type": "Feature",
  47.         "geometry": {
  48.             "type": "LineString",
  49.             "coordinates": line["coordinates"],
  50.         },
  51.         "properties": {
  52.             "times": line["dates"],
  53.             "style": {
  54.                 "color": line["color"],
  55.                 "weight": line["weight"] if "weight" in line else 5,
  56.             },
  57.         },
  58.     }
  59.     for line in lines
  60. ]
  61.  
  62. plugins.TimestampedGeoJson(
  63.     {
  64.         "type": "FeatureCollection",
  65.         "features": features,
  66.     },
  67.     period="PT1M",
  68.     add_last_point=True,
  69. ).add_to(m)
  70.  
  71. display(m)



  1. import folium
  2. from folium import plugins
  3. import numpy as np
  4.  
  5. N = 100
  6. data = np.array(
  7.     [
  8.         np.random.uniform(low=35, high=60, size=N),  # Random latitudes in Europe.
  9.         np.random.uniform(low=-12, high=30, size=N),  # Random longitudes in Europe.
  10.     ]
  11. ).T
  12. popups = [str(i) for i in range(N)]  # Popups texts are simple numbers.
  13.  
  14. m = folium.Map([45, 3], zoom_start=4)
  15.  
  16. plugins.MarkerCluster(data, popups=popups).add_to(m)
  17.  
  18. display(m)



  1. import folium
  2. from folium import plugins
  3.  
  4. m = folium.Map([41.97, 2.81])
  5.  
  6. plugins.LocateControl().add_to(m)
  7.  
  8. # If you want get the user device positon after load the map, set auto_start=True
  9. plugins.LocateControl(auto_start=True).add_to(m)
  10. display(m)



  1. import folium
  2. from folium import plugins
  3.  
  4. table = """\
  5. <table style=\'width:100%\'>
  6.  <tr>
  7.    <th>Firstname</th>
  8.    <th>Lastname</th>
  9.    <th>Age</th>
  10.  </tr>
  11.  <tr>
  12.    <td>Jill</td>
  13.    <td>Smith</td>
  14.    <td>50</td>
  15.  </tr>
  16.  <tr>
  17.    <td>Eve</td>
  18.    <td>Jackson</td>
  19.    <td>94</td>
  20.  </tr>
  21. </table>
  22. """
  23.  
  24. points = [
  25.     {
  26.         "time": "2017-06-02",
  27.         "popup": "<h1>address1</h1>",
  28.         "coordinates": [-2.548828, 51.467697],
  29.     },
  30.     {
  31.         "time": "2017-07-02",
  32.         "popup": "<h2 style='color:blue;'>address2<h2>",
  33.         "coordinates": [-0.087891, 51.536086],
  34.     },
  35.     {
  36.         "time": "2017-08-02",
  37.         "popup": "<h2 style='color:orange;'>address3<h2>",
  38.         "coordinates": [-6.240234, 53.383328],
  39.     },
  40.     {
  41.         "time": "2017-09-02",
  42.         "popup": "<h2 style='color:green;'>address4<h2>",
  43.         "coordinates": [-1.40625, 60.261617],
  44.     },
  45.     {"time": "2017-10-02", "popup": table, "coordinates": [-1.516113, 53.800651]},
  46. ]
  47.  
  48. features = [
  49.     {
  50.         "type": "Feature",
  51.         "geometry": {
  52.             "type": "Point",
  53.             "coordinates": point["coordinates"],
  54.         },
  55.         "properties": {
  56.             "time": point["time"],
  57.             "popup": point["popup"],
  58.             "id": "house",
  59.             "icon": "marker",
  60.             "iconstyle": {
  61.                 "iconUrl": "https://leafletjs.com/examples/geojson/baseball-marker.png",
  62.                 "iconSize": [20, 20],
  63.             },
  64.         },
  65.     }
  66.     for point in points
  67. ]
  68.  
  69. features.append(
  70.     {
  71.         "type": "Feature",
  72.         "geometry": {
  73.             "type": "LineString",
  74.             "coordinates": [
  75.                 [-2.548828, 51.467697],
  76.                 [-0.087891, 51.536086],
  77.                 [-6.240234, 53.383328],
  78.                 [-1.40625, 60.261617],
  79.                 [-1.516113, 53.800651],
  80.             ],
  81.         },
  82.         "properties": {
  83.             "popup": "Current address",
  84.             "times": [
  85.                 "2017-06-02",
  86.                 "2017-07-02",
  87.                 "2017-08-02",
  88.                 "2017-09-02",
  89.                 "2017-10-02",
  90.             ],
  91.             "icon": "circle",
  92.             "iconstyle": {
  93.                 "fillColor": "green",
  94.                 "fillOpacity": 0.6,
  95.                 "stroke": "false",
  96.                 "radius": 13,
  97.             },
  98.             "style": {"weight": 0},
  99.             "id": "man",
  100.         },
  101.     }
  102. )
  103.  
  104. m = folium.Map(
  105.     location=[56.096555, -3.64746],
  106.     tiles="cartodbpositron",
  107.     zoom_start=5,
  108. )
  109.  
  110. plugins.TimestampedGeoJson(
  111.     {"type": "FeatureCollection", "features": features},
  112.     period="P1M",
  113.     add_last_point=True,
  114.     auto_play=False,
  115.     loop=False,
  116.     max_speed=1,
  117.     loop_button=True,
  118.     date_options="YYYY/MM/DD",
  119.     time_slider_drag_update=True,
  120.     duration="P2M",
  121. ).add_to(m)
  122.  
  123. display(m)



  1. import folium
  2. from folium import plugins
  3.  
  4. m = folium.Map(location=[0, 0], zoom_start=6)
  5.  
  6. fg = folium.FeatureGroup(name="groups")
  7. m.add_child(fg)
  8.  
  9. g1 = plugins.FeatureGroupSubGroup(fg, "group1")
  10. m.add_child(g1)
  11.  
  12. g2 = plugins.FeatureGroupSubGroup(fg, "group2")
  13. m.add_child(g2)
  14.  
  15. folium.Marker([-1, -1]).add_to(g1)
  16. folium.Marker([1, 1]).add_to(g1)
  17.  
  18. folium.Marker([-1, 1]).add_to(g2)
  19. folium.Marker([1, -1]).add_to(g2)
  20.  
  21. folium.LayerControl(collapsed=False).add_to(m)
  22.  
  23. display(m)

0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#38

openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files. It was born from lack of existing library to read/write natively from Python the Office Open XML format. Test it with this example (see more here):

  1. from openpyxl import Workbook
  2. wb = Workbook()
  3.  
  4. # grab the active worksheet
  5. ws = wb.active
  6.  
  7. # Data can be assigned directly to cells
  8. ws['A1'] = 42
  9. ws['F10'] = 99
  10.  
  11. # Rows can also be appended
  12. ws.append([1, 2, 3])
  13.  
  14. # Python types will automatically be converted
  15. import datetime
  16. ws['A2'] = datetime.datetime.now()
  17.  
  18. # Save the file
  19. wb.save("Test_sheet.xlsx")
  20.  
  21. #Read a spreadsheet
  22. import openpyxl
  23. #from openpyxl import load_workbook
  24. workbook = openpyxl.load_workbook("Test_sheet.xlsx") #Or load_workbook(filename="Test_sheet.xlsx")
  25. print(workbook.sheetnames)
  26. sheet = workbook.active
  27. print(sheet)
  28. print(sheet.title)
  29.  
  30. #Retrieve some values
  31. print(sheet["A1"])
  32.  
  33. print(sheet["A1"].value)
  34.  
  35. print(sheet["F10"].value)

0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#39

ConfigParser class implements a basic configuration language which provides a structure similar to what’s found in Microsoft Windows INI files. It is very useful for writing Python programs which can be customized by end users easily (See more examples here). Run this code here.


  1. import configparser
  2. config = configparser.ConfigParser()
  3.  
  4. config['DEFAULT'] = {'ServerAliveInterval': '45', 'Compression': 'yes', 'CompressionLevel': '9'}
  5. config['bitbucket.org'] = {}
  6. config['bitbucket.org']['User'] = 'hg'
  7. config['topsecret.server.com'] = {}
  8. topsecret = config['topsecret.server.com']
  9. topsecret['Port'] = '50022'     # mutates the parser
  10. topsecret['ForwardX11'] = 'no'  # same here
  11. config['DEFAULT']['ForwardX11'] = 'yes'
  12. with open('example.ini', 'w') as configfile:
  13.     config.write(configfile)
  14.    
  15. config.sections()
  16.  
  17. config.read('example.ini')
  18. print(config.sections())
  19.  
  20. config['bitbucket.org']['User']
  21. config['DEFAULT']['Compression']
  22.  
  23. topsecret = config['topsecret.server.com']
  24. print(topsecret)
  25. topsecret['ForwardX11']
  26.  
  27. print(topsecret['Port'])
  28.  
  29. for key in config['bitbucket.org']:  
  30.     print(key)
  31.  
  32. config['bitbucket.org']['ForwardX11']

0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#40

Here is a demo code (from here) that illustrates how to automate the boring excel report with OpenPyXL and Python. Run this code here.


  1. #Loading our Libraries
  2. import pandas as pd
  3.  
  4. from openpyxl import load_workbook
  5. from openpyxl.styles import Font
  6. from openpyxl.chart import BarChart, Reference
  7.  
  8. #Loading our Data
  9. df = pd.read_excel('https://github.com/datagy/pivot_table_pandas/raw/master/sample_pivot.xlsx', parse_dates=['Date'])
  10. print(df.head())
  11.  
  12. #Testing Pivot Tables
  13. filtered = df[df['Region'] == 'East']
  14. quarterly_sales = pd.pivot_table(filtered, index = filtered['Date'].dt.quarter, columns = 'Type', values = 'Sales', aggfunc='sum')
  15.  
  16. print("Quarterly Sales Pivot Table:")
  17. print(quarterly_sales.head())
  18.  
  19. #Creating an Excel Workbook
  20. file_path = "./sample_pivot.xlsx" #Path to where you want your file saved
  21. quarterly_sales.to_excel(file_path, sheet_name = 'Quarterly Sales', startrow=3)
  22.  
  23. #Loading the Workbook
  24. wb = load_workbook(file_path)
  25. sheet1 = wb['Quarterly Sales']
  26.  
  27. # Section 06 - Formatting the First Sheet
  28. sheet1['A1'] = 'Quarterly Sales'
  29. sheet1['A2'] = 'datagy.io'
  30. sheet1['A4'] = 'Quarter'
  31.  
  32. sheet1['A1'].style = 'Title'
  33. sheet1['A2'].style = 'Headline 2'
  34.  
  35. for i in range(5, 9):
  36.     sheet1[f'B{i}'].style='Currency'
  37.     sheet1[f'C{i}'].style='Currency'
  38.     sheet1[f'D{i}'].style='Currency'
  39.  
  40. # Section 07 - Adding a Bar Chart
  41. bar_chart = BarChart()
  42. data = Reference(sheet1, min_col=2, max_col=4, min_row=4, max_row=8)
  43. categories = Reference(sheet1, min_col=1, max_col=1, min_row=5, max_row=8)
  44. bar_chart.add_data(data, titles_from_data=True)
  45. bar_chart.set_categories(categories)
  46. sheet1.add_chart(bar_chart, "F4")
  47.  
  48. bar_chart.title = 'Sales by Type'
  49. bar_chart.style = 3
  50. wb.save(filename = file_path)



The output is:


0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Technologies for Teaching, Learning, Research, Problem Solving and Business”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests