CARTOframes

A Python package for integrating CARTO maps, analysis, and data services into data science workflows.

Install CARTOframes in your Notebooks

This guide is intended for those who are going to start using CARTOframes and gives some instructions to install CARTOframes locally, in a Jupyter Notebook and using a Virtual Environment.

Install CARTOframes using pip

It is possible to install CARTOframes with pip by simply typing the following in the command line to do a system install:

1
$ pip install cartoframes

To install a specific version, for example, let’s say the 1.2.3 version:

1
$ pip install cartoframes==1.2.3

To install a pre release, use the --pre flag:

1
$ pip install cartoframes --pre

Install CARTOframes in a Jupyter Notebook

In this documentation, all the examples are in a Jupyter Notebook. It is recommended to read the beginner documentation to get familiar with Jupyter. To install through a Jupyter Notebook, run this command:

1
! pip install cartoframes

Use a Virtual Environment

It is recommended to install CARTOframes in a Virtual Environment, since they are very useful when working with Python locally. This section provides the necessary information to create a simple Virtual Environment and install CARTOframes in there:

1
2
3
$ virtualenv cartoframes_env
$ source cartoframes_env/bin/activate
(cartoframes_env) $ pip install cartoframes

To install a specific version:

1
2
3
$ virtualenv cartoframes_env
$ source cartoframes_env/bin/activate
(cartoframes_env) $ pip install cartoframes==1.2.3

When the virtual environment is activated, it is visible in the command line prompt, in this case: (cartoframes_env). It can be deactivated by typing deactivate to exit the virtualenv:

1
(cartoframes_env) $ deactivate