load_findingemo_annotations: Load FindingEmo-Light Annotations

View source: R/datasets_findingemo.R

load_findingemo_annotationsR Documentation

Load FindingEmo-Light Annotations

Description

Loads and preprocesses annotations from a downloaded FindingEmo-Light dataset. Returns a clean R data.frame with emotion annotations, valence/arousal scores, and associated metadata.

Usage

load_findingemo_annotations(
  data_dir,
  output_format = c("dataframe", "list"),
  python_path = NULL
)

Arguments

data_dir

Character. Directory containing the downloaded FindingEmo data.

output_format

Character. Format for processed data: "dataframe" returns R data.frame, "list" returns full processed data (default: "dataframe").

python_path

Character. Path to Python executable (optional).

Details

This function loads the CSV annotation file and JSON URLs file from a downloaded FindingEmo dataset, performs basic validation and preprocessing, and returns the data in a format suitable for emotion analysis.

The function handles missing values, validates valence/arousal ranges, and provides summary statistics for the loaded data.

Value

If output_format = "dataframe": A data.frame with columns:

  • image_id: Unique image identifier

  • valence: Valence score (emotion positivity)

  • arousal: Arousal score (emotion intensity)

  • Additional columns as present in the dataset

If output_format = "list": A list containing:

  • annotations: Data.frame with annotation data

  • urls: List with image URL information

  • metadata: List with dataset metadata

See Also

download_findingemo_data, prepare_findingemo_evaluation

Examples

## Not run: 
# Download dataset first
download_result <- download_findingemo_data("./findingemo_data")

if (download_result$success) {
  # Load annotations as data.frame
  annotations <- load_findingemo_annotations("./findingemo_data")
  
  # Examine the data
  head(annotations)
  summary(annotations)
  
  # Get full processed data including metadata
  full_data <- load_findingemo_annotations(
    data_dir = "./findingemo_data",
    output_format = "list"
  )
  
  print(full_data$metadata)
}

## End(Not run)


transforEmotion documentation built on Jan. 8, 2026, 5:06 p.m.