mac-mg / wca-db-export

Scripts for extracting data related to Madagascar from the WCA database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wca-data-export

Export

This repository contains scripts for exporting data related to Madagascar from the World Cube Association's database.

The extracted data are stored in the data directory and it contains the follwing files:

  • persons.json: contains the list of all cubers from Madagascar.
  • averages.json: contains the average times for all events.
  • singles.json: contains the single times for all events.
  • records.json: contains the local records for single and average times.

Schemas

Objects type definitions using Typescript:

WcaEvent
type WcaEvent =
  | "222"
  | "333"
  | "333bf"
  | "333fm"
  | "333mbf"
  | "333oh"
  | "444"
  | "444bf"
  | "555"
  | "555bf"
  | "666"
  | "777"
  | "clock"
  | "minx"
  | "pyram"
  | "skewb"
  | "sq1";
persons.json

The file is made of an array of Person as described bellow:

type Person = {
  wcaId: string;
  name: string;
  gender: "m" | "f";
  records: number;
  medals: {
    gold: number;
    silver: number;
    bronze: number;
  };
};
singles.json

The file is made of an array of RankEntry as described bellow:

type RankEntry = {
  eventId: WcaEvent;
  rank: number;
  time: number;
  wcaId: string;
  name: string;
  gender: "m" | "f";
};
averages.json

The file is made of an array of RankEntry as described bellow:

type RankEntry = {
  eventId: WcaEvent;
  rank: number;
  time: number;
  wcaId: string;
  name: string;
  gender: "m" | "f";
};
records.json

The file is described by the Records object bellow:

type Records = {
  [key in WcaEvent]: {
    single: RecordEntry[];
    average: RecordEntry[];
  } | null;
};

type RecordEntry = {
  eventId: WcaEvent;
  time: number;
  wcaId: string;
  name: string;
};

About

Scripts for extracting data related to Madagascar from the WCA database

License:MIT License


Languages

Language:JavaScript 100.0%