Size Category Style

Helper function for quickly creating a size category style. Use help(size_category_style) to get more information.


In [1]:
from cartoframes.auth import set_default_credentials

set_default_credentials('cartoframes')

In [2]:
from cartoframes.viz import Layer, size_category_style

Layer('roads', size_category_style('type'))


Out[2]:
:
StackTrace
    ">
    
    
    In [3]:
    Layer(
        'roads',
        size_category_style(
            'type',
            cat=['Major Highway', 'Secondary Highway', 'Track', 'Ferry'],
            size_range=[5,3,2,1]
        )
    )
    
    
    
    
    Out[3]:
    :
    StackTrace
      ">