Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualisation plots/charts #153

Closed
lkeegan opened this issue Nov 11, 2024 · 5 comments · Fixed by #157
Closed

Visualisation plots/charts #153

lkeegan opened this issue Nov 11, 2024 · 5 comments · Fixed by #157
Labels
enhancement New feature or request frontend

Comments

@lkeegan
Copy link
Member

lkeegan commented Nov 11, 2024

For the admin/research interace it would be nice to offer some basic visualisation of the data.

In particular for #133 it would be nice to show the old & new expected ages as lines on a plot of score vs age data points.

unovis looks like a nice option, which comes with a svelte version although they don't yet support svelte 5

@lkeegan lkeegan added enhancement New feature or request frontend labels Nov 11, 2024
@MaHaWo
Copy link
Collaborator

MaHaWo commented Nov 11, 2024

could be overkill, but vega/vega-lite could be an option too: https://www.npmjs.com/package/svelte-vega
Based on d3, it's very powerful, and has a json like description syntax. I have worked with vega before, but not in this context. didn´t look into the svelte component deeply yet...

@MaHaWo
Copy link
Collaborator

MaHaWo commented Nov 11, 2024

@MaHaWo
Copy link
Collaborator

MaHaWo commented Nov 11, 2024

https://d3js.org/

@lkeegan
Copy link
Member Author

lkeegan commented Nov 11, 2024

https://www.layerchart.com/ might also be an option, provides relatively simply looking svelte components, built on top of layercake & d3

@lkeegan
Copy link
Member Author

lkeegan commented Nov 12, 2024

lkeegan added a commit that referenced this issue Nov 12, 2024
- uses placeholder algorithm for now
  - calculates average score for a milestone from each age (1 month bins)
  - expected age is the first age with an average score >= 3
  - the details of this algorithm can be refined later
  - resolves #133
- add view data button below expected age slider in admin edit milestone dialog
  - displays a plot of average scores vs age for this milestone
  - includes a dotted line showing the calculated expected age based on the data
- add admin tab for this
  - displays expected age for each milestone & button to plot data
  - button to calculate new expected age for each
  - button to save changes
- add @unovis/ts chart/plotting library
  - using @unovis/ts for now due to lack of svelte 5 support in @unovis/svelte
  - can switch to the svelte version once this issue is resolved
  - svelte-vega looked more promising but gave an error at build time
  - resolves #153
- add numpy to backend dependencies
- remove default constructors from some models to improve generated typescript types
  - e.g. `milestones: list[MilestoneAdmin] = {}` used to give typescript type `MilestoneAdmin[] | undefined`
  - replace with `milestones: list[MilestoneAdmin]` to give `MilestoneAdmin[]`
lkeegan added a commit that referenced this issue Nov 12, 2024
- uses placeholder algorithm for now
  - calculates average score for a milestone from each age (1 month bins)
  - expected age is the first age with an average score >= 3
  - the details of this algorithm can be refined later
  - resolves #133
- add view data button below expected age slider in admin edit milestone dialog
  - displays a plot of average scores vs age for this milestone
  - includes a dotted line showing the calculated expected age based on the data
- add admin tab for this
  - displays expected age for each milestone & button to plot data
  - button to calculate new expected age for each
  - button to save changes
- add @unovis/ts chart/plotting library
  - using @unovis/ts for now due to lack of svelte 5 support in @unovis/svelte
  - can switch to the svelte version once this issue is resolved
  - svelte-vega looked more promising but gave an error at build time
  - resolves #153
- add numpy to backend dependencies
- remove default constructors from some models to improve generated typescript types
  - e.g. `milestones: list[MilestoneAdmin] = {}` used to give typescript type `MilestoneAdmin[] | undefined`
  - replace with `milestones: list[MilestoneAdmin]` to give `MilestoneAdmin[]`
Majapur1 pushed a commit that referenced this issue Nov 14, 2024
* Automatically calculate milestone expected ages

- uses placeholder algorithm for now
  - calculates average score for a milestone from each age (1 month bins)
  - expected age is the first age with an average score >= 3
  - the details of this algorithm can be refined later
  - resolves #133
- add view data button below expected age slider in admin edit milestone dialog
  - displays a plot of average scores vs age for this milestone
  - includes a dotted line showing the calculated expected age based on the data
- add admin tab for this
  - displays expected age for each milestone & button to plot data
  - button to calculate new expected age for each
  - button to save changes
- add @unovis/ts chart/plotting library
  - using @unovis/ts for now due to lack of svelte 5 support in @unovis/svelte
  - can switch to the svelte version once this issue is resolved
  - svelte-vega looked more promising but gave an error at build time
  - resolves #153
- add numpy to backend dependencies
- remove default constructors from some models to improve generated typescript types
  - e.g. `milestones: list[MilestoneAdmin] = {}` used to give typescript type `MilestoneAdmin[] | undefined`
  - replace with `milestones: list[MilestoneAdmin]` to give `MilestoneAdmin[]`

* update openapi.json & openapi-ts client

* fix incorrect progress bar update

* use better translation

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants