zakodium-oss / react-science

React components and tools to build scientific applications.
https://react-science.pages.dev
MIT License
3 stars 6 forks source link

Create a dashboard as a react component. #762

Closed lpatiny closed 1 month ago

lpatiny commented 1 month ago

This should be done in a new PR.

We would like a dashboard that display all the statistics about what is available in the database.

https://docs.google.com/presentation/d/1pK9qifKQoVEREP4P2Mkx45fbEQjKixTfzyEkHaLsaKw/edit?usp=sharing

For the chart we would like:

https://nivo.rocks/

You can get an example of data here:

https://nmrdb.cheminfo.org/v1/getStats

The type for stats is:

export interface Stats {
  lastUpdate: number;
  nbFiles: number;
  nbNMRs: number;
  nb1D: number;
  nb2D: number;
  nbIsFid: number;
  nbIsFt: number;
  solvents: Array<{ count: number; solvent: string }>;
  formats: Array<{ count: number; format: string }>;
  nuclei: Array<{ count: number; nucleus: string }>;
  pulseSequences: Array<{ count: number; pulseSequence: string }>;
  users: Array<{ count: number; lastModified: number; username: string }>;
  sources: Array<{ count: number; lastModified: number; source: string }>;
  perMonths: PeriodMonth[];
  perYears: PeriodYear[];
}
wadjih-bencheikh18 commented 1 month ago

We can close this issue