fetch_wave_data {waetr}R Documentation

Fetch WAVE Analysis Data

Description

Retrieves accessibility analysis data either from WAVE API or local JSON files

Usage

fetch_wave_data(
  input,
  api_key = NULL,
  report_type = 1,
  is_json = FALSE,
  delay = 1
)

Arguments

input

Character vector. Either URLs to analyze or paths to JSON files

api_key

Character string. WAVE API key (required for URL analysis)

report_type

Integer. WAVE report type (1-4):

  • 1: Basic statistics only (1 credit)

  • 2: Includes WAVE items (2 credits)

  • 3: Includes XPath data (3 credits)

  • 4: Includes CSS selector data (3 credits)

is_json

Logical. Whether input contains JSON file paths (default: FALSE)

delay

Numeric. Delay between API calls in seconds (default: 1)

Value

List of WAVE analysis results

Examples

## Not run: 
# Fetch from URLs
results <- fetch_wave_data(
  input = c("https://example.com", "https://example.org"),
  api_key = "your_api_key"
)

# Load from JSON files
json_results <- fetch_wave_data(
  input = c("site1.json", "site2.json"),
  is_json = TRUE
)

## End(Not run)

[Package waetr version 0.1.0 Index]