# fyi.contributions.dataset

> Describes the contributions.fyi dataset and links the complete data files, so one getRecord and one getBlob per file downloads everything.

- Kind: record
- Record key: literal:self
- Authority: contributions.fyi
- Lexicon: 1
- Published by [data.contributions.fyi](https://lexicon.garden/identity/did:plc:ej5cllsvxdrzdsweyfgr2nge), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:ej5cllsvxdrzdsweyfgr2nge/fyi.contributions.dataset)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:ej5cllsvxdrzdsweyfgr2nge/fyi.contributions.dataset/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:ej5cllsvxdrzdsweyfgr2nge/fyi.contributions.dataset/analytics)

## Record (`fyi.contributions.dataset`)

Type: record · key literal:self

### Properties

- `collections` (array, required): The per-entity record collections in this repository.
  - `items` (ref)
    - Reference: `lex:fyi.contributions.dataset#collection`
- `cycles` (array, required): Election cycles covered, named for the year each ends.
  - `items` (integer)
- `description` (string, required)
- `files` (array, required): The complete data files, gzipped: JSON, the same data as SQLite, and the source records behind it as SQLite.
  - `items` (ref)
    - Reference: `lex:fyi.contributions.dataset#file`
- `generatedAt` (string · datetime, required): When the data was built.
- `license` (string, required)
- `links` (array)
  - `items` (ref)
    - Reference: `lex:fyi.contributions.dataset#link`
- `methodology` (string)
- `name` (string, required)
- `recordsComplete` (boolean): False while the per-entity records are still being brought in line with this generation of the data; the files are always complete.
- `sources` (array, required)
  - `items` (ref)
    - Reference: `lex:fyi.contributions.dataset#source`
- `updatedAt` (string · datetime, required)

## #collection (`fyi.contributions.dataset#collection`)

Type: object

### Properties

- `nsid` (string · nsid, required)
- `records` (integer, required)

## #file (`fyi.contributions.dataset#file`)

Type: object

### Properties

- `blob` (blob, required)
  - Constraints: accept: application/gzip
- `description` (string)
- `format` (string): What's inside the gzip.
  - Constraints: knownValues: json | sqlite
- `name` (string, required): e.g. 'members.json.gz', 'contributions.sqlite.gz'.
- `records` (integer, required): Entities in a JSON file; rows across all tables in a SQLite one.
- `sha256` (string, required): Hex SHA-256 of the uncompressed file.

## #link (`fyi.contributions.dataset#link`)

Type: object

### Properties

- `name` (string, required)
- `url` (string · uri, required)

## #source (`fyi.contributions.dataset#source`)

Type: object

### Properties

- `name` (string, required)
- `url` (string · uri, required)
- `usedFor` (string)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "collection": {
      "properties": {
        "nsid": {
          "format": "nsid",
          "type": "string"
        },
        "records": {
          "type": "integer"
        }
      },
      "required": [
        "nsid",
        "records"
      ],
      "type": "object"
    },
    "file": {
      "properties": {
        "blob": {
          "accept": [
            "application/gzip"
          ],
          "type": "blob"
        },
        "description": {
          "type": "string"
        },
        "format": {
          "description": "What's inside the gzip.",
          "knownValues": [
            "json",
            "sqlite"
          ],
          "type": "string"
        },
        "name": {
          "description": "e.g. 'members.json.gz', 'contributions.sqlite.gz'.",
          "type": "string"
        },
        "records": {
          "description": "Entities in a JSON file; rows across all tables in a SQLite one.",
          "type": "integer"
        },
        "sha256": {
          "description": "Hex SHA-256 of the uncompressed file.",
          "type": "string"
        }
      },
      "required": [
        "name",
        "blob",
        "records",
        "sha256"
      ],
      "type": "object"
    },
    "link": {
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "name",
        "url"
      ],
      "type": "object"
    },
    "main": {
      "description": "Describes the contributions.fyi dataset and links the complete data files, so one getRecord and one getBlob per file downloads everything.",
      "key": "literal:self",
      "record": {
        "properties": {
          "collections": {
            "description": "The per-entity record collections in this repository.",
            "items": {
              "ref": "lex:fyi.contributions.dataset#collection",
              "type": "ref"
            },
            "type": "array"
          },
          "cycles": {
            "description": "Election cycles covered, named for the year each ends.",
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "description": {
            "type": "string"
          },
          "files": {
            "description": "The complete data files, gzipped: JSON, the same data as SQLite, and the source records behind it as SQLite.",
            "items": {
              "ref": "lex:fyi.contributions.dataset#file",
              "type": "ref"
            },
            "type": "array"
          },
          "generatedAt": {
            "description": "When the data was built.",
            "format": "datetime",
            "type": "string"
          },
          "license": {
            "type": "string"
          },
          "links": {
            "items": {
              "ref": "lex:fyi.contributions.dataset#link",
              "type": "ref"
            },
            "type": "array"
          },
          "methodology": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "recordsComplete": {
            "description": "False while the per-entity records are still being brought in line with this generation of the data; the files are always complete.",
            "type": "boolean"
          },
          "sources": {
            "items": {
              "ref": "lex:fyi.contributions.dataset#source",
              "type": "ref"
            },
            "type": "array"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "name",
          "description",
          "generatedAt",
          "cycles",
          "files",
          "collections",
          "sources",
          "license",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "source": {
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "format": "uri",
          "type": "string"
        },
        "usedFor": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "url"
      ],
      "type": "object"
    }
  },
  "id": "fyi.contributions.dataset",
  "lexicon": 1
}
```
