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

Create queries for top-line stats #117

Open
interplanetarychris opened this issue Apr 21, 2020 · 1 comment
Open

Create queries for top-line stats #117

interplanetarychris opened this issue Apr 21, 2020 · 1 comment
Assignees
Milestone

Comments

@interplanetarychris
Copy link
Contributor

To support a trusat-frontend dashboard view, database.py will need new query(s) to support generation stats-on-demand such as the following

Satellites: 4282
Observations: 134,811
Users: 98
Satellites updated in the last 30 days: 826
Observations in the last 30 days: 3679
Active users in the last 30 days: 11

Consider creating a trigger to update this data (in a dedicated table) everytime IOD, TLE, Station, or Observer data is updated.

@interplanetarychris
Copy link
Contributor Author

interplanetarychris commented Apr 24, 2020

To support discussion (and perhaps for eventual documentation on learn.trusat.org), here's a little documentation on these stats:

"total_sat_count": 7590
Total number of unique norad objects in the catalog (all time)

"total_obs_count": 484727
Total number of observations in the catalog (all time)

"total_user_count": 322
Total number of registered users

"total_station_count": 169
Total number of registered stations (includes publicly-known COSPAR #### as well as Trusat T### stations)

"last30_sat_count": 3528
Unique number of satellites / norad objects observed in last 30 days.

"last30_tle_count": 213
Number of TruSat TLEs created in the last 30 days (this may include multiple TLEs per object)

"last30_obs_count": 19942
Number of TruSat observations made in the last 30 days. This may exclude observations which were submitted in the last 30 days, but the observation time is older.

"last30_active_stations": 17
Number of unique reporting stations in the last 30 days. (Sometimes, multiple stations per user)

"last30_active_users": 11
Number of unique reporting users in the last 30 days.

"current_month_obs_count": 15283
Cumulative number of observations, so far this calendar month (server time).

"previous_month_obs_count": 20255
Total number of observations last calendar month.

One finer point is that last30_tle_count doesn't reflect the number of objects, for which TLEs were generated -- which might be slightly more updated. For example, if we get 10,000 observations submitted for 10 objects, we might show 1000 TLEs being generated (for only 10 objects), which isn't really reflective of the usability of the info in the catalog.

I added an additional stat like last30_tle_sat_count which shows the number of satellites for which TLEs have been updated in the last 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant