Mapping FAQ
Here about some frequently asked questions about Atlas. For more answers, please join our Nomic Community Slack. Beginners are welcome!
How to set up the Nomic package?
Install Nomic package
- Install the
nomic
library in your Python environment. Virtual environments are recommended. - Import the
nomic
library.
pip install --upgrade nomic
import nomic
from nomic import atlas
Log into Nomic
- Get your API key. You can obtain your API key at https://atlas.nomic.ai/cli-login. Make sure you already signed into Atlas in your browser at https://atlas.nomic.ai/
- Log-in to your Nomic account in your Python code (or your terminal) with your API token:
# in Python
nomic.login(YOUR_API_TOKEN_HERE)
# in the terminal
$ nomic login YOUR_API_TOKEN_HERE
How to work with dates and timestamps?
Atlas works best with dates and timestamps in ISO 8601 format (e.g., YYYY-MM-DD
for dates and YYYY-MM-DDThh:mm:ssZ
for timestamps). When using the Python SDK, pass Python date or datetime objects, which Atlas will automatically convert to Arrow-compatible timestamps. For CSV uploads, using ISO 8601 format ensures the most reliable parsing.
How do I make a new dataset?
You can make a new dataset by calling AtlasDataset
with a dataset name.
from nomic import AtlasDataset
dataset = AtlasDataset("my-new-dataset")
It won't have any data in it yet. To add data, you can use the add_data
method.
# data is a DataFrame or list of dicts
dataset.add_data(data)
Your data map will only build using all the data in your datasetwhen you call create_index
.
How do I add data to an existing dataset?
You can add data to an existing dataset by calling add_data
on the AtlasDataset object.
from nomic import AtlasDataset
dataset = AtlasDataset(
"my-existing-dataset",
)
dataset.add_data(
data=[{'text': 'my third document'}, {'text': 'my fourth document'}]
)
How do I update maps for datasets I've added data to?
You can call create_index
on the AtlasDataset object after adding your new data.
from nomic import AtlasDataset
dataset = AtlasDataset(
"my-existing-dataset",
)
dataset.add_data(
data=[{'text': 'my third document'}, {'text': 'my fourth document'}]
)
atlas_map = dataset.create_index(
indexed_field='text',
)
How to disable logging?
Nomic utilizes the loguru module for logging. We recognize that logging can sometimes be annoying. You can disable or change the logging level by including the following snippet at the top of any script.
from loguru import logger
import sys
logger.remove(0)
logger.add(sys.stderr, level="ERROR", filter='nomic')