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

Addition to the API #30

Open
Kaffeedor opened this issue Jun 2, 2021 · 3 comments
Open

Addition to the API #30

Kaffeedor opened this issue Jun 2, 2021 · 3 comments
Labels
API FRBSTATS API system good first issue Good for newcomers

Comments

@Kaffeedor
Copy link

Make it possbile to get the genereal stats (like total observerd events, repeaters, galactic sources, event coverage)
Maybe also accsess to the FRB Count over Time Graph, or the FRB Class graph (as png?)
Maybe also a filter option not to only search by name?!

@0xCoto 0xCoto added API FRBSTATS API system good first issue Good for newcomers labels Jun 5, 2021
@Kaffeedor
Copy link
Author

Kaffeedor commented Jun 7, 2021

Ideas on how to implement stuff mentiond in this issue

Instead of having this data hard-coded into the website like this:
image
having a variable and then (python?) script that updates this variable everytime a new FRB gets added to the catalouge.
To do this:

  1. Maybe its possible to trigger that after every FRB added or
  2. having a other script checking every few minutes if the catalouge got updated (with comparing it to a backup)

Then after having that one could add a command or whatever its called to the API with like "https://www.herta-experiment.org/frbstats/api/generalstats" which returns these stats as an array like with the FRBs.

Also pretty much the same for the graphs just with a linke maybe like this:
"https://www.herta-experiment.org/frbstats/api/graphs?x=" + x + "?y=" y

Also for the filter option maybe smth like this:
"https://www.herta-experiment.org/frbstats/api/search?frb=" + frb + "?date=" + date + "?telescope=" + telescope ... etc.
(i dont quite know how this link thingy works so probably aint right the way ive written it but i hope you will know what i mean)

@0xCoto
Copy link
Member

0xCoto commented Jun 7, 2021

Dynamic updating of events observed is part of #24 (it's actually the only one that is constantly up-to-date automatically). There's a JavaScript snippet in index.html which counts the lines of catalogue.csv, so it's not actually hard-coded in there (see the file on GitHub to prevent your browser from rubbing the JS code).

I think the API support for the stats should come only after #24 is covered.

@Kaffeedor
Copy link
Author

Kaffeedor commented Jun 8, 2021

image
image

maybe also could just get the numbers directly of the website
same with the plots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API FRBSTATS API system good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants