# net.anisota.chronicle.log.weekly

> Published by [anisota.net](https://lexicon.garden/identity/did:plc:lcieujcfkv4jx7gehsvok3pr)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:lcieujcfkv4jx7gehsvok3pr/net.anisota.chronicle.log.weekly)
- [Documentation](https://lexicon.garden/lexicon/did:plc:lcieujcfkv4jx7gehsvok3pr/net.anisota.chronicle.log.weekly/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:lcieujcfkv4jx7gehsvok3pr/net.anisota.chronicle.log.weekly/examples)

## Definitions

### `net.anisota.chronicle.log.weekly`

**Type**: `record`

Weekly aggregation of daily records. rkey is YYYY-WNN (ISO week). Updated once per day, finalized when week ends.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `week` | `string` | Yes | ISO week string in YYYY-WNN format (e.g. 2026-W06) |
| `status` | `string` | Yes | Whether this week is still being updated or has been finalized |
| `trends` | `ref` → `#trendData` | No |  |
| `patterns` | `ref` → `#weeklyPatterns` | No |  |
| `createdAt` | `string` (datetime) | Yes | When the weekly record was first created |
| `signature` | `ref` → `#chronicleSignature` | Yes |  |
| `aggregates` | `ref` → `#weeklyAggregates` | Yes |  |
| `finalizedAt` | `string` (datetime) | No | When the weekly record was finalized (end of week) |
| `lowerLogRefs` | `array` | No | AT URIs of daily log records included in this week |
| `upperLogRefs` | `array` | No | AT URIs of containing logs (monthly, yearly) this week belongs to |
| `expeditionRefs` | `array` | No | AT URIs of expedition records that occurred during this week |

### `net.anisota.chronicle.log.weekly#trendData`

**Type**: `object`

Week-over-week trend comparisons

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `xpChange` | `string` | No | Percentage change in XP compared to previous week (e.g. '+12%') |
| `activityChange` | `string` | No | Percentage change in activity compared to previous week |
| `engagementChange` | `string` | No | Percentage change in engagement compared to previous week |

### `net.anisota.chronicle.log.weekly#weeklyPatterns`

**Type**: `object`

Activity pattern aggregation for the week based on half-hour blocks

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `peakBlocks` | `integer` | No | Highest activeBlockCount for any single day in the week |
| `avgBlocksPerDay` | `integer` | No | Average active blocks per day (totalActiveBlocks / daysActive, rounded) |
| `totalActiveBlocks` | `integer` | No | Sum of activeBlockCount across all days in the week |

### `net.anisota.chronicle.log.weekly#weeklyAggregates`

**Type**: `object`

Rolled-up counts from daily records

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `postsRead` | `integer` | No | Total posts read this week |
| `daysActive` | `integer` | No | Number of days with activity this week |
| `postsCreated` | `integer` | No | Total posts created this week |
| `likesReceived` | `integer` | No | Total likes received this week |
| `totalXPGained` | `integer` | No | Total XP gained this week |
| `quotesReceived` | `integer` | No | Total quotes received this week |
| `repliesReceived` | `integer` | No | Total replies received this week |
| `repostsReceived` | `integer` | No | Total reposts received this week |
| `specimensPhotographed` | `integer` | No | New specimens photographed this week |

### `net.anisota.chronicle.log.weekly#chronicleSignature`

**Type**: `object`

ES256 cryptographic signature proving record authenticity

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `alg` | `string` | Yes | Signing algorithm (ES256) |
| `kid` | `string` | Yes | Key identifier for the signing key |
| `sig` | `string` | Yes | Base64-encoded ES256 signature |
| `nonce` | `string` | Yes | Unique random nonce to prevent replay |
| `version` | `integer` | Yes | Signature schema version |
| `signedAt` | `string` (datetime) | Yes | When the record was signed |

## Raw Schema

```json
{
  "id": "net.anisota.chronicle.log.weekly",
  "defs": {
    "main": {
      "key": "any",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "week",
          "aggregates",
          "status",
          "signature",
          "createdAt"
        ],
        "properties": {
          "week": {
            "type": "string",
            "description": "ISO week string in YYYY-WNN format (e.g. 2026-W06)"
          },
          "status": {
            "enum": [
              "active",
              "finalized"
            ],
            "type": "string",
            "description": "Whether this week is still being updated or has been finalized"
          },
          "trends": {
            "ref": "#trendData",
            "type": "ref"
          },
          "patterns": {
            "ref": "#weeklyPatterns",
            "type": "ref"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When the weekly record was first created"
          },
          "signature": {
            "ref": "#chronicleSignature",
            "type": "ref"
          },
          "aggregates": {
            "ref": "#weeklyAggregates",
            "type": "ref"
          },
          "finalizedAt": {
            "type": "string",
            "format": "datetime",
            "description": "When the weekly record was finalized (end of week)"
          },
          "lowerLogRefs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "AT URIs of daily log records included in this week"
          },
          "upperLogRefs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "AT URIs of containing logs (monthly, yearly) this week belongs to"
          },
          "expeditionRefs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "AT URIs of expedition records that occurred during this week"
          }
        }
      },
      "description": "Weekly aggregation of daily records. rkey is YYYY-WNN (ISO week). Updated once per day, finalized when week ends."
    },
    "trendData": {
      "type": "object",
      "properties": {
        "xpChange": {
          "type": "string",
          "description": "Percentage change in XP compared to previous week (e.g. '+12%')"
        },
        "activityChange": {
          "type": "string",
          "description": "Percentage change in activity compared to previous week"
        },
        "engagementChange": {
          "type": "string",
          "description": "Percentage change in engagement compared to previous week"
        }
      },
      "description": "Week-over-week trend comparisons"
    },
    "weeklyPatterns": {
      "type": "object",
      "properties": {
        "peakBlocks": {
          "type": "integer",
          "maximum": 48,
          "minimum": 0,
          "description": "Highest activeBlockCount for any single day in the week"
        },
        "avgBlocksPerDay": {
          "type": "integer",
          "minimum": 0,
          "description": "Average active blocks per day (totalActiveBlocks / daysActive, rounded)"
        },
        "totalActiveBlocks": {
          "type": "integer",
          "minimum": 0,
          "description": "Sum of activeBlockCount across all days in the week"
        }
      },
      "description": "Activity pattern aggregation for the week based on half-hour blocks"
    },
    "weeklyAggregates": {
      "type": "object",
      "properties": {
        "postsRead": {
          "type": "integer",
          "minimum": 0,
          "description": "Total posts read this week"
        },
        "daysActive": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of days with activity this week"
        },
        "postsCreated": {
          "type": "integer",
          "minimum": 0,
          "description": "Total posts created this week"
        },
        "likesReceived": {
          "type": "integer",
          "minimum": 0,
          "description": "Total likes received this week"
        },
        "totalXPGained": {
          "type": "integer",
          "minimum": 0,
          "description": "Total XP gained this week"
        },
        "quotesReceived": {
          "type": "integer",
          "minimum": 0,
          "description": "Total quotes received this week"
        },
        "repliesReceived": {
          "type": "integer",
          "minimum": 0,
          "description": "Total replies received this week"
        },
        "repostsReceived": {
          "type": "integer",
          "minimum": 0,
          "description": "Total reposts received this week"
        },
        "specimensPhotographed": {
          "type": "integer",
          "minimum": 0,
          "description": "New specimens photographed this week"
        }
      },
      "description": "Rolled-up counts from daily records"
    },
    "chronicleSignature": {
      "type": "object",
      "required": [
        "sig",
        "alg",
        "kid",
        "signedAt",
        "nonce",
        "version"
      ],
      "properties": {
        "alg": {
          "type": "string",
          "description": "Signing algorithm (ES256)"
        },
        "kid": {
          "type": "string",
          "description": "Key identifier for the signing key"
        },
        "sig": {
          "type": "string",
          "description": "Base64-encoded ES256 signature"
        },
        "nonce": {
          "type": "string",
          "description": "Unique random nonce to prevent replay"
        },
        "version": {
          "type": "integer",
          "description": "Signature schema version"
        },
        "signedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the record was signed"
        }
      },
      "description": "ES256 cryptographic signature proving record authenticity"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
