Publish a visualization from a public table

This example illustrates how to publish a visualization using a public table. You do not need a Maps API key to visualize a public table within a notebook. However you do need an API Key to publish any visualization, whether its data is public or private.

Read more about API Keys here: https://carto.com/developers/auth-api/guides/types-of-API-Keys/

Note: CARTO Account credentials are needed to reproduce this example. https://carto.com/signup


In [1]:
from cartoframes.auth import set_default_credentials

set_default_credentials('creds.json')

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

map_viz = Map(Layer('public_table'))

In [3]:
map_viz.publish(
    name='map_public_table',
    password=None,
    if_exists='replace')


Out[3]:
{'id': '61ccd727-9716-4d5d-84a1-490cdd4f4aec',
 'url': 'https://cartoframes-org.carto.com/u/cartoframes/kuviz/61ccd727-9716-4d5d-84a1-490cdd4f4aec',
 'name': 'map_public_table',
 'privacy': 'public'}