<commit_before>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Publish a visualization from a public table\n",
    "\n",
    "This example illustrate how to publish a visualization using a public table. Using public tables does not require to create Maps API keys for the visualization.\n",
    "\n",
    "Read more about Maps API Keys: https://carto.com/developers/auth-api/guides/types-of-API-Keys/\n",
    "\n",
    "> Note: CARTO Account credentials are needed to reproduce this example. https://carto.com/signup"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from cartoframes.auth import set_default_credentials\n",
    "\n",
    "set_default_credentials('creds.json')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from cartoframes.viz import Map, Layer\n",
    "\n",
    "map_viz = Map(Layer('public_table'))"<commit_msg>Add more information about public tables publication<commit_after>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Publish a visualization from a public table\n",
    "\n",
    "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.\n",
    "\n",
    "Read more about API Keys here: https://carto.com/developers/auth-api/guides/types-of-API-Keys/\n",
    "\n",
    "> Note: CARTO Account credentials are needed to reproduce this example. https://carto.com/signup"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from cartoframes.auth import set_default_credentials\n",
    "\n",
    "set_default_credentials('creds.json')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from cartoframes.viz import Map, Layer\n",
    "\n",
    "map_viz = Map(Layer('public_table'))"
{'fraction_non_alphanumeric': 0.1589648798521257, 'fraction_numerical': 0.0018484288354898336, 'mean_word_length': 3.1634615384615383, 'pattern_counts': {'":': 28, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6615044', 'n_tokens_mistral': 727, 'n_tokens_neox': 700, 'n_words': 201}