diff --git a/cartoframes/__version__.py b/cartoframes/__version__.py index 346d55961..d2cd642a7 100644 --- a/cartoframes/__version__.py +++ b/cartoframes/__version__.py @@ -1 +1 @@ -__version__ = '0.2.3b3' +__version__ = '0.2.4b4' diff --git a/cartoframes/layer.py b/cartoframes/layer.py index ec8259a7b..baab223d4 100644 --- a/cartoframes/layer.py +++ b/cartoframes/layer.py @@ -42,7 +42,7 @@ class BaseMap(AbstractLayer): Args: source (str, optional): One of ``light`` or ``dark``. Defaults to - ``dark``. Basemaps come from + ``voyager``. Basemaps come from https://carto.com/location-data-services/basemaps/ labels (str, optional): One of ``back``, ``front``, or None. Labels on the front will be above the data layers. Labels on back will be @@ -157,10 +157,10 @@ class QueryLayer(AbstractLayer): `__ for more information. time (dict or str, optional): Style to apply to layer. - If `time` is a `dict`, the following keys are options: + If `time` is a :obj:`dict`, the following keys are options: - column (str, required): Column for animating map from. Data must - be of type time or float. + be of type `datetime` or `float`. - method (str, optional): Type of aggregation method for operating on `Torque TileCubes `__. Must be one of ``avg``, ``sum``, or another `PostgreSQL aggregate @@ -168,7 +168,7 @@ class QueryLayer(AbstractLayer): `__ with a numeric output. Defaults to ``count``. - cumulative (bool, optional): Whether to accumulate points over - time (True) or not (False, default) + time (``True``) or not (``False``, default) - frames (int, optional): Number of frames in the animation. Defaults to 256. - duration (int, optional): Number of seconds in the animation. @@ -176,11 +176,11 @@ class QueryLayer(AbstractLayer): - trails (int, optional): Number of trails after the incidence of a point. Defaults to 2. - If `time` is a ``str``, then it must be a column name available in + If `time` is a :obj:`str`, then it must be a column name available in the query that is of type numeric or datetime. color (dict or str, optional): Color style to apply to map. - If `color` is a ``dict``, the following keys are options, with + If `color` is a :obj:`dict`, the following keys are options, with values described: - column (str): Column to base coloring from. @@ -195,7 +195,7 @@ class QueryLayer(AbstractLayer): the `bin_method`. Defaults to 5. size (dict or int, optional): Size style to apply to point data. - If `size` is a ``dict``, the follow keys are options, with values + If `size` is a :obj:`dict`, the follow keys are options, with values described as: - column (str): Column to base sizing of points on @@ -501,65 +501,7 @@ class Layer(QueryLayer): color={'column': 'mr_fox_sightings', 'scheme': styling.prism(10)})]) - Args: - table_name (str): Table in user CARTO account that is fed into a - pandas DataFrame. - source (pandas.DataFrame, optional): If specified, writes DataFrame - to the tablename specified (if it does not exist), then creates - a map layer. - overwrite (bool, optional): If ``table_name`` exists in user's CARTO - account, setting this to `True` will overwrite it. Defaults to - `False` (do not overwrite). - time (dict or str, optional): Style to apply to layer. - If `time` is a `dict`, the following keys are options: - - - column (str, required): Column for animating map from. Data must - be of type time or float. - - method (str, optional): Type of aggregation method for operating - on `Torque TileCubes `__. Must - be one of ``avg``, ``sum``, or another `PostgreSQL aggregate - functions - `__ - with a numeric output. Defaults to ``count``. - - cumulative (bool, optional): Whether to accumulate points over - time (True) or not (False, default) - - frames (int, optional): Number of frames in the animation. - Defaults to 256. - - duration (int, optional): Number of seconds in the animation. - Defaults to 30. - - If `time` is a ``str``, then it must be a column name available in - the query that is of type numeric or datetime. - color (dict or str, optional): Color style to apply to map. - If `color` is a ``dict``, the following keys are options, with - values described: - - - column (str): Column to base coloring from. - - scheme (str, optinal): Color scheme from - `CartoColors - `__. - Defaults to `Mint`. - - bin_method (str, optional): Quantification method for dividing - data range into bins. Must be one of: ``quantiles``, ``equal``, - ``headtails``, or ``jenks``. Defaults to ``quantiles``. - - bins (int, optional): Number of bins to divide data amongst in - the `bin_method`. Defaults to 5. - size (dict or int, optional): Size style to apply to point data. - If `size` is a ``dict``, the follow keys are options, with values - described as: - - - column (str): Column to base sizing of points on - - bin_method (str, optional): Quantification method for dividing - data range into bins. Must be one of: ``quantiles``, ``equal``, - ``headtails``, or ``jenks``. Defaults to ``quantiles``. - - bins (int, optional): Number of bins to break data into. Defaults - to 5. - - max (int, optional): Maximum point width (in pixels). Defaults to - 25. - - min (int, optional): Minimum point width (in pixels). Defaults to - 5. - tooltip (tuple of str, optional): **Not implemented.** - legend: **Not implemented.** + **Parameters:** See :obj:`QueryLayer` for a full list of arguments. """ def __init__(self, table_name, source=None, overwrite=False, time=None, color=None, size=None, tooltip=None, legend=None): diff --git a/docs/_sources/index.rst.txt b/docs/_sources/index.rst.txt index ecb46d531..83ce90fee 100644 --- a/docs/_sources/index.rst.txt +++ b/docs/_sources/index.rst.txt @@ -9,12 +9,12 @@ :maxdepth: 2 :caption: Contents: -CARTOFrames Methods -=================== +CARTOFrames Functionality +========================= -CartoContext Class ------------------- -.. automodule:: context +CartoContext +------------ +.. autoclass:: context.CartoContext :members: Map Layer Classes @@ -27,6 +27,11 @@ Map Styling Functions .. automodule:: styling :members: +BatchJobStatus +-------------- +.. autoclass:: context.BatchJobStatus + :members: + Credentials Management ---------------------- .. automodule:: credentials diff --git a/docs/cartoframes.context.html b/docs/cartoframes.context.html index 6e7a7df82..2396e07e0 100644 --- a/docs/cartoframes.context.html +++ b/docs/cartoframes.context.html @@ -40,16 +40,92 @@

cartoframes.context module

-

CartoContext class for authentication with CARTO and high-level operations -such as reading tables from CARTO into dataframes, writing dataframes to CARTO -tables, and creating custom maps from dataframes and CARTO tables. Future -methods interact with CARTO’s services like -Data Observatory, and routing, -geocoding, and isolines.

+

CartoContext and BatchJobStatus classes

+
+
+class cartoframes.context.BatchJobStatus(carto_context, job)
+

Bases: object

+

Status of a write or query operation. Read more at Batch SQL API docs about +responses and how to interpret them.

+

Example

+

Poll for a job’s status if you’ve caught the BatchJobStatus +instance.

+
import time
+job = cc.write(df, 'new_table',
+               lnglat=('lng_col', 'lat_col'))
+while True:
+    curr_status = job.status()['status']
+    if curr_status in ('done', 'failed', 'canceled', 'unknown', ):
+        print(curr_status)
+        break
+    time.sleep(5)
+
+
+

Create a BatchJobStatus instance if you have a job_id output +from a cc.write operation.

+
>>> from cartoframes import CartoContext, BatchJobStatus
+>>> cc = CartoContext(username='...', api_key='...')
+>>> cc.write(df, 'new_table', lnglat=('lng', 'lat'))
+'BatchJobStatus(job_id='job-id-string', ...)'
+>>> batch_job = BatchJobStatus(cc, 'job-id-string')
+
+
+
+
Attrs:
+
job_id (str): Job ID of the Batch SQL API job +last_status (str): Status of job_id job when last polled +created_at (str): Time and date when job was created
+
+ +++ + + + +
Parameters:
    +
  • carto_context (carto.CartoContext) – CartoContext instance
  • +
  • job (dict or str) – If a dict, job status dict returned after sending +a Batch SQL API request. If str, a Batch SQL API job id.
  • +
+
+
+
+get_status()
+

return current status of job

+
+ +
+
+status()
+

Checks the current status of job job_id

+ +++ + + + + + + + +
Returns:Status and time it was updated
Return type:dict
Warns:UserWarning – If the job failed, a warning is raised with +information about the failure
+
+ +
+
class cartoframes.context.CartoContext(base_url=None, api_key=None, creds=None, session=None, verbose=0)

Bases: object

+

CartoContext class for authentication with CARTO and high-level operations +such as reading tables from CARTO into dataframes, writing dataframes to +CARTO tables, and creating custom maps from dataframes and CARTO tables. +Future methods interact with CARTO’s services like +Data Observatory, and routing, +geocoding, and isolines.

Manages connections with CARTO for data and map operations. Modeled after SparkContext.

Example

