# computer.localnetwork.directory.getCharts

> The tracks and artists the directory's DJs supported most in sets played in a time and place, counted the way 1001Tracklists counts its Top 101 Producers: a DJ (a project, however many accounts manage it) supports a track once however often they play it, a track charts once 3 DJs support it, and an artist gets at most 5 supports from one DJ, counting only tracks that chart. Also lists every city there are sets from.

- Kind: query
- Authority: directory.localnetwork.computer
- Lexicon: 1
- Published by [localnetwork.computer](https://lexicon.garden/identity/did:plc:d42l64gsczg6qh2vo243xv5l), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.directory.getCharts)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.directory.getCharts/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.directory.getCharts/analytics)

## Query (`computer.localnetwork.directory.getCharts`)

Type: query · GET

### Parameters (query string)

- `before` (string): The day after the last one counted, as YYYY-MM-DD. Without it, every set from `since` on.
  - Constraints: minLength: 10, maxLength: 10
- `city` (string): Only sets played in this city (the set's location.locality, any case). Needs country.
  - Constraints: maxLength: 200
- `country` (string): The city's country, as an ISO 3166-1 alpha-2 code.
  - Constraints: minLength: 2, maxLength: 2
- `limit` (integer): The most tracks, and the most artists.
  - Constraints: minimum: 1, maximum: 100, default: 50
- `since` (string): The first day counted, as YYYY-MM-DD. Without it, every set before `before`.
  - Constraints: minLength: 10, maxLength: 10

### Output (application/json)

- `artists` (array, required): Most supported first.
  - `items` (ref)
    - Reference: `computer.localnetwork.directory.defs#supportedArtist`
- `places` (array, required): Cities with sets, by how many, whatever the other params say.
  - `items` (ref)
    - Reference: `computer.localnetwork.directory.defs#place`
- `tracks` (array, required): Most supported first, then most recently played.
  - `items` (ref)
    - Reference: `computer.localnetwork.directory.defs#supportedTrack`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The tracks and artists the directory's DJs supported most in sets played in a time and place, counted the way 1001Tracklists counts its Top 101 Producers: a DJ (a project, however many accounts manage it) supports a track once however often they play it, a track charts once 3 DJs support it, and an artist gets at most 5 supports from one DJ, counting only tracks that chart. Also lists every city there are sets from.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "artists": {
              "description": "Most supported first.",
              "items": {
                "ref": "computer.localnetwork.directory.defs#supportedArtist",
                "type": "ref"
              },
              "type": "array"
            },
            "places": {
              "description": "Cities with sets, by how many, whatever the other params say.",
              "items": {
                "ref": "computer.localnetwork.directory.defs#place",
                "type": "ref"
              },
              "type": "array"
            },
            "tracks": {
              "description": "Most supported first, then most recently played.",
              "items": {
                "ref": "computer.localnetwork.directory.defs#supportedTrack",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "tracks",
            "artists",
            "places"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "before": {
            "description": "The day after the last one counted, as YYYY-MM-DD. Without it, every set from `since` on.",
            "maxLength": 10,
            "minLength": 10,
            "type": "string"
          },
          "city": {
            "description": "Only sets played in this city (the set's location.locality, any case). Needs country.",
            "maxLength": 200,
            "type": "string"
          },
          "country": {
            "description": "The city's country, as an ISO 3166-1 alpha-2 code.",
            "maxLength": 2,
            "minLength": 2,
            "type": "string"
          },
          "limit": {
            "default": 50,
            "description": "The most tracks, and the most artists.",
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "since": {
            "description": "The first day counted, as YYYY-MM-DD. Without it, every set before `before`.",
            "maxLength": 10,
            "minLength": 10,
            "type": "string"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "computer.localnetwork.directory.getCharts",
  "lexicon": 1
}
```
