{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# pip install colorcet" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "import folium\n", "import matplotlib\n", "import numpy as np\n", "import colorcet\n", "from matplotlib.pyplot import imread\n", "from matplotlib.colors import Normalize\n", "from matplotlib.colors import ListedColormap\n", "from folium import raster_layers\n", "# from folium import plugins\n", "# from folium import branca" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "image = '/notebooks/resources/gpm/gpm_1d.20190531.tif'" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "10.0 -180.0\n", "-60.0 -180.0\n", "-60.0 -30.0\n", "10.0 -30.0\n", "ext = [[10.0, -180.0], [-60.0, -180.0], [-60.0, -30.0], [10.0, -30.0]]\n", "geo_ext = [[10.0, -180.0], [-60.0, -180.0], [-60.0, -30.0], [10.0, -30.0]]\n" ] } ], "source": [ "from osgeo import gdal,ogr,osr\n", "\n", "def GetExtent(gt,cols,rows):\n", " ''' Return list of corner coordinates from a geotransform\n", "\n", " @type gt: C{tuple/list}\n", " @param gt: geotransform\n", " @type cols: C{int}\n", " @param cols: number of columns in the dataset\n", " @type rows: C{int}\n", " @param rows: number of rows in the dataset\n", " @rtype: C{[float,...,float]}\n", " @return: coordinates of each corner\n", " '''\n", " ext=[]\n", " xarr=[0,cols]\n", " yarr=[0,rows]\n", "\n", " for px in xarr:\n", " for py in yarr:\n", " x=gt[0]+(px*gt[1])+(py*gt[2])\n", " y=gt[3]+(px*gt[4])+(py*gt[5])\n", " ext.append([y,x])\n", " print (y,x)\n", " yarr.reverse()\n", " return ext\n", "\n", "def ReprojectCoords(coords,src_srs,tgt_srs):\n", " ''' Reproject a list of x,y coordinates.\n", "\n", " @type geom: C{tuple/list}\n", " @param geom: List of [[x,y],...[x,y]] coordinates\n", " @type src_srs: C{osr.SpatialReference}\n", " @param src_srs: OSR SpatialReference object\n", " @type tgt_srs: C{osr.SpatialReference}\n", " @param tgt_srs: OSR SpatialReference object\n", " @rtype: C{tuple/list}\n", " @return: List of transformed [[x,y],...[x,y]] coordinates\n", " '''\n", " trans_coords=[]\n", " transform = osr.CoordinateTransformation( src_srs, tgt_srs)\n", " for x,y in coords:\n", " x,y,z = transform.TransformPoint(x,y)\n", " trans_coords.append([x,y])\n", " return trans_coords\n", "\n", "raster=image\n", "ds=gdal.Open(raster)\n", "\n", "gt=ds.GetGeoTransform()\n", "cols = ds.RasterXSize\n", "rows = ds.RasterYSize\n", "\n", "ext=GetExtent(gt,cols,rows)\n", "print(\"ext = \" + str(ext))\n", "\n", "src_srs=osr.SpatialReference()\n", "src_srs.ImportFromWkt(ds.GetProjection())\n", "# tgt_srs=osr.SpatialReference()\n", "# tgt_srs.ImportFromEPSG(3857)\n", "tgt_srs = src_srs.CloneGeogCS()\n", "\n", "geo_ext=ReprojectCoords(ext,src_srs,tgt_srs)\n", "print(\"geo_ext = \" + str(geo_ext))" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Driver: GTiff/GeoTIFF\r\n", "Files: /notebooks/resources/gpm/gpm_1d.20190531.tif\r\n", "Size is 1500, 700\r\n", "Coordinate System is:\r\n", "GEOGCS[\"WGS 84\",\r\n", " DATUM[\"WGS_1984\",\r\n", " SPHEROID[\"WGS 84\",6378137,298.2572326660159,\r\n", " AUTHORITY[\"EPSG\",\"7030\"]],\r\n", " AUTHORITY[\"EPSG\",\"6326\"]],\r\n", " PRIMEM[\"Greenwich\",0],\r\n", " UNIT[\"degree\",0.0174532925199433],\r\n", " AUTHORITY[\"EPSG\",\"4326\"]]\r\n", "Origin = (-180.000000000000000,10.000000000000000)\r\n", "Pixel Size = (0.100000000000000,-0.100000000000000)\r\n", "Metadata:\r\n", " AREA_OR_POINT=Area\r\n", " TIFFTAG_DATETIME=2019:06:01 13:35:13\r\n", " TIFFTAG_DOCUMENTNAME=/NRTPUB/imerg/gis/2019/05/3B-HHR-L.MS.MRG.3IMERG.20190531-S233000-E235959.1410.V06B.1day.tif\r\n", " TIFFTAG_IMAGEDESCRIPTION=DOI=10.5067/GPM/IMERG/3B-HH-L/06 DOIauthority=http://dx.doi.org/ DOIshortName=3IMERGHH_LATE Unit=0.1(mm) ScaleFactor=10\r\n", " TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)\r\n", " TIFFTAG_SOFTWARE=IDL 8.7.2, Harris Geospatial Solutions, Inc.\r\n", " TIFFTAG_XRESOLUTION=100\r\n", " TIFFTAG_YRESOLUTION=100\r\n", "Image Structure Metadata:\r\n", " COMPRESSION=LZW\r\n", " INTERLEAVE=BAND\r\n", "Corner Coordinates:\r\n", "Upper Left (-180.0000000, 10.0000000) (180d 0' 0.00\"W, 10d 0' 0.00\"N)\r\n", "Lower Left (-180.0000000, -60.0000000) (180d 0' 0.00\"W, 60d 0' 0.00\"S)\r\n", "Upper Right ( -30.0000000, 10.0000000) ( 30d 0' 0.00\"W, 10d 0' 0.00\"N)\r\n", "Lower Right ( -30.0000000, -60.0000000) ( 30d 0' 0.00\"W, 60d 0' 0.00\"S)\r\n", "Center (-105.0000000, -25.0000000) (105d 0' 0.00\"W, 25d 0' 0.00\"S)\r\n", "Band 1 Block=1500x2 Type=UInt16, ColorInterp=Gray\r\n" ] } ], "source": [ "!gdalinfo '/notebooks/resources/gpm/gpm_1d.20190531.tif'" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# !gdal_edit -colorinterp_1 alpha /notebooks/resources/gpm/gpm_1d.20190531.tif" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Choose colormap\n", "cmap = colorcet.cm.fire\n", "\n", "# Get the colormap colors\n", "my_cmap = cmap(np.arange(cmap.N))\n", "\n", "\n", "# Set alpha\n", "my_cmap[:,-1] = np.linspace(0, 1, cmap.N)\n", "\n", "# Create new colormap\n", "my_cmap = ListedColormap(my_cmap)\n", "\n" ] }, { "cell_type": "code", "execution_count": 30, "metadata": { "scrolled": false }, "outputs": [ { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "m = folium.Map(\n", " location = [-22, -114]\n", " , zoom_start = 2\n", " , control_scale = True \n", " , tiles = 'Stamen Terrain'\n", ")\n", "\n", "data = matplotlib.pyplot.imread(image)\n", "\n", "# Image bounds on the map in the form\n", "# [[lat_min, lon_min], [lat_max, lon_max]]\n", "m.add_child(raster_layers.ImageOverlay(\n", " data\n", " , opacity = 0.7\n", " , bounds = [ext[2], ext[0]]\n", " , mercator_project = True\n", "# , colormap = lambda x: (1, 0, 0, x)\n", " , colormap = colorcet.cm.fire\n", "# , colormap = branca.colormap.linear.PuBuGn_07.scale(0,700)\n", "# , colormap = my_cmap\n", ")\n", " )\n", "\n", "folium.Marker(\n", " ext[2]\n", " , popup = str(ext[2])\n", " , tooltip = str(ext[2])\n", ").add_to(m)\n", "\n", "folium.Marker(\n", " ext[0]\n", " , popup = str(ext[0])\n", " , tooltip = str(ext[0])\n", ").add_to(m)\n", "\n", "m" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "vars(m)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(data)\n", "print(data.shape)\n", "# data = data.transpose()\n", "# print(data)\n", "# print(data.shape)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# First: read the geotiff image with GDAL.\n", "from osgeo import gdal, osr\n", "\n", "gdal.UseExceptions()\n", "\n", "ds = gdal.Open(image)\n", "data = ds.ReadAsArray()\n", "gt = ds.GetGeoTransform()\n", "proj = ds.GetProjection()\n", "\n", "inproj = osr.SpatialReference()\n", "inproj.ImportFromWkt(proj)\n", "\n", "print('\\n\\n## ds ##:\\n\\n' + str(ds))\n", "print('\\n\\n## data ##:\\n\\n' + str(data))\n", "print('\\n\\n## gt ##:\\n\\n' + str(gt))\n", "print('\\n\\n## proj ##:\\n\\n' + str(proj))\n", "print('\\n\\n## inproj ##:\\n\\n' + str(inproj))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "q = lambda x: (0, 0, 0, 0)\n", "print(q(0))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "cmap = colorcet.cm.bmw\n", "\n", "rgba = cmap(0.5)\n", "print(rgba) # (0.99807766255210428, 0.99923106502084169, 0.74602077638401709, 1.0\n", "print(rgba[:-1])\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pylab as pl\n", "from matplotlib.colors import ListedColormap\n", "\n", "# Random data\n", "data1 = np.random.random((4,4))\n", "\n", "# Choose colormap\n", "cmap = pl.cm.RdBu\n", "\n", "# Get the colormap colors\n", "my_cmap = cmap(np.arange(cmap.N))\n", "\n", "# Set alpha\n", "my_cmap[:,-1] = np.linspace(0, 1, cmap.N)\n", "\n", "# Create new colormap\n", "my_cmap = ListedColormap(my_cmap)\n", "\n", "pl.figure()\n", "pl.subplot(121)\n", "pl.pcolormesh(data1, cmap=pl.cm.RdBu)\n", "pl.colorbar()\n", "\n", "pl.subplot(122)\n", "pl.pcolormesh(data1, cmap=my_cmap)\n", "pl.colorbar()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Choose colormap\n", "cmap = colorcet.cm.fire\n", "\n", "# Get the colormap colors\n", "my_cmap = cmap(np.arange(cmap.N))\n", "\n", "print(my_cmap)\n", "\n", "# Set alpha\n", "my_cmap[:,-1] = np.linspace(0, 1, cmap.N)\n", "\n", "# Create new colormap\n", "my_cmap = ListedColormap(my_cmap)\n", "\n", "pl.figure()\n", "pl.subplot(121)\n", "pl.pcolormesh(data1, cmap=colorcet.cm.fire)\n", "pl.colorbar()\n", "\n", "pl.subplot(122)\n", "pl.pcolormesh(data1, cmap=my_cmap)\n", "pl.colorbar()" ] }, { "cell_type": "code", "execution_count": 31, "metadata": { "scrolled": false }, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Set3_030.01.0
Pastel2_080.01.0
RdGy_060.01.0
BuGn_080.01.0
BuGn_090.01.0
Oranges_030.01.0
PuRd_030.01.0
RdBu_110.01.0
Blues_060.01.0
Pastel2_050.01.0
BrBG_080.01.0
Pastel1_060.01.0
PRGn_060.01.0
Set3_100.01.0
PuBuGn_070.01.0
PuOr_110.01.0
Reds_090.01.0
PuBuGn_090.01.0
PuBuGn_080.01.0
PuRd_040.01.0
GnBu_060.01.0
RdYlBu_070.01.0
PRGn_090.01.0
Paired_120.01.0
Spectral_060.01.0
BrBG_070.01.0
Accent_030.01.0
Spectral_090.01.0
Accent_040.01.0
Reds_060.01.0
YlOrBr_030.01.0
PuOr_070.01.0
Greys_070.01.0
YlGn_050.01.0
YlGnBu_090.01.0
RdGy_100.01.0
YlOrBr_060.01.0
RdYlGn_110.01.0
RdYlGn_090.01.0
PuRd_090.01.0
YlGnBu_060.01.0
Accent_060.01.0
BrBG_050.01.0
Dark2_040.01.0
Oranges_070.01.0
PiYG_080.01.0
RdYlBu_050.01.0
Oranges_060.01.0
Purples_030.01.0
YlGnBu_040.01.0
BuPu_070.01.0
Dark2_030.01.0
Purples_060.01.0
RdPu_070.01.0
PRGn_040.01.0
YlOrBr_040.01.0
BrBG_030.01.0
YlGn_030.01.0
Spectral_040.01.0
Accent_050.01.0
GnBu_030.01.0
YlOrBr_080.01.0
PuBuGn_050.01.0
RdGy_050.01.0
PuBuGn_040.01.0
PuBuGn_060.01.0
RdPu_030.01.0
OrRd_040.01.0
Set3_050.01.0
YlOrRd_090.01.0
Greens_070.01.0
PuBuGn_030.01.0
PuOr_080.01.0
Paired_040.01.0
Set3_080.01.0
Reds_070.01.0
BrBG_040.01.0
Set2_050.01.0
PuBu_080.01.0
PiYG_030.01.0
PuBu_070.01.0
Set2_070.01.0
Pastel1_080.01.0
BuPu_050.01.0
Oranges_080.01.0
PuOr_050.01.0
BuGn_030.01.0
Greens_090.01.0
YlOrRd_070.01.0
Purples_090.01.0
Greys_080.01.0
Pastel1_050.01.0
OrRd_050.01.0
Oranges_040.01.0
viridis0.01.0
Pastel1_030.01.0
YlOrRd_060.01.0
RdYlBu_040.01.0
Dark2_050.01.0
Set3_120.01.0
RdPu_080.01.0
Greens_060.01.0
PuRd_080.01.0
PRGn_050.01.0
YlGn_060.01.0
Blues_070.01.0
Set3_090.01.0
PuBu_050.01.0
PuBu_060.01.0
Pastel2_040.01.0
YlOrBr_090.01.0
OrRd_060.01.0
RdYlGn_050.01.0
PuRd_070.01.0
Pastel1_070.01.0
Purples_070.01.0
OrRd_070.01.0
Pastel2_030.01.0
YlOrBr_050.01.0
BrBG_060.01.0
Set1_080.01.0
Set3_070.01.0
YlGnBu_080.01.0
GnBu_050.01.0
Dark2_070.01.0
Pastel1_090.01.0
Set1_090.01.0
Greys_060.01.0
PuOr_030.01.0
RdGy_090.01.0
PuBu_030.01.0
Blues_090.01.0
Accent_080.01.0
YlGn_040.01.0
RdGy_070.01.0
Blues_030.01.0
YlOrRd_080.01.0
Greens_080.01.0
Paired_060.01.0
PiYG_040.01.0
Greys_040.01.0
Oranges_050.01.0
Set2_040.01.0
PuBu_040.01.0
Paired_030.01.0
Spectral_070.01.0
RdYlGn_070.01.0
RdGy_080.01.0
Paired_050.01.0
BrBG_110.01.0
YlGn_080.01.0
Set2_080.01.0
PRGn_030.01.0
Greens_050.01.0
Pastel2_060.01.0
Paired_100.01.0
PuOr_040.01.0
BuPu_060.01.0
Greys_090.01.0
Blues_040.01.0
Paired_090.01.0
PRGn_110.01.0
YlGnBu_050.01.0
RdBu_080.01.0
PiYG_060.01.0
BrBG_100.01.0
Dark2_080.01.0
RdPu_040.01.0
Spectral_080.01.0
YlOrRd_050.01.0
Paired_110.01.0
YlGnBu_030.01.0
YlOrBr_070.01.0
Dark2_060.01.0
RdYlGn_100.01.0
OrRd_030.01.0
Set1_050.01.0
Reds_030.01.0
Pastel1_040.01.0
Accent_070.01.0
Purples_050.01.0
Spectral_110.01.0
YlGn_090.01.0
BuPu_030.01.0
PiYG_070.01.0
PRGn_100.01.0
Set2_060.01.0
Set1_030.01.0
RdGy_040.01.0
Set1_070.01.0
BuGn_040.01.0
RdBu_040.01.0
RdYlGn_040.01.0
PuRd_050.01.0
BrBG_090.01.0
Set3_110.01.0
Blues_080.01.0
GnBu_080.01.0
RdYlGn_060.01.0
PuOr_090.01.0
GnBu_040.01.0
OrRd_090.01.0
RdYlBu_080.01.0
PuBu_090.01.0
RdPu_090.01.0
BuPu_080.01.0
Blues_050.01.0
Purples_040.01.0
RdBu_060.01.0
RdYlBu_100.01.0
BuPu_040.01.0
PuRd_060.01.0
PRGn_070.01.0
RdBu_030.01.0
BuPu_090.01.0
Set3_060.01.0
RdBu_100.01.0
YlGn_070.01.0
YlOrRd_030.01.0
BuGn_070.01.0
RdBu_090.01.0
RdBu_050.01.0
Pastel2_070.01.0
RdYlGn_030.01.0
PiYG_050.01.0
OrRd_080.01.0
Paired_080.01.0
Spectral_030.01.0
PuOr_100.01.0
YlGnBu_070.01.0
RdYlBu_110.01.0
BuGn_060.01.0
Oranges_090.01.0
Spectral_100.01.0
RdBu_070.01.0
Paired_070.01.0
RdYlBu_030.01.0
RdPu_060.01.0
RdYlGn_080.01.0
PRGn_080.01.0
GnBu_090.01.0
RdGy_110.01.0
Greens_030.01.0
Greens_040.01.0
Purples_080.01.0
Set1_040.01.0
Set2_030.01.0
RdGy_030.01.0
Reds_080.01.0
YlOrRd_040.01.0
Reds_050.01.0
Set3_040.01.0
BuGn_050.01.0
RdYlBu_090.01.0
Set1_060.01.0
PuOr_060.01.0
Greys_030.01.0
Greys_050.01.0
RdPu_050.01.0
PiYG_110.01.0
RdYlBu_060.01.0
GnBu_070.01.0
Reds_040.01.0
PiYG_090.01.0
Spectral_050.01.0
PiYG_100.01.0
\n", " " ], "text/plain": [ "" ] }, "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "branca.colormap.linear" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "4699" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.max(data)" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "700" ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(data)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2" } }, "nbformat": 4, "nbformat_minor": 2 }