@@ -58,6 +134,10 @@ cc = cartoframes.CartoContext(BASEURL, APIKEY)
+
+
Attrs:
+
creds (cartoframes.Credentials): Credentials instance
+
@@ -70,7 +150,7 @@
  • api_key (str) – CARTO API key.
  • session (requests.Session, optional) – requests session. See requests documentation -for more information:
  • +for more information.
  • verbose (bool, optional) – Output underlying process states (True), or suppress (False, default)
  • @@ -183,7 +263,7 @@
    delete(table_name)
    -

    Delete table

    +

    Delete a table in user’s CARTO account.

    @@ -353,12 +433,21 @@
    -write(df, table_name, temp_dir='/tmp', overwrite=False, lnglat=None, encode_geom=False, geom_col=None)
    +write(df, table_name, temp_dir='/tmp', overwrite=False, lnglat=None, encode_geom=False, geom_col=None, **kwargs)

    Write a DataFrame to a CARTO table.

    Example

    +

    Write a pandas DataFrame to CARTO.

    cc.write(df, 'brooklyn_poverty', overwrite=True)
     
    +

    Scrape an HTML table from Wikipedia and send to CARTO with content +guessing to create a geometry from the country column. This uses +a CARTO Import API param content_guessing parameter.

    +
    url = 'https://en.wikipedia.org/wiki/List_of_countries_by_life_expectancy'
    +df = pd.read_html(url, header=0)[0]
    +cc.write(df, 'life_expectancy', content_guessing=True)
    +
    +
    @@ -380,10 +469,22 @@ as the_geom.
  • geom_col (str, optional) – The name of the column where geometry information is stored. Used in conjunction with encode_geom.
  • +
  • kwargs – Keyword arguments from CARTO’s Import API. See the params +listed in the documentation +for more information. For example, when using +content_guessing=’true’, a column named ‘countries’ with +country names will be used to generate polygons for each +country. To avoid unintended consequences, avoid file, url, +and other similar arguments.
  • - + + diff --git a/docs/cartoframes.layer.html b/docs/cartoframes.layer.html index da0c80992..304f97a98 100644 --- a/docs/cartoframes.layer.html +++ b/docs/cartoframes.layer.html @@ -56,7 +56,7 @@
    -class cartoframes.layer.BaseMap(source='dark', labels='back', only_labels=False)
    +class cartoframes.layer.BaseMap(source='voyager', labels='back', only_labels=False)

    Bases: cartoframes.layer.AbstractLayer

    Layer object for adding basemaps to a cartoframes map.

    Example

    @@ -74,7 +74,7 @@
    - + @@ -127,78 +127,7 @@ 'scheme':styling.prism(10)})]) -
    Returns:

    None

    +
    Returns:

    If lnglat flag is set and the +DataFrame has more than 100,000 rows, a BatchJobStatus +instance is returned. Otherwise, None.

    +
    Return type:

    BatchJobStatus or None

    Parameters:
    • source (str, optional) – One of light or dark. Defaults to -dark. Basemaps come from +voyager. Basemaps come from https://carto.com/location-data-services/basemaps/
    • labels (str, optional) – One of back, front, or None. Labels on the front will be above the data layers. Labels on back will be @@ -99,8 +99,8 @@
    Returns:True if using a CARTO basemap (Dark Matter or Positron), -False otherwise.
    Returns:True if using a CARTO basemap (Dark Matter, Positron or +Voyager), False otherwise.
    Return type:bool
    --- - - - -
    Parameters:
      -
    • table_name (str) – Table in user CARTO account that is fed into a -pandas DataFrame.
    • -
    • source (pandas.DataFrame, optional) – If specified, writes DataFrame -to the tablename specified (if it does not exist), then creates -a map layer.
    • -
    • overwrite (bool, optional) – If table_name exists in user’s CARTO -account, setting this to True will overwrite it. Defaults to -False (do not overwrite).
    • -
    • time (dict or str, optional) –

      Style to apply to layer. -If time is a dict, the following keys are options:

      -
        -
      • column (str, required): Column for animating map from. Data must -be of type time or float.
      • -
      • method (str, optional): Type of aggregation method for operating -on Torque TileCubes. Must -be one of avg, sum, or another PostgreSQL aggregate -functions -with a numeric output. Defaults to count.
      • -
      • cumulative (str, optional): Whether to accumulate -(cumulative) the point data overtime, or show the event at -the specified time only (linear). Defaults to linear.
      • -
      • frames (int, optional): Number of frames in the animation. -Defaults to 256.
      • -
      • duration (int, optional): Number of seconds in the animation. -Defaults to 30.
      • -
      -

      If time is a str, then it must be a column name available in -the query that is of type numeric or datetime.

      -
    • -
    • color (dict or str, optional) –

      Color style to apply to map. -If color is a dict, the following keys are options, with -values described:

      -
        -
      • column (str): Column to base coloring from.
      • -
      • scheme (str, optinal): Color scheme from -CartoColors. -Defaults to Mint.
      • -
      • bin_method (str, optional): Quantification method for dividing -data range into bins. Must be one of: quantiles, equal, -headtails, or jenks. Defaults to quantiles.
      • -
      • bins (int, optional): Number of bins to divide data amongst in -the bin_method. Defaults to 5.
      • -
      -
    • -
    • size (dict or int, optional) –

      Size style to apply to point data. -If size is a dict, the follow keys are options, with values -described as:

      -
        -
      • column (str): Column to base sizing of points on
      • -
      • bin_method (str, optional): Quantification method for dividing -data range into bins. Must be one of: quantiles, equal, -headtails, or jenks. Defaults to quantiles.
      • -
      • bins (int, optional): Number of bins to break data into. Defaults -to 5.
      • -
      • max (int, optional): Maximum point width (in pixels). Defaults to -25.
      • -
      • min (int, optional): Minimum point width (in pixels). Defaults to -5.
      • -
      -
    • -
    • tooltip (tuple of str, optional) – Not implemented.
    • -
    • legendNot implemented.
    • -
    -
    +

    Parameters: See QueryLayer for a full list of arguments.

    @@ -263,29 +192,29 @@ CARTO’s docs for more information.
  • time (dict or str, optional) –

    Style to apply to layer. -If time is a dict, the following keys are options:

    +If time is a dict, the following keys are options:

    • column (str, required): Column for animating map from. Data must -be of type time or float.
    • +be of type datetime or float.
    • method (str, optional): Type of aggregation method for operating on Torque TileCubes. Must be one of avg, sum, or another PostgreSQL aggregate functions with a numeric output. Defaults to count.
    • -
    • cumulative (str, optional): Whether to accumulate -(cumulative) -the point data overtime, or show the event at the specified time -only (linear). Defaults to linear.
    • +
    • cumulative (bool, optional): Whether to accumulate points over +time (True) or not (False, default)
    • frames (int, optional): Number of frames in the animation. Defaults to 256.
    • duration (int, optional): Number of seconds in the animation. Defaults to 30.
    • +
    • trails (int, optional): Number of trails after the incidence of +a point. Defaults to 2.
    -

    If time is a str, then it must be a column name available in +

    If time is a str, then it must be a column name available in the query that is of type numeric or datetime.

  • color (dict or str, optional) –

    Color style to apply to map. -If color is a dict, the following keys are options, with +If color is a dict, the following keys are options, with values described:

    • column (str): Column to base coloring from.
    • @@ -300,7 +229,7 @@
  • size (dict or int, optional) –

    Size style to apply to point data. -If size is a dict, the follow keys are options, with values +If size is a dict, the follow keys are options, with values described as:

    • column (str): Column to base sizing of points on
    • diff --git a/docs/cartoframes.utils.html b/docs/cartoframes.utils.html index f9af6fa34..48e518c9d 100644 --- a/docs/cartoframes.utils.html +++ b/docs/cartoframes.utils.html @@ -50,6 +50,18 @@ cartoframes.utils.dict_items(d)
  • +
    +
    +cartoframes.utils.importify_params(param_arg)
    +

    Convert parameter arguments to what CARTO’s Import API expects

    +
    + +
    +
    +cartoframes.utils.join_url(parts)
    +

    join parts of URL into complete url

    +
    +
    cartoframes.utils.norm_colname(colname)
    diff --git a/docs/doctrees/cartoframes.context.doctree b/docs/doctrees/cartoframes.context.doctree index 745958b7f..b28f97985 100644 Binary files a/docs/doctrees/cartoframes.context.doctree and b/docs/doctrees/cartoframes.context.doctree differ diff --git a/docs/doctrees/cartoframes.layer.doctree b/docs/doctrees/cartoframes.layer.doctree index 0a039e548..5d178af76 100644 Binary files a/docs/doctrees/cartoframes.layer.doctree and b/docs/doctrees/cartoframes.layer.doctree differ diff --git a/docs/doctrees/cartoframes.utils.doctree b/docs/doctrees/cartoframes.utils.doctree index b4f43abe9..81f118fb8 100644 Binary files a/docs/doctrees/cartoframes.utils.doctree and b/docs/doctrees/cartoframes.utils.doctree differ diff --git a/docs/doctrees/environment.pickle b/docs/doctrees/environment.pickle index 1395b95e0..defc27f8b 100644 Binary files a/docs/doctrees/environment.pickle and b/docs/doctrees/environment.pickle differ diff --git a/docs/doctrees/index.doctree b/docs/doctrees/index.doctree index a05823779..ce824cd25 100644 Binary files a/docs/doctrees/index.doctree and b/docs/doctrees/index.doctree differ diff --git a/docs/genindex.html b/docs/genindex.html index ae60c693f..387cffaf7 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -107,6 +107,12 @@

    B

    +
  • BatchJobStatus (class in cartoframes.context) + +
  • BinMethod (class in cartoframes.styling) @@ -117,14 +123,14 @@

    B

  • (in module styling)
  • + + -
      +
    • get_status() (cartoframes.context.BatchJobStatus method) + +
    • geyser() (in module cartoframes.styling)
        @@ -317,6 +327,8 @@

        H

        I

        diff --git a/docs/index.html b/docs/index.html index 9f55084e5..7b2d04153 100644 --- a/docs/index.html +++ b/docs/index.html @@ -167,20 +167,20 @@

        CARTO Credential Management -

        CARTOFrames Methods

        -
        -

        CartoContext Class

        -

        CartoContext class for authentication with CARTO and high-level operations -such as reading tables from CARTO into dataframes, writing dataframes to CARTO -tables, and creating custom maps from dataframes and CARTO tables. Future -methods interact with CARTO’s services like -Data Observatory, and routing, -geocoding, and isolines.

        +
        +

        CARTOFrames Functionality

        +
        +

        CartoContext

        class context.CartoContext(base_url=None, api_key=None, creds=None, session=None, verbose=0)
        -

        Manages connections with CARTO for data and map operations. Modeled +

        CartoContext class for authentication with CARTO and high-level operations +such as reading tables from CARTO into dataframes, writing dataframes to +CARTO tables, and creating custom maps from dataframes and CARTO tables. +Future methods interact with CARTO’s services like +Data Observatory, and routing, +geocoding, and isolines.

        +

        Manages connections with CARTO for data and map operations. Modeled after SparkContext.

        Example

        Create a CartoContext object:

        @@ -188,6 +188,10 @@

        CARTOFrames Methodscc = cartoframes.CartoContext(BASEURL, APIKEY)

        +
        +
        Attrs:
        +
        creds (cartoframes.Credentials): Credentials instance
        +

        @@ -200,7 +204,7 @@

        CARTOFrames Methodsrequests documentation -for more information: +for more information.
      • verbose (bool, optional) – Output underlying process states (True), or suppress (False, default)
      • @@ -210,7 +214,7 @@

        CARTOFrames Methods

        @@ -313,7 +317,7 @@

        CARTOFrames Methods
        delete(table_name)
        -

        Delete table

        +

        Delete a table in user’s CARTO account.

        Return type:

        CartoContext

        +
        Return type:

        CartoContext

        @@ -483,12 +487,21 @@

        CARTOFrames Methods
        -write(df, table_name, temp_dir='/tmp', overwrite=False, lnglat=None, encode_geom=False, geom_col=None)
        +write(df, table_name, temp_dir='/tmp', overwrite=False, lnglat=None, encode_geom=False, geom_col=None, **kwargs)

        Write a DataFrame to a CARTO table.

        Example

        +

        Write a pandas DataFrame to CARTO.

        cc.write(df, 'brooklyn_poverty', overwrite=True)
         
        +

        Scrape an HTML table from Wikipedia and send to CARTO with content +guessing to create a geometry from the country column. This uses +a CARTO Import API param content_guessing parameter.

        +
        url = 'https://en.wikipedia.org/wiki/List_of_countries_by_life_expectancy'
        +df = pd.read_html(url, header=0)[0]
        +cc.write(df, 'life_expectancy', content_guessing=True)
        +
        +

        @@ -510,10 +523,22 @@

        CARTOFrames Methodsparams +listed in the documentation +for more information. For example, when using +content_guessing=’true’, a column named ‘countries’ with +country names will be used to generate polygons for each +country. To avoid unintended consequences, avoid file, url, +and other similar arguments. -

        + + @@ -535,7 +560,7 @@

        CARTOFrames Methods
        -class layer.BaseMap(source='dark', labels='back', only_labels=False)
        +class layer.BaseMap(source='voyager', labels='back', only_labels=False)

        Layer object for adding basemaps to a cartoframes map.

        Example

        Add a custom basemap to a cartoframes map.

        @@ -552,7 +577,7 @@

        CARTOFrames Methods

        - + @@ -599,78 +624,7 @@

        CARTOFrames Methods'scheme': styling.prism(10)})]) -

        Returns:

        None

        +
        Returns:

        If lnglat flag is set and the +DataFrame has more than 100,000 rows, a BatchJobStatus +instance is returned. Otherwise, None.

        +
        Return type:

        BatchJobStatus or None

        Parameters:
        • source (str, optional) – One of light or dark. Defaults to -dark. Basemaps come from +voyager. Basemaps come from https://carto.com/location-data-services/basemaps/
        • labels (str, optional) – One of back, front, or None. Labels on the front will be above the data layers. Labels on back will be @@ -572,8 +597,8 @@

          CARTOFrames Methods

        Returns:True if using a CARTO basemap (Dark Matter or Positron), -False otherwise.
        Returns:True if using a CARTO basemap (Dark Matter, Positron or +Voyager), False otherwise.
        Return type:bool
        --- - - - -
        Parameters:
          -
        • table_name (str) – Table in user CARTO account that is fed into a -pandas DataFrame.
        • -
        • source (pandas.DataFrame, optional) – If specified, writes DataFrame -to the tablename specified (if it does not exist), then creates -a map layer.
        • -
        • overwrite (bool, optional) – If table_name exists in user’s CARTO -account, setting this to True will overwrite it. Defaults to -False (do not overwrite).
        • -
        • time (dict or str, optional) –

          Style to apply to layer. -If time is a dict, the following keys are options:

          -
            -
          • column (str, required): Column for animating map from. Data must -be of type time or float.
          • -
          • method (str, optional): Type of aggregation method for operating -on Torque TileCubes. Must -be one of avg, sum, or another PostgreSQL aggregate -functions -with a numeric output. Defaults to count.
          • -
          • cumulative (str, optional): Whether to accumulate -(cumulative) the point data overtime, or show the event at -the specified time only (linear). Defaults to linear.
          • -
          • frames (int, optional): Number of frames in the animation. -Defaults to 256.
          • -
          • duration (int, optional): Number of seconds in the animation. -Defaults to 30.
          • -
          -

          If time is a str, then it must be a column name available in -the query that is of type numeric or datetime.

          -
        • -
        • color (dict or str, optional) –

          Color style to apply to map. -If color is a dict, the following keys are options, with -values described:

          -
            -
          • column (str): Column to base coloring from.
          • -
          • scheme (str, optinal): Color scheme from -CartoColors. -Defaults to Mint.
          • -
          • bin_method (str, optional): Quantification method for dividing -data range into bins. Must be one of: quantiles, equal, -headtails, or jenks. Defaults to quantiles.
          • -
          • bins (int, optional): Number of bins to divide data amongst in -the bin_method. Defaults to 5.
          • -
          -
        • -
        • size (dict or int, optional) –

          Size style to apply to point data. -If size is a dict, the follow keys are options, with values -described as:

          -
            -
          • column (str): Column to base sizing of points on
          • -
          • bin_method (str, optional): Quantification method for dividing -data range into bins. Must be one of: quantiles, equal, -headtails, or jenks. Defaults to quantiles.
          • -
          • bins (int, optional): Number of bins to break data into. Defaults -to 5.
          • -
          • max (int, optional): Maximum point width (in pixels). Defaults to -25.
          • -
          • min (int, optional): Minimum point width (in pixels). Defaults to -5.
          • -
          -
        • -
        • tooltip (tuple of str, optional) – Not implemented.
        • -
        • legendNot implemented.
        • -
        -
        +

        Parameters: See QueryLayer for a full list of arguments.

    @@ -734,29 +688,29 @@

    CARTOFrames MethodsCARTO’s docs for more information.
  • time (dict or str, optional) –

    Style to apply to layer. -If time is a dict, the following keys are options:

    +If time is a dict, the following keys are options:

    • column (str, required): Column for animating map from. Data must -be of type time or float.
    • +be of type datetime or float.
    • method (str, optional): Type of aggregation method for operating on Torque TileCubes. Must be one of avg, sum, or another PostgreSQL aggregate functions with a numeric output. Defaults to count.
    • -
    • cumulative (str, optional): Whether to accumulate -(cumulative) -the point data overtime, or show the event at the specified time -only (linear). Defaults to linear.
    • +
    • cumulative (bool, optional): Whether to accumulate points over +time (True) or not (False, default)
    • frames (int, optional): Number of frames in the animation. Defaults to 256.
    • duration (int, optional): Number of seconds in the animation. Defaults to 30.
    • +
    • trails (int, optional): Number of trails after the incidence of +a point. Defaults to 2.
    -

    If time is a str, then it must be a column name available in +

    If time is a str, then it must be a column name available in the query that is of type numeric or datetime.

  • color (dict or str, optional) –

    Color style to apply to map. -If color is a dict, the following keys are options, with +If color is a dict, the following keys are options, with values described:

    • column (str): Column to base coloring from.
    • @@ -771,7 +725,7 @@

      CARTOFrames Methodsdict, the follow keys are options, with values +If size is a dict, the follow keys are options, with values described as:

      • column (str): Column to base sizing of points on
      • @@ -1005,6 +959,83 @@

        CARTOFrames Methods +

        BatchJobStatus

        +
        +
        +class context.BatchJobStatus(carto_context, job)
        +

        Status of a write or query operation. Read more at Batch SQL API docs about +responses and how to interpret them.

        +

        Example

        +

        Poll for a job’s status if you’ve caught the BatchJobStatus +instance.

        +
        import time
        +job = cc.write(df, 'new_table',
        +               lnglat=('lng_col', 'lat_col'))
        +while True:
        +    curr_status = job.status()['status']
        +    if curr_status in ('done', 'failed', 'canceled', 'unknown', ):
        +        print(curr_status)
        +        break
        +    time.sleep(5)
        +
        +
        +

        Create a BatchJobStatus instance if you have a job_id output +from a cc.write operation.

        +
        >>> from cartoframes import CartoContext, BatchJobStatus
        +>>> cc = CartoContext(username='...', api_key='...')
        +>>> cc.write(df, 'new_table', lnglat=('lng', 'lat'))
        +'BatchJobStatus(job_id='job-id-string', ...)'
        +>>> batch_job = BatchJobStatus(cc, 'job-id-string')
        +
        +
        +
        +
        Attrs:
        +
        job_id (str): Job ID of the Batch SQL API job +last_status (str): Status of job_id job when last polled +created_at (str): Time and date when job was created
        +
        + +++ + + + +
        Parameters:
          +
        • carto_context (carto.CartoContext) – CartoContext instance
        • +
        • job (dict or str) – If a dict, job status dict returned after sending +a Batch SQL API request. If str, a Batch SQL API job id.
        • +
        +
        +
        +
        +get_status()
        +

        return current status of job

        +
        + +
        +
        +status()
        +

        Checks the current status of job job_id

        + +++ + + + + + + + +
        Returns:Status and time it was updated
        Return type:dict
        Warns:UserWarning – If the job failed, a warning is raised with +information about the failure
        +
        + +
        +

        Credentials Management

        @@ -1264,10 +1295,11 @@

        Table Of Contents

      • CARTO Credential Management
      -
    • CARTOFrames Methods
        -
      • CartoContext Class
      • +
      • CARTOFrames Functionality
      • diff --git a/docs/objects.inv b/docs/objects.inv index 8e96d47dc..6fb3a2970 100644 Binary files a/docs/objects.inv and b/docs/objects.inv differ diff --git a/docs/py-modindex.html b/docs/py-modindex.html index f67393b30..c58e01728 100644 --- a/docs/py-modindex.html +++ b/docs/py-modindex.html @@ -90,11 +90,6 @@

        Python Module Index

            cartoframes.utils - - - - context - diff --git a/docs/searchindex.js b/docs/searchindex.js index 1b8781843..5c2ca6a51 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["cartoframes","cartoframes.context","cartoframes.credentials","cartoframes.layer","cartoframes.maps","cartoframes.styling","cartoframes.utils","index","modules"],envversion:53,filenames:["cartoframes.rst","cartoframes.context.rst","cartoframes.credentials.rst","cartoframes.layer.rst","cartoframes.maps.rst","cartoframes.styling.rst","cartoframes.utils.rst","index.rst","modules.rst"],objects:{"":{cartoframes:[0,0,0,"-"],context:[7,0,0,"-"],credentials:[7,0,0,"-"],layer:[7,0,0,"-"],styling:[7,0,0,"-"]},"cartoframes.context":{CartoContext:[1,1,1,""]},"cartoframes.context.CartoContext":{"delete":[1,2,1,""],data_augment:[1,2,1,""],data_boundaries:[1,2,1,""],data_discovery:[1,2,1,""],map:[1,2,1,""],query:[1,2,1,""],read:[1,2,1,""],sync:[1,2,1,""],write:[1,2,1,""]},"cartoframes.credentials":{Credentials:[2,1,1,""]},"cartoframes.credentials.Credentials":{"delete":[2,2,1,""],base_url:[2,2,1,""],key:[2,2,1,""],save:[2,2,1,""],set:[2,2,1,""],username:[2,2,1,""]},"cartoframes.layer":{AbstractLayer:[3,1,1,""],BaseMap:[3,1,1,""],Layer:[3,1,1,""],QueryLayer:[3,1,1,""]},"cartoframes.layer.AbstractLayer":{is_basemap:[3,3,1,""]},"cartoframes.layer.BaseMap":{is_basemap:[3,3,1,""],is_basic:[3,2,1,""]},"cartoframes.maps":{get_map_name:[4,4,1,""],get_map_template:[4,4,1,""],has_time_layer:[4,4,1,""],non_basemap_layers:[4,4,1,""]},"cartoframes.styling":{BinMethod:[5,1,1,""],antique:[5,4,1,""],armyRose:[5,4,1,""],bluGrn:[5,4,1,""],bluYl:[5,4,1,""],bold:[5,4,1,""],brwnYl:[5,4,1,""],burg:[5,4,1,""],burgYl:[5,4,1,""],custom:[5,4,1,""],darkMint:[5,4,1,""],earth:[5,4,1,""],emrld:[5,4,1,""],fall:[5,4,1,""],get_scheme_cartocss:[5,4,1,""],geyser:[5,4,1,""],magenta:[5,4,1,""],mint:[5,4,1,""],orYel:[5,4,1,""],pastel:[5,4,1,""],peach:[5,4,1,""],pinkYl:[5,4,1,""],prism:[5,4,1,""],purp:[5,4,1,""],purpOr:[5,4,1,""],redOr:[5,4,1,""],safe:[5,4,1,""],sunset:[5,4,1,""],sunsetDark:[5,4,1,""],teal:[5,4,1,""],tealGrn:[5,4,1,""],tealRose:[5,4,1,""],temps:[5,4,1,""],tropic:[5,4,1,""],vivid:[5,4,1,""]},"cartoframes.styling.BinMethod":{category:[5,3,1,""],equal:[5,3,1,""],headtails:[5,3,1,""],jenks:[5,3,1,""],quantiles:[5,3,1,""]},"cartoframes.utils":{cssify:[6,4,1,""],dict_items:[6,4,1,""],norm_colname:[6,4,1,""],normalize_colnames:[6,4,1,""]},"context.CartoContext":{"delete":[7,2,1,""],data_augment:[7,2,1,""],data_boundaries:[7,2,1,""],data_discovery:[7,2,1,""],map:[7,2,1,""],query:[7,2,1,""],read:[7,2,1,""],sync:[7,2,1,""],write:[7,2,1,""]},"credentials.Credentials":{"delete":[7,2,1,""],base_url:[7,2,1,""],key:[7,2,1,""],save:[7,2,1,""],set:[7,2,1,""],username:[7,2,1,""]},"layer.BaseMap":{is_basic:[7,2,1,""]},cartoframes:{context:[1,0,0,"-"],credentials:[2,0,0,"-"],layer:[3,0,0,"-"],maps:[4,0,0,"-"],styling:[5,0,0,"-"],utils:[6,0,0,"-"]},context:{CartoContext:[7,1,1,""]},credentials:{Credentials:[7,1,1,""]},layer:{AbstractLayer:[7,1,1,""],BaseMap:[7,1,1,""],Layer:[7,1,1,""],QueryLayer:[7,1,1,""]},styling:{antique:[7,4,1,""],armyRose:[7,4,1,""],bluGrn:[7,4,1,""],bluYl:[7,4,1,""],bold:[7,4,1,""],brwnYl:[7,4,1,""],burg:[7,4,1,""],burgYl:[7,4,1,""],custom:[7,4,1,""],darkMint:[7,4,1,""],earth:[7,4,1,""],emrld:[7,4,1,""],fall:[7,4,1,""],get_scheme_cartocss:[7,4,1,""],geyser:[7,4,1,""],magenta:[7,4,1,""],mint:[7,4,1,""],orYel:[7,4,1,""],pastel:[7,4,1,""],peach:[7,4,1,""],pinkYl:[7,4,1,""],prism:[7,4,1,""],purp:[7,4,1,""],purpOr:[7,4,1,""],redOr:[7,4,1,""],safe:[7,4,1,""],sunset:[7,4,1,""],sunsetDark:[7,4,1,""],teal:[7,4,1,""],tealGrn:[7,4,1,""],tealRose:[7,4,1,""],temps:[7,4,1,""],tropic:[7,4,1,""],vivid:[7,4,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","attribute","Python attribute"],"4":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:attribute","4":"py:function"},terms:{"256px":[1,7],"abstract":[3,7],"break":[3,7],"case":[1,7],"class":[1,2,3,5],"default":[1,2,3,7],"export":7,"float":[1,3,7],"function":3,"import":[1,2,3,6,7],"int":[1,3,7],"new":[1,2,7],"null":[3,7],"return":[1,2,3,4,6,7],"static":[1,7],"true":[1,3,4,7],"try":7,"while":[1,7],AND:[3,7],For:7,NOT:[3,7],Not:[1,3,7],One:[1,2,3,7],The:[1,2,3,7],Then:7,Use:[2,7],Used:[1,3,7],Using:[1,7],WITH:[3,7],Will:[1,7],_2_item:6,abcdefg:[2,7],abil:7,about:[5,7],abov:[2,3,7],abs:[3,7],abs_diff:[3,7],abstractlay:[3,7],acadia_biodivers:[1,3,7],accept:[1,7],access:7,account:[1,2,3,7],accumul:[3,7],acs:[1,7],activ:7,add:[1,3,7],added:[1,7],adding:[1,3,7],addit:[1,7],admin:[1,2,7],after:[1,7],against:[1,7],aggreg:[3,7],aim:[1,7],all:[1,2,3,4,7],allow:7,also:[1,7],alter:[1,7],among:7,amongst:[3,7],analysi:7,anim:[3,7],anoth:[3,7],antiqu:[5,7],api:[1,2,4,6,7],api_kei:[1,7],apikei:[1,3,7],appli:[3,7],arbitrari:[1,3,6,7],area:[1,7],arg:[2,7],argument:[2,7],armyros:[5,7],ask:[1,7],assign:[1,7],attempt:[2,7],attribut:[2,7],augment:1,authent:[1,7],automat:[1,7],avail:[1,3,7],avg:[3,7],avoid:[1,7],awesome_data:[3,7],axi:[1,7],b01003001:7,b15003017:7,b17001002:7,b19013001:[1,7],back:[3,7],base:[1,2,3,4,5,7],base_url:[1,2,7],basemap:[1,3,4,7],baseurl:[1,3,7],behavior:[1,7],below:[3,7],beta:7,bigmetadata:7,bin:[3,5,7],bin_method:[3,5,7],binmethod:5,bird_id:[1,7],block:[1,7],block_group:[1,7],blugrn:[5,7],bluyl:[5,7],bold:[5,7],bool:[1,3,7],boundari:[1,7],brooklyn_poverti:[1,7],brooklyn_poverty_census_tract:7,brwnyl:[5,7],bug:7,bulk:[1,7],burg:[5,7],burgyl:[5,7],calcul:[1,3,7],call:[2,7],can:[1,7],carto:[1,2,3,4,6],cartocolor:[3,5,7],cartocontext:[1,2,3],cartodb:7,cartodb_id:[1,3,7],catalog:[1,7],categori:[5,7],cell:[1,7],censu:[1,7],center:[1,7],chang:[1,6,7],citi:[1,7],cloud:[1,2,3,7],code:7,colnam:6,color:[1,3,5,7],column:[1,3,5,6,7],com:[1,2,3,7],come:[3,7],commun:7,complet:7,complex:[3,7],config:[2,7],config_fil:[2,7],config_loc:[2,7],configur:[2,7],conjunct:[1,7],connect:[1,7],contact:[2,7],content:8,context:[0,7,8],contextualizng:[1,7],copi:[1,7],count:[3,7],creat:[1,3,4,7],creation:[3,7],cred:[1,2,7],cred_fil:[2,7],credenti:[0,8],css_dict:6,cssifi:6,csv:7,cumul:[3,7],current:[1,2,7],custom:[1,3,4,5,7],customiz:7,dark:[3,7],darkmint:[5,7],data:[1,3],data_aug:[1,7],data_boundari:[1,7],data_discoveri:[1,7],data_obs_measur:7,databas:[1,3,7],datafram:[1,3,6,7],dataset:[3,7],date:[1,3,7],datetim:[3,7],decode_geom:[1,7],degre:[1,7],delet:[1,2,7],denom_id:[1,7],denomin:[1,7],depend:[1,7],describ:[3,7],desir:[1,7],develop:7,dict:[1,3,7],dict_item:6,differ:[2,7],dimens:[1,7],diploma:7,directori:[1,2,7],displai:[1,7],diverg:[5,7],divid:[3,7],doc:[3,7],document:[1,7],doe:[2,3,7],doing:[3,7],down:[3,7],draw:[1,7],driven:7,drop:[1,7],durat:[3,7],dynam:7,each:[1,7],earth:[1,5,7],educ:7,element:[1,7],emb:7,emrld:[5,7],enabl:7,encode_geom:[1,7],energi:7,enough:[2,7],enter:[2,7],entir:[1,7],equal:[3,5,7],error:[2,7],eschbach:[1,2,7],etc:[1,7],event:[3,7],event_id:[3,7],exampl:[1,2,3,6],exist:[1,3,7],exit:[1,7],expos:[5,7],extent:[1,7],facto:7,fall:[5,7],fals:[1,3,4,7],fanci:7,fantastic_sql_t:[3,7],featur:7,fed:[3,7],field:6,field_2:6,file:[2,7],fill:[1,7],first:[1,2,7],follow:[1,2,3,7],form:[1,2,7],format:[1,7],found:[2,7],frame:[3,7],from:[1,2,3],front:[3,7],full:[1,7],futur:[1,7],gain:7,gener:[2,7],geocod:[1,7],geograph:[1,7],geographi:[3,7],geom_col:[1,7],geom_id:[1,7],geom_timespan:[1,7],geometri:[1,3,7],get:[5,7],get_map_nam:4,get_map_templ:4,get_scheme_cartocss:[5,7],geyser:[5,7],github:[5,7],give:7,given:[2,6,7],global:[1,7],granular:[1,7],has:[1,7],has_time_lay:4,has_zoom:4,have:[1,2,3,7],head:7,headtail:[3,5,7],height:[1,7],high:[1,7],host:7,household:[1,7],html:[1,7],http:[1,2,3,7],i_ct:[3,7],i_measur:[3,7],identifi:[1,7],ifram:[1,7],imag:[1,7],img:[1,7],implement:[1,3,7],incom:[1,7],index:[1,7],individu:[3,7],infer:[1,7],info:7,inform:[1,2,3,7],input:[5,7],instal:[1,2],instanc:[2,7],instanti:[2,7],instead:[1,2,3,7],integr:7,interact:[1,7],interesting_data:[3,7],ipython:[1,7],is_bas:[3,7],is_basemap:3,isolin:[1,7],issu:7,item:6,its:[5,7],jenk:[3,5,7],join:[3,7],jupyt:7,kei:[1,2,3,7],keyword:[1,3,7],kilomet:[1,7],label:[3,7],larg:[1,7],last:[2,7],lat:[1,7],later:7,latest:7,latitud:[1,7],layer:[0,1,4,8],left:[1,7],legend:[3,7],level:[1,7],light:[3,7],like:[1,7],limit:[1,7],line:[1,7],linear:[3,7],list:[1,2,6,7],lng:[1,7],lnglat:[1,7],load:[2,7],locat:[2,3,7],longitud:[1,7],machin:7,made:6,magenta:[5,7],mai:7,make:7,manag:[1,2],map:[0,1,3,8],match:[1,7],matplotlib:[1,7],matter:[3,7],max:[3,7],max_score_rank:[1,7],max_timespan_rank:[1,7],maximum:[3,7],measur:[1,3,7],median:[1,7],median_incom:[1,7],met:[2,7],metadata:[1,7],method:[1,3],min:[3,7],minimum:[3,7],mint:[3,5,7],model:[1,7],modul:[7,8],month:[1,7],more:[1,3,5,7],most:[1,7],mr_fox_sight:[3,7],multipl:7,must:[1,3,7],name:[1,2,3,4,6,7],need:[2,3,7],new_api_kei:[2,7],new_base_url:[2,7],new_usernam:[2,7],newli:[1,7],next:[2,7],non_basemap_lay:4,none:[1,2,3,5,7],nonprofit:7,norm_colnam:6,normal:[1,6,7],normalize_colnam:6,note:7,notebook:7,num_egg:[1,7],number:[3,7],numer:[3,7],numer_id:[1,7],numer_timespan:[1,7],object:[1,2,3,5,7],observatori:1,offload:[3,7],often:7,onc:7,one:[1,3,7],onli:[1,3,7],only_label:[3,7],oper:[1,3,7],optin:[3,7],option:[1,2,3,7],order:[2,7],origin:[1,7],oryel:[5,7],other:[2,7],otherwis:[2,3,4,7],output:[1,3,7],overrid:[1,7],overtim:[3,7],overwrit:[1,3,7],pack:7,packag:[7,8],page:7,pair:[1,7],panda:[1,3,7],paramet:[1,2,3,4,5,6,7],pass:[1,2,7],past:[1,7],pastel:[5,7],path:[2,7],pattern:[2,7],peach:[5,7],per:[1,7],peregrine_falcon_nest_sit:[1,7],perform:[1,3,7],pinkyl:[5,7],pip:7,pixel:[1,3,7],point:[1,3,7],pop:7,positron:[3,7],postgi:[3,7],postgresql:[1,3,7],poverti:7,poverty_count:7,poverty_per_pop:7,pre:7,preced:[2,7],predenomin:7,prem:[2,7],premis:[1,2,7],prenorm:[1,7],previou:[2,7],previous:[2,7],print:[2,7],prism:[3,5,7],privat:7,process:[1,3,7],produc:[1,7],provid:[2,7],provision:7,pull:[1,2,3,7],purp:[5,7],purpor:[5,7],python:7,qualit:[5,7],quantif:[3,7],quantil:[3,5,7],quantit:[5,7],queri:[1,3,7],querylay:[1,3,7],quickli:7,rais:[2,7],rang:[1,3,7],read:[1,3,5,7],read_csv:7,recent:[1,7],recommend:7,redor:[5,7],reflect:6,regex:[1,7],relat:[3,7],releas:7,reli:7,render:[1,7],repositori:[5,7],represent:[1,7],reproduc:7,request:[1,7],requir:[3,7],result:[1,7],retain:7,retriev:[2,4,7],rout:[1,7],run:[1,7],runtimeerror:[2,7],safe:[5,7],same:[2,7],save:[2,7],scenario:[2,7],scheme:[1,3,5,7],scheme_info:[5,7],school:7,scienc:7,scientist:7,search:7,second:[3,7],section:7,see:[1,2,3,7],select:[3,7],send:[2,7],sent:[1,7],separ:[2,7],servic:[1,3,7],session:[1,2,7],set:[1,2,3,7],setup:7,should:[1,7],show:[1,3,7],side:[1,7],signatur:7,simpson_index:[1,7],singl:[1,7],size:[1,3,7],slippi:[1,7],smaller:[1,7],smallest:[1,7],snapshot:[1,3,7],snippet:7,some:[1,3,7],sourc:[1,3,7],sparkcontext:[1,7],spatial:[3,7],specif:[1,3,7],specifi:[1,2,3,7],sql:[1,3,6,7],squar:[1,7],st_buffer:[3,7],st_transform:[3,7],standard:7,start:7,state:[1,7],statu:7,storag:[1,7],store:[1,2,7],str:[1,2,3,6,7],student:7,style:[0,1,3,8],submodul:8,successfulli:[2,7],sum:[3,7],sunset:[5,7],sunsetdark:[3,5,7],suppli:[1,4,7],support:7,suppress:[1,7],sync:[1,7],system:[1,7],tabl:[1,3],table_nam:[1,3,7],tablenam:[3,7],tag:[1,7],taken:[2,7],target_area:[1,7],target_geom:[1,7],teal:[5,7],tealgrn:[5,7],tealros:[1,5,7],temp:[5,7],temp_dir:[1,7],templat:4,temporari:[1,7],the_geom:[1,3,7],the_geom_webmerc:[3,7],thi:[1,2,3,7],through:[6,7],tiger:[1,7],tile:[1,7],tilecub:[3,7],time:[1,2,3,4,7],timespan:[1,7],tmp:[1,7],tooltip:[3,7],top:[3,7],torqu:[3,4,7],total:7,total_popul:7,tracker:7,transact:7,transaction_ev:[1,7],translat:6,tropic:[5,7],tupl:[1,3,7],turbo:7,turbocartocss:[5,7],two:[1,7],type:[1,3,6,7],undefin:[1,7],underlai:[3,7],underli:[1,3,7],underneath:[3,7],unit:[1,7],unix:[1,7],unspecifi:[1,7],updat:[1,2,7],upload:[1,7],url:[1,2,7],usag:[2,3],use:[1,7],used:[1,2,7],useful:[3,7],user:[1,2,3,7],usernam:[1,2,7],uses:7,using:[3,7],usual:[1,2,7],util:[0,4,8],valu:[1,2,3,7],venv:7,verbos:[1,7],version:7,view:[1,7],virtualenv:7,visual:[1,3,7],vivid:[1,5,7],want:[1,7],wgs84:[1,7],when:[1,7],where:[1,2,3,7],whether:[1,3,7],which:[1,3,4,7],width:[1,3,7],wiki:7,without:[1,7],write:[1,3,7],yet:[1,3,7],you:[1,7],your:[2,7],your_user_nam:[2,7],zoom:[1,7]},titles:["cartoframes package","cartoframes.context module","cartoframes.credentials module","cartoframes.layer module","cartoframes.maps module","cartoframes.styling module","cartoframes.utils module","CARTOFrames","cartoframes"],titleterms:{"class":7,"function":7,augment:7,carto:7,cartocontext:7,cartofram:[0,1,2,3,4,5,6,7,8],content:0,context:1,credenti:[2,7],data:7,environ:7,exampl:7,from:7,indic:7,instal:7,instruct:7,layer:[3,7],manag:7,map:[4,7],method:7,modul:[0,1,2,3,4,5,6],observatori:7,packag:0,style:[5,7],submodul:0,tabl:7,usag:7,util:6,virtual:7,workflow:7}}) \ No newline at end of file +Search.setIndex({docnames:["cartoframes","cartoframes.context","cartoframes.credentials","cartoframes.layer","cartoframes.maps","cartoframes.styling","cartoframes.utils","index","modules"],envversion:53,filenames:["cartoframes.rst","cartoframes.context.rst","cartoframes.credentials.rst","cartoframes.layer.rst","cartoframes.maps.rst","cartoframes.styling.rst","cartoframes.utils.rst","index.rst","modules.rst"],objects:{"":{cartoframes:[0,0,0,"-"],credentials:[7,0,0,"-"],layer:[7,0,0,"-"],styling:[7,0,0,"-"]},"cartoframes.context":{BatchJobStatus:[1,1,1,""],CartoContext:[1,1,1,""]},"cartoframes.context.BatchJobStatus":{get_status:[1,2,1,""],status:[1,2,1,""]},"cartoframes.context.CartoContext":{"delete":[1,2,1,""],data_augment:[1,2,1,""],data_boundaries:[1,2,1,""],data_discovery:[1,2,1,""],map:[1,2,1,""],query:[1,2,1,""],read:[1,2,1,""],sync:[1,2,1,""],write:[1,2,1,""]},"cartoframes.credentials":{Credentials:[2,1,1,""]},"cartoframes.credentials.Credentials":{"delete":[2,2,1,""],base_url:[2,2,1,""],key:[2,2,1,""],save:[2,2,1,""],set:[2,2,1,""],username:[2,2,1,""]},"cartoframes.layer":{AbstractLayer:[3,1,1,""],BaseMap:[3,1,1,""],Layer:[3,1,1,""],QueryLayer:[3,1,1,""]},"cartoframes.layer.AbstractLayer":{is_basemap:[3,3,1,""]},"cartoframes.layer.BaseMap":{is_basemap:[3,3,1,""],is_basic:[3,2,1,""]},"cartoframes.maps":{get_map_name:[4,4,1,""],get_map_template:[4,4,1,""],has_time_layer:[4,4,1,""],non_basemap_layers:[4,4,1,""]},"cartoframes.styling":{BinMethod:[5,1,1,""],antique:[5,4,1,""],armyRose:[5,4,1,""],bluGrn:[5,4,1,""],bluYl:[5,4,1,""],bold:[5,4,1,""],brwnYl:[5,4,1,""],burg:[5,4,1,""],burgYl:[5,4,1,""],custom:[5,4,1,""],darkMint:[5,4,1,""],earth:[5,4,1,""],emrld:[5,4,1,""],fall:[5,4,1,""],get_scheme_cartocss:[5,4,1,""],geyser:[5,4,1,""],magenta:[5,4,1,""],mint:[5,4,1,""],orYel:[5,4,1,""],pastel:[5,4,1,""],peach:[5,4,1,""],pinkYl:[5,4,1,""],prism:[5,4,1,""],purp:[5,4,1,""],purpOr:[5,4,1,""],redOr:[5,4,1,""],safe:[5,4,1,""],sunset:[5,4,1,""],sunsetDark:[5,4,1,""],teal:[5,4,1,""],tealGrn:[5,4,1,""],tealRose:[5,4,1,""],temps:[5,4,1,""],tropic:[5,4,1,""],vivid:[5,4,1,""]},"cartoframes.styling.BinMethod":{category:[5,3,1,""],equal:[5,3,1,""],headtails:[5,3,1,""],jenks:[5,3,1,""],quantiles:[5,3,1,""]},"cartoframes.utils":{cssify:[6,4,1,""],dict_items:[6,4,1,""],importify_params:[6,4,1,""],join_url:[6,4,1,""],norm_colname:[6,4,1,""],normalize_colnames:[6,4,1,""]},"context.BatchJobStatus":{get_status:[7,2,1,""],status:[7,2,1,""]},"context.CartoContext":{"delete":[7,2,1,""],data_augment:[7,2,1,""],data_boundaries:[7,2,1,""],data_discovery:[7,2,1,""],map:[7,2,1,""],query:[7,2,1,""],read:[7,2,1,""],sync:[7,2,1,""],write:[7,2,1,""]},"credentials.Credentials":{"delete":[7,2,1,""],base_url:[7,2,1,""],key:[7,2,1,""],save:[7,2,1,""],set:[7,2,1,""],username:[7,2,1,""]},"layer.BaseMap":{is_basic:[7,2,1,""]},cartoframes:{context:[1,0,0,"-"],credentials:[2,0,0,"-"],layer:[3,0,0,"-"],maps:[4,0,0,"-"],styling:[5,0,0,"-"],utils:[6,0,0,"-"]},context:{BatchJobStatus:[7,1,1,""],CartoContext:[7,1,1,""]},credentials:{Credentials:[7,1,1,""]},layer:{AbstractLayer:[7,1,1,""],BaseMap:[7,1,1,""],Layer:[7,1,1,""],QueryLayer:[7,1,1,""]},styling:{antique:[7,4,1,""],armyRose:[7,4,1,""],bluGrn:[7,4,1,""],bluYl:[7,4,1,""],bold:[7,4,1,""],brwnYl:[7,4,1,""],burg:[7,4,1,""],burgYl:[7,4,1,""],custom:[7,4,1,""],darkMint:[7,4,1,""],earth:[7,4,1,""],emrld:[7,4,1,""],fall:[7,4,1,""],get_scheme_cartocss:[7,4,1,""],geyser:[7,4,1,""],magenta:[7,4,1,""],mint:[7,4,1,""],orYel:[7,4,1,""],pastel:[7,4,1,""],peach:[7,4,1,""],pinkYl:[7,4,1,""],prism:[7,4,1,""],purp:[7,4,1,""],purpOr:[7,4,1,""],redOr:[7,4,1,""],safe:[7,4,1,""],sunset:[7,4,1,""],sunsetDark:[7,4,1,""],teal:[7,4,1,""],tealGrn:[7,4,1,""],tealRose:[7,4,1,""],temps:[7,4,1,""],tropic:[7,4,1,""],vivid:[7,4,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","attribute","Python attribute"],"4":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:attribute","4":"py:function"},terms:{"256px":[1,7],"abstract":[3,7],"break":[1,3,7],"case":[1,7],"class":[1,2,3,5],"default":[1,2,3,7],"export":7,"float":[1,3,7],"function":3,"import":[1,2,3,6,7],"int":[1,3,7],"new":[1,2,7],"null":[3,7],"return":[1,2,3,4,6,7],"static":[1,7],"true":[1,3,4,7],"try":7,"while":[1,7],AND:[3,7],For:[1,7],NOT:[3,7],Not:[1,3,7],One:[1,2,3,7],The:[1,2,3,7],Then:7,Use:[2,7],Used:[1,3,7],Using:[1,7],WITH:[3,7],Will:[1,7],_2_item:6,abcdefg:[2,7],abil:7,about:[1,5,7],abov:[2,3,7],abs:[3,7],abs_diff:[3,7],abstractlay:[3,7],acadia_biodivers:[1,3,7],accept:[1,7],access:7,account:[1,2,7],accumul:[3,7],acs:[1,7],activ:7,add:[1,3,7],added:[1,7],adding:[1,3,7],addit:[1,7],admin:[1,2,7],after:[1,3,7],against:[1,7],aggreg:[3,7],aim:[1,7],all:[1,2,3,4,7],allow:7,also:[1,7],alter:[1,7],among:7,amongst:[3,7],analysi:7,anim:[3,7],anoth:[3,7],antiqu:[5,7],api:[1,2,4,6,7],api_kei:[1,7],apikei:[1,3,7],appli:[3,7],arbitrari:[1,3,6,7],area:[1,7],arg:[2,7],argument:[1,2,3,6,7],armyros:[5,7],ask:[1,7],assign:[1,7],attempt:[2,7],attr:[1,7],attribut:[2,7],augment:1,authent:[1,7],automat:[1,7],avail:[1,3,7],avg:[3,7],avoid:[1,7],awesome_data:[3,7],axi:[1,7],b01003001:7,b15003017:7,b17001002:7,b19013001:[1,7],back:[3,7],base:[1,2,3,4,5,7],base_url:[1,2,7],basemap:[1,3,4,7],baseurl:[1,3,7],batch:[1,7],batch_job:[1,7],batchjobstatu:1,behavior:[1,7],below:[3,7],beta:7,bigmetadata:7,bin:[3,5,7],bin_method:[3,5,7],binmethod:5,bird_id:[1,7],block:[1,7],block_group:[1,7],blugrn:[5,7],bluyl:[5,7],bold:[5,7],bool:[1,3,7],boundari:[1,7],brooklyn_poverti:[1,7],brooklyn_poverty_census_tract:7,brwnyl:[5,7],bug:7,bulk:[1,7],burg:[5,7],burgyl:[5,7],calcul:[1,3,7],call:[2,7],can:[1,7],cancel:[1,7],carto:[1,2,3,4,6],carto_context:[1,7],cartocolor:[3,5,7],cartocontext:[1,2,3],cartodb:7,cartodb_id:[1,3,7],catalog:[1,7],categori:[5,7],caught:[1,7],cell:[1,7],censu:[1,7],center:[1,7],chang:[1,6,7],check:[1,7],citi:[1,7],cloud:[1,2,3,7],code:7,colnam:6,color:[1,3,5,7],column:[1,3,5,6,7],com:[1,2,3,7],come:[3,7],commun:7,complet:[6,7],complex:[3,7],config:[2,7],config_fil:[2,7],config_loc:[2,7],configur:[2,7],conjunct:[1,7],connect:[1,7],consequ:[1,7],contact:[2,7],content:[1,7,8],content_guess:[1,7],context:[0,7,8],contextualizng:[1,7],convert:6,copi:[1,7],count:[3,7],countri:[1,7],creat:[1,4,7],created_at:[1,7],creation:[3,7],cred:[1,2,7],cred_fil:[2,7],credenti:[0,1,8],css_dict:6,cssifi:6,csv:7,cumul:[3,7],curr_statu:[1,7],current:[1,2,7],custom:[1,3,4,5,7],customiz:7,dark:[3,7],darkmint:[5,7],data:[1,3],data_aug:[1,7],data_boundari:[1,7],data_discoveri:[1,7],data_obs_measur:7,databas:[1,3,7],datafram:[1,3,6,7],dataset:[3,7],date:[1,3,7],datetim:[3,7],decode_geom:[1,7],degre:[1,7],delet:[1,2,7],denom_id:[1,7],denomin:[1,7],depend:[1,7],describ:[3,7],desir:[1,7],develop:7,dict:[1,3,7],dict_item:6,differ:[2,7],dimens:[1,7],diploma:7,directori:[1,2,7],displai:[1,7],diverg:[5,7],divid:[3,7],doc:[1,3,7],document:[1,7],doe:[2,3,7],doing:[3,7],done:[1,7],down:[3,7],draw:[1,7],driven:7,drop:[1,7],durat:[3,7],dynam:7,each:[1,7],earth:[1,5,7],educ:7,element:[1,7],emb:7,emrld:[5,7],enabl:7,encode_geom:[1,7],energi:7,enough:[2,7],enter:[2,7],entir:[1,7],equal:[3,5,7],error:[2,7],eschbach:[1,2,7],etc:[1,7],event_id:[3,7],exampl:[1,2,3,6],exist:[1,7],exit:[1,7],expect:6,expos:[5,7],extent:[1,7],facto:7,fail:[1,7],failur:[1,7],fall:[5,7],fals:[1,3,4,7],fanci:7,fantastic_sql_t:[3,7],featur:7,fed:[3,7],field:6,field_2:6,file:[1,2,7],fill:[1,7],first:[1,2,7],flag:[1,7],follow:[1,2,3,7],form:[1,2,7],format:[1,7],found:[2,7],frame:[3,7],from:[1,2,3],front:[3,7],full:[1,3,7],futur:[1,7],gain:7,gener:[1,2,7],geocod:[1,7],geograph:[1,7],geographi:[3,7],geom_col:[1,7],geom_id:[1,7],geom_timespan:[1,7],geometri:[1,3,7],get:[5,7],get_map_nam:4,get_map_templ:4,get_scheme_cartocss:[5,7],get_statu:[1,7],geyser:[5,7],github:[5,7],give:7,given:[2,6,7],global:[1,7],granular:[1,7],guess:[1,7],has:[1,7],has_time_lay:4,has_zoom:4,have:[1,2,3,7],head:7,header:[1,7],headtail:[3,5,7],height:[1,7],high:[1,7],host:7,household:[1,7],how:[1,7],html:[1,7],http:[1,2,3,7],i_ct:[3,7],i_measur:[3,7],identifi:[1,7],ifram:[1,7],imag:[1,7],img:[1,7],implement:[1,3,7],importify_param:6,incid:[3,7],incom:[1,7],index:[1,7],individu:[3,7],infer:[1,7],info:7,inform:[1,2,3,7],input:[5,7],instal:[1,2],instanc:[1,2,7],instanti:[2,7],instead:[1,2,3,7],integr:7,interact:[1,7],interesting_data:[3,7],interpret:[1,7],ipython:[1,7],is_bas:[3,7],is_basemap:3,isolin:[1,7],issu:7,item:6,its:[5,7],jenk:[3,5,7],job:[1,7],job_id:[1,7],join:[3,6,7],join_url:6,jupyt:7,kei:[1,2,3,7],keyword:[1,3,7],kilomet:[1,7],kwarg:[1,7],label:[3,7],larg:[1,7],last:[1,2,7],last_statu:[1,7],lat:[1,7],lat_col:[1,7],later:7,latest:7,latitud:[1,7],layer:[0,1,4,8],left:[1,7],legend:[3,7],level:[1,7],life_expect:[1,7],light:[3,7],like:[1,7],limit:[1,7],line:[1,7],list:[1,2,3,6,7],list_of_countries_by_life_expect:[1,7],lng:[1,7],lng_col:[1,7],lnglat:[1,7],load:[2,7],locat:[2,3,7],longitud:[1,7],machin:7,made:6,magenta:[5,7],mai:7,make:7,manag:[1,2],map:[0,1,3,8],match:[1,7],matplotlib:[1,7],matter:[3,7],max:[3,7],max_score_rank:[1,7],max_timespan_rank:[1,7],maximum:[3,7],measur:[1,3,7],median:[1,7],median_incom:[1,7],met:[2,7],metadata:[1,7],method:[1,3,7],min:[3,7],minimum:[3,7],mint:[3,5,7],model:[1,7],modul:[7,8],month:[1,7],more:[1,3,5,7],most:[1,7],mr_fox_sight:[3,7],multipl:7,must:[1,3,7],name:[1,2,3,4,6,7],need:[2,3,7],new_api_kei:[2,7],new_base_url:[2,7],new_tabl:[1,7],new_usernam:[2,7],newli:[1,7],next:[2,7],non_basemap_lay:4,none:[1,2,3,5,7],nonprofit:7,norm_colnam:6,normal:[1,6,7],normalize_colnam:6,note:7,notebook:7,num_egg:[1,7],number:[3,7],numer:[3,7],numer_id:[1,7],numer_timespan:[1,7],object:[1,2,3,5,7],observatori:1,offload:[3,7],often:7,onc:7,one:[1,3,7],onli:[1,3,7],only_label:[3,7],oper:[1,3,7],optin:[3,7],option:[1,2,3,7],order:[2,7],org:[1,7],origin:[1,7],oryel:[5,7],other:[1,2,7],otherwis:[1,2,3,4,7],output:[1,3,7],over:[3,7],overrid:[1,7],overwrit:[1,3,7],pack:7,packag:[7,8],page:7,pair:[1,7],panda:[1,3,7],param:[1,7],param_arg:6,paramet:[1,2,3,4,5,6,7],part:6,pass:[1,2,7],past:[1,7],pastel:[5,7],path:[2,7],pattern:[2,7],peach:[5,7],per:[1,7],peregrine_falcon_nest_sit:[1,7],perform:[1,3,7],pinkyl:[5,7],pip:7,pixel:[1,3,7],point:[1,3,7],poll:[1,7],polygon:[1,7],pop:7,positron:[3,7],postgi:[3,7],postgresql:[1,3,7],poverti:7,poverty_count:7,poverty_per_pop:7,pre:7,preced:[2,7],predenomin:7,prem:[2,7],premis:[1,2,7],prenorm:[1,7],previou:[2,7],previous:[2,7],print:[1,2,7],prism:[3,5,7],privat:7,process:[1,3,7],produc:[1,7],provid:[2,7],provision:7,pull:[1,2,3,7],purp:[5,7],purpor:[5,7],python:7,qualit:[5,7],quantif:[3,7],quantil:[3,5,7],quantit:[5,7],queri:[1,3,7],querylay:[1,3,7],quickli:7,rais:[1,2,7],rang:[1,3,7],read:[1,3,5,7],read_csv:7,read_html:[1,7],recent:[1,7],recommend:7,redor:[5,7],reflect:6,regex:[1,7],relat:[3,7],releas:7,reli:7,render:[1,7],repositori:[5,7],represent:[1,7],reproduc:7,request:[1,7],requir:[3,7],respons:[1,7],result:[1,7],retain:7,retriev:[2,4,7],rout:[1,7],row:[1,7],run:[1,7],runtimeerror:[2,7],safe:[5,7],same:[2,7],save:[2,7],scenario:[2,7],scheme:[1,3,5,7],scheme_info:[5,7],school:7,scienc:7,scientist:7,scrape:[1,7],search:7,second:[3,7],section:7,see:[1,2,3,7],select:[3,7],send:[1,2,7],sent:[1,7],separ:[2,7],servic:[1,3,7],session:[1,2,7],set:[1,2,3,7],setup:7,should:[1,7],show:[1,3,7],side:[1,7],signatur:7,similar:[1,7],simpson_index:[1,7],singl:[1,7],size:[1,3,7],sleep:[1,7],slippi:[1,7],smaller:[1,7],smallest:[1,7],snapshot:[1,3,7],snippet:7,some:[1,3,7],sourc:[1,3,7],sparkcontext:[1,7],spatial:[3,7],specif:[1,3,7],specifi:[1,2,7],sql:[1,3,6,7],squar:[1,7],st_buffer:[3,7],st_transform:[3,7],standard:7,start:7,state:[1,7],statu:[1,7],storag:[1,7],store:[1,2,7],str:[1,2,3,6,7],string:[1,7],student:7,style:[0,1,3,8],submodul:8,successfulli:[2,7],sum:[3,7],sunset:[5,7],sunsetdark:[3,5,7],suppli:[1,4,7],support:7,suppress:[1,7],sync:[1,7],system:[1,7],tabl:[1,3],table_nam:[1,3,7],tag:[1,7],taken:[2,7],target_area:[1,7],target_geom:[1,7],teal:[5,7],tealgrn:[5,7],tealros:[1,5,7],temp:[5,7],temp_dir:[1,7],templat:4,temporari:[1,7],than:[1,7],the_geom:[1,3,7],the_geom_webmerc:[3,7],them:[1,7],thi:[1,2,3,7],through:[6,7],tiger:[1,7],tile:[1,7],tilecub:[3,7],time:[1,2,3,4,7],timespan:[1,7],tmp:[1,7],tooltip:[3,7],top:[3,7],torqu:[3,4,7],total:7,total_popul:7,tracker:7,trail:[3,7],transact:7,transaction_ev:[1,7],translat:6,tropic:[5,7],tupl:[1,3,7],turbo:7,turbocartocss:[5,7],two:[1,7],type:[1,3,6,7],undefin:[1,7],underlai:[3,7],underli:[1,3,7],underneath:[3,7],unintend:[1,7],unit:[1,7],unix:[1,7],unknown:[1,7],unspecifi:[1,7],updat:[1,2,7],upload:[1,7],url:[1,2,6,7],usag:[2,3],use:[1,7],used:[1,2,7],useful:[3,7],user:[1,2,3,7],usernam:[1,2,7],userwarn:[1,7],uses:[1,7],using:[1,3,7],usual:[1,2,7],util:[0,4,8],valu:[1,2,3,7],venv:7,verbos:[1,7],version:7,view:[1,7],virtualenv:7,visual:[1,3,7],vivid:[1,5,7],voyag:[3,7],want:[1,7],warn:[1,7],wgs84:[1,7],what:6,when:[1,7],where:[1,2,3,7],whether:[1,3,7],which:[1,3,4,7],width:[1,3,7],wiki:[1,7],wikipedia:[1,7],without:[1,7],write:[1,7],yet:[1,3,7],you:[1,7],your:[2,7],your_user_nam:[2,7],zoom:[1,7]},titles:["cartoframes package","cartoframes.context module","cartoframes.credentials module","cartoframes.layer module","cartoframes.maps module","cartoframes.styling module","cartoframes.utils module","CARTOFrames","cartoframes"],titleterms:{"class":7,"function":7,augment:7,batchjobstatu:7,carto:7,cartocontext:7,cartofram:[0,1,2,3,4,5,6,7,8],content:0,context:1,credenti:[2,7],data:7,environ:7,exampl:7,from:7,indic:7,instal:7,instruct:7,layer:[3,7],manag:7,map:[4,7],modul:[0,1,2,3,4,5,6],observatori:7,packag:0,style:[5,7],submodul:0,tabl:7,usag:7,util:6,virtual:7,workflow:7}}) \ No newline at end of file