# export-to-microreact-project

## Description

<mark style="color:purple;">`export-to-microreact-project`</mark> *adaptor creates a new project or updates an existing a project on a Microreact server.*

## Inputs

**`project`**\
Type: `text`\
Required: No\
The ID (e.g., `fCXBPv48KNkm5oZq8UWdHG`) or the URL (e.g., <https://microreact.org/project/fCXBPv48KNkm5oZq8UWdHG>) of an existing project to be updated. Leave empty to create a new project.

**`name`**\
Type: `text`\
Required: No\
The new project name. If unspecified, defaults to existing project name if there is one, otherwise defaults to `Unnamed project`.

**`description`**\
Type: `text`\
Required: No\
An optional project description in Markdown format.

**`data file`**\
Type: `file`\
Required: No\
A data file in one of the [supported formats](https://docs.microreact.org/instructions/creating-a-microreact-project/supported-file-formats#data-file-formats). Leave empty if using `data url`.

**`data url`**\
Type: `text`\
Required: No\
URL linking to a data file in one of the [supported formats](https://docs.microreact.org/instructions/creating-a-microreact-project/supported-file-formats#data-file-formats). Leave empty if using `data file`.

**`tree file`**\
Type: `file`\
Required: No\
A phylogenetic tree file in Newick format. Leave empty if using `tree url`.

**`tree url`**\
Type: `text`\
Required: No\
URL linking to a tree file in Newick format. Leave empty if using `tree file`.

**`network file`**\
Type: `file`\
Required: No\
A network file in DOT format. Leave empty if using `network url`.

**`network url`**\
Type: `text`\
Required: No\
URL linking to a network file in DOT format. Leave empty if using `network file`.

**`server api`**\
Type: `text`\
Required: No\
The URL of the Microreact server on which the project will be created or updated. If you have a local Microreact installation, you must include /api/ after your Microreact server URL. If unspecified, defaults to `https://microreact.org/`.

**`access token`**\
Type: `text`\
Required: Yes\
The [API access token for a Microreact account](https://docs.microreact.org/api/access-tokens).

**`id column`**\
Type: `text`\
Required: No\
The column name in `data` that will be used as the unique row ID. If unspecified, defaults to `id`.

**`timeline column`**\
Type: `text`\
Required: No\
The column name which contains the timeline data. If unspecified, no timeline will be added when creating a new project.

**`latitude column`**\
Type: `text`\
Required: No\
The column name which contains map latitude values. If unspecified, no map will be added when creating a new project.

**`longitude column`**\
Type: `text`\
Required: No\
The column name which contains map longitude values. If unspecified, no map will be added when creating a new project.

## Outputs

**`id`**\
Type: `text`\
The ID of the Microreact project.

**`url`**\
⁃ *Type*: text\
The URL for the Microreact project.

## Examples

### Example 1: Default behaviour.

#### Inputs:

`data file:` data.csv

```
id, code, name
1, GB, United Kingdom
2, TR, Turkey
3, US, United States
```

`name:` demo-project

`project:` *null (empty)*

`access token:` *null (empty)*

`description:` id

`data url:` *null (empty)*

`network file:` *null (empty)*

`server api:` *null (empty)*

`network url:` *null (empty)*

`access token:` 1234567890

`id column:` *null (empty)*

`timeline column:` *null (empty)*

`latitude column:` *null (empty)*

`longitude column:` *null (empty)*

#### Outputs:

`id`: 12345

`url`: <https://microreact.org/project/testproject>

-> Exported CSV data file to a new Microreact project

## Use Cases

* Process data using Data-flo and export cleaned data to Microreact for visualisation and interactive analysis.&#x20;
* Update an existing Microreact project with new data.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cgps.gitbook.io/data-flo/reference-guide/export-to-microreact-project.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
