> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fix6.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Creating a project

## What is a project?

In terms of this API, a project represents a single asset that you would like to have monitored or be assessed.
This can include a large area of forest, a set of farm parcels, or a single location given by a lat/lon coordinate.

> 📘 **Info**
>
> We are testing endpoints that deal with portfolios of projects/locations.
> This is a new feature and is not yet available to all users.
> If you are interested in this feature, please contact us at [api@fix6.io](mailto:api@fix6.io)

## Example workflow for creating a project

As an example for a project let's start with Central Park in New York City.
This guide assumes that you have created a GeoJSON or KML file of the area of interest.

<Frame>
  <img src="https://mintcdn.com/fix6-70/oRzaCdnu37kXSuRT/images/central_park.png?fit=max&auto=format&n=oRzaCdnu37kXSuRT&q=85&s=2820240a34d14df992a848a8708372ed" style={{borderRadius: "0.5rem"}} width="1989" height="1100" data-path="images/central_park.png" />
</Frame>

### 1. Create a project

With a GeoJSON or KML file, we can create a project.

```python create_project.py theme={null}
import requests

API_URL = "https://api.fix6.io"
API_KEY = "YOUR_API_KEY"

file_path = './central_park.geojson'
file = {'file': open(file_path, 'rb')}
parameters = {"project_name": "Central Park"}
headers = {"x-api-key": API_KEY}
response = requests.post(f"{API_URL}/projects", files=file, headers=headers, params=parameters)

file['file'].close()
print(response.json())
```

The response contains some important information about the project.
The `id` is the unique identifier for the project and will be used to access information about the project.
The area of the project is also returned in `area_hectares` and will be subtracted from your quota.

```json project_response.json theme={null}
{
  "id": "proj_2TOMfdiGbslzxRuD6m3PJq5s7g0",
  "geometry": "<A GEOJSON FILE OF THE PROJECT'S GEOMETRY>",
  "geometry_hash": "45401b2c19763c9cc55d4ac0cf95005b",
  "user_id": "<YOUR USER ID>",
  "project_name": "Central Park",
  "created_at": "2023-06-01T17:09:37+00:00",
  "updated_at": "2023-06-01T17:09:37+00:00",
  "area_hectares": 340.9769090618438,
  "centroid_lat": 40.782506165278654,
  "centroid_lon": -73.96553967706286
}
```

### 2. Retrieving your projects

You can retrieve a list of your projects using the `GET /projects` endpoint.

```python get_projects.py theme={null}
response = requests.get(f"{API_URL}/projects", headers=headers)
print(response.json())
```

This returns metadata for your projects, *without* the geometry. To retrieve the geometry you can call the `GET /projects/{project_id}` endpoint.

```json theme={null}
[
  {
    "id": "proj_2TOMfdiGbslzxRuD6m3PJq5s7g0",
    "user_id": "user_cl8i3kzqb0006izrnzuz5fxlq",
    "project_name": "Central Park",
    "created_at": "2023-08-01T17:09:37",
    "updated_at": "2023-08-01T17:09:37+00:00",
    "area_hectares": 340.977,
    "centroid_lat": 40.7825,
    "centroid_lon": -73.9655
  }
]
```

### 3. Seeing data available for your project

When you submit a new project, it kicks of a process of collecting data for your area of interest from terabytes of satellite imagery, remote sensing, and climate data.
We then automatically start running our models on this data to generate insights for your project.
This process can take a roughly fifteen minutes to a few hours depending on the size of your project and the amount of data available.
If you would like to see the status of your project, you can use the `GET /projects/{project_id}/available_data` endpoint.

```python see_available_data.py theme={null}
response = requests.get(f"{API_URL}/projects/{project_id}/available_data", headers=headers)
print(response.json())
```

The response will contain a list of the data that is available for your project, with an example given below.

* `remote_sensing_indices` contains the date range of the satellite imagery that is available for your project
* `climate_risk` contains a list of climate indicators
* `carbon_programs` contains information about carbon programs and a status of analyses done to date
* `climate_programs` contains information about climate reporting programs and a status of analyses done to date

These analyses are an optional part of your plan and determined during onboarding.
Any analyses that are is in the process of being run will contain `null`.
The example below shows that the project is eligible for the Verra ARR program, but the analyses have not yet been run to
determine the baseline sequestration or performance benchmark for the project.

```json available_data_response.json theme={null}
{
  "remote_sensing_indices": {
    "min": "2017-01-19T14:45:47.000000000",
    "max": "2023-07-22T14:53:46.000000000"
  },
  "climate_risk": [
    "Potential evapotranspiration",
    "Drought code",
    "Duff moisture code",
    "Fine fuel moisture code",
    "Initial spread index",
    "Buildup index",
    "Fire weather index"
  ],
  "carbon_programs": {
    "program": "Verra ARR",
    "eligibility_status": "Eligible",
    "baseline_sequestration": null,
    "performance_benchmark": null
  },
  "climate_programs": null
}
```
