8000 Add iNaturalist Integration · Issue #252 · jra3/mulm · GitHub
[go: up one dir, main page]

Skip to content

Add iNaturalist Integration #252

Open

Description

@jra3

Description

Integrate iNaturalist as an external data source for community observations, images, and species occurrence data.

Background

iNaturalist is a citizen science platform with:

  • 90+ million observations of plants and animals
  • High-quality community-verified images
  • Location and habitat data
  • Research-grade observations verified by experts
  • Free REST API access

Benefits

  • Rich image library: Multiple photos per species showing variation
  • Habitat context: Photos in natural settings
  • Geographic data: Where species are actually observed
  • Community engagement: Real-world breeding observations

API Overview

Base URL: https://api.inaturalist.org/v1/

Key Endpoints:

  • GET /taxa/autocomplete?q={scientific_name} - Find taxon by name
  • GET /taxa/{id} - Get taxon details
  • GET /observations?taxon_id={id} - Get observations with photos

Rate Limiting: 60 requests/minute (conservative: use 100ms delay)

Implementation Plan

1. Create Integration Client

// src/integrations/inaturalist.ts
export interface iNaturalistResult {
  found: boolean;
  taxon_url?: string;
  images?: Array<{
    url: string;
    photographer?: string;
    license?: string;
    observation_url?: string;
  }>;
  observations_count?: number;
}

export async function getExternalData(
  genus: string,
  species: string
): Promise<iNaturalistResult>;

2. Create Sync Script

scripts/sync-inaturalist-all-species.ts

3. Integration Points

  • Add to master orchestrator (`sync-all-species-full-database.ts`)
  • Store URLs in `species_external_references` table
  • Download images to R2 with photographer attribution
  • Track with source='inaturalist'

Tasks

  • Create `src/integrations/inaturalist.ts` client
  • Implement taxon search and photo retrieval
  • Create sync script with `--download-images` support
  • Add to master orchestrator
  • Test with various species types
  • Handle Creative Commons licenses properly
  • Update documentation

Acceptance Criteria

  • iNaturalist API client successfully finds taxa
  • Images downloaded with photographer attribution
  • License information stored (CC-BY, CC-BY-NC, etc.)
  • Rate limiting respects API guidelines
  • Sync integrates with existing workflow
  • Documentation updated

Notes

  • License compliance: Most images are CC-BY or CC-BY-NC
  • Attribution required: Store photographer name and observation URL
  • Photo quality: Filter for research-grade observations

Priority

Medium - Great for image diversity and community data.

Related to #240 (External Data Sources Integration)

Activity

  1. added
    enhancementNew feature or request
    databaseDatabase schema, migrations, and data integrity
    priority:mediumMedium priority - important but not urgent
    on Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    databaseDatabase schema, migrations, and data integrityenhancementNew feature or requestpriority:mediumMedium priority - important but not urgent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0