Observation

class pyinaturalist.models.Observation(created_at_details=None, observed_on_string=None, observed_time_zone=None, time_zone_offset=None, **kwargs)

Bases: pyinaturalist.models.base.BaseModel

An observation, based the schema of GET /observations

__init__(created_at_details=None, observed_on_string=None, observed_time_zone=None, time_zone_offset=None, **kwargs)

Method generated by attrs for class Observation.

Attributes

Name

Type

Description

id

int

Unique record ID

created_at

datetime

Date and time the observation was created

captive

bool

Indicates if the organism is non-wild (captive or cultivated)

community_taxon_id

int

The current community identification taxon

description

str

Observation description

faves

List[Dict]

Details on users who have favorited the observation

geoprivacy

str

Location privacy level

Options: obscured, obscured_private, open, private

identifications_count

int

Total number of identifications

identifications_most_agree

bool

Indicates if most identifications agree with the community ID

identifications_most_disagree

bool

Indicates if most identifications disagree with the community ID

identifications_some_agree

bool

Indicates if some identifications agree with the community ID

license_code

str

Creative Commons license code

Options: CC-BY, CC-BY-NC, CC-BY-ND, CC-BY-SA, CC-BY-NC-ND, CC-BY-NC-SA, CC0, ALL RIGHTS RESERVED

location

Tuple[float, float]

Location in (latitude, logitude) decimal degrees

mappable

bool

Indicates if the observation can be shown on a map

num_identification_agreements

int

Total identifications that agree with the community ID

num_identification_disagreements

int

Total identifications that disagree with the community ID

oauth_application_id

str

ID of the OAuth application used to create the observation, if any

obscured

bool

Indicates if coordinates are obscured (showing a broad approximate location on the map)

observed_on

datetime

Date and time the organism was observed

outlinks

List[Dict]

Linked observation pages on other sites (e.g., GBIF)

out_of_range

bool

Indicates if the taxon is observed outside of its known range

owners_identification_from_vision

bool

Indicates if the owner’s ID was selected from computer vision results

place_guess

str

Place name determined from observation coordinates

place_ids

List[int]

positional_accuracy

int

GPS accuracy in meters (real accuracy, if obscured)

preferences

Dict[str, Any]

Any user observation preferences (related to community IDs, coordinate access, etc.)

project_ids

List[int]

All associated project IDs

project_ids_with_curator_id

List[int]

Project IDs with a curator identification for this observation

project_ids_without_curator_id

List[int]

Project IDs without curator identification for this observation

public_positional_accuracy

int

GPS accuracy in meters (not accurate if obscured)

quality_grade

str

Quality grade

Options: casual, needs_id, research

quality_metrics

List[Dict]

Data quality assessment metrics

reviewed_by

List[int]

IDs of users who have reviewed the observation

site_id

int

Site ID for iNaturalist network members, or 1 for inaturalist.org

sounds

List[Dict]

Observation sound files

species_guess

str

Taxon name from observer’s initial identification

tags

List[str]

Arbitrary user tags added to the observation

updated_at

datetime

Date and time the observation was last updated

uri

str

Link to observation details page

uuid

str

Universally unique ID; generally preferred over id where possible

votes

List[Dict]

Votes on data quality assessment metrics

photo_url (property)

Optional[str]

Original size photo URL for first observation photo (if any)

thumbnail_url (property)

Optional[str]

Thumbnail size photo URL for first observation photo (if any)

annotations (LazyProperty)

List[Annotation]

Observation annotations

comments (LazyProperty)

List[Comment]

Observation comments

identifications (LazyProperty)

List[Identification]

Observation identifications

ofvs (LazyProperty)

List[ObservationFieldValue]

Observation field values

photos (LazyProperty)

List[Photo]

Observation photos

project_observations (LazyProperty)

List[ProjectObservation]

Details on any projects that the observation has been added to

taxon (LazyProperty)

Taxon

Observation taxon

user (LazyProperty)

User

Observer

Methods

__init__(created_at_details=None, observed_on_string=None, observed_time_zone=None, time_zone_offset=None, **kwargs)

Method generated by attrs for class Observation.

classmethod from_id(id)

Lookup and create a new Observation object from an ID

classmethod from_json(value, **kwargs)

Initialize a single model object from an API response or response result.

Omits any invalid fields and None values, so default factories are used instead (e.g. for empty dicts and lists).

Return type

TypeVar(T, bound= BaseModel)

classmethod from_json_file(value)

Initialize a collection of model objects from a JSON string, file path, or file-like object

Return type

List[TypeVar(T, bound= BaseModel)]

classmethod from_json_list(value)

Initialize a collection of model objects from an API response or response results

Return type

List[TypeVar(T, bound= BaseModel)]

to_json()

Convert this object back to JSON (dict) format

Return type

Dict[str, Any]