Skip to contents

Retrieves aggregate counts for an artist's portfolio. Use this for profile headers and stat badges where you need artwork/collection totals without loading the full artwork list.

This is more efficient than counting results from get_artist_recent_works() or get_artist_collections_summary() when you only need the counts.

For detailed per-artwork statistics, use get_appdata() instead.

Usage

get_artist_stats(artist, cn = NULL)

Arguments

artist

Character. Artist UUID (format: "746bxxxx-xxxx-xxxx-xxxxxxxxxxxx"). Validated with artcore::validate_uuid() where applicable.

cn

Database connection. If NULL, creates a connection via artcore::dbc() and closes it on exit. Pass an existing connection to batch multiple queries efficiently.

Value

Named list with:

artworks

Total artwork count

collections

Total collection count

member_since

Artist registration date (POSIXct)

Examples

if (FALSE) { # \dontrun{
stats <- get_artist_stats(artist)
cat(stats$artworks, "artworks in", stats$collections, "collections\n")
cat("Member since", format(stats$member_since, "%B %Y"), "\n")
} # }