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

Launch date of each city server in API? #3375

Closed
jonfroehlich opened this issue Aug 25, 2023 · 10 comments · Fixed by #3396
Closed

Launch date of each city server in API? #3375

jonfroehlich opened this issue Aug 25, 2023 · 10 comments · Fixed by #3396
Assignees
Labels

Comments

@jonfroehlich
Copy link
Member

For writing NSF reports (and other things), it would be useful for me to know the launch date of each production server. Do we have that info? I suppose we could use the date of the first label? What's the easiest way to get this?

I'll then add it as a utility method to: https://observablehq.com/@jonfroehlich/project-sidewalk-utility-methods

@misaugstad
Copy link
Member

It honestly might be best for me to search my email to get you these dates, going off of notifications from CSE Support that they set up the prod server.

We could consider using first label (not added by me, since I add some while creating the database). It would definitely be more noisy, but would at least get numbers the fastest.

You specifically asked for the dates of the launch of production servers. If we launched a test server and then some data was collected there that we then moved onto the prod server later on, would you want the date of the test server launch of prod server?

@misaugstad misaugstad self-assigned this Aug 25, 2023
@misaugstad
Copy link
Member

And is this definitely something you want provided through an API, or do you just want to collect the dates and have them in a wiki or just in your observable notebook for now?

@misaugstad misaugstad added the API label Aug 25, 2023
@jonfroehlich
Copy link
Member Author

I think just using the date of the first non-Mikey and non-Jon label would be fine. I would prefer a programmatic way so as not to bother you when I need the info... but whatever is honestly easiest.

@misaugstad
Copy link
Member

Here's what I've got using the timestamp for labels that aren't from us!

Newberg: 2019-01-31
Seattle: 2019-03-12
Columbus: 2019-11-12
CDMX: 2020-01-09
SPGG: 2020-05-30
Pittsburgh: 2020-07-30
Chicago: 2021-09-03
Amsterdam: 2022-01-10
La Piedad: 2022-03-17
Oradell: 2022-03-17
Validation Study: 2022-05-10
Zurich: 2022-11-08
Taipei: 2023-01-24
Auckland: 2023-02-14
Cuenca: 2023-04-02
New Taipei: 2023-08-06
Burnaby: 2023-08-09
Keelung: 2023-08-10
Teaneck: 2023-08-24
DC: Do you have a good idea for this? I can dig more if you don't have a date recorded, but the usual method won't work for DC

Here's the query used:

SELECT :city AS "city", time_created
FROM label
INNER JOIN audit_task on label.audit_task_id = audit_task.audit_task_id
INNER JOIN sidewalk_user ON audit_task.user_id = sidewalk_user.user_id
WHERE username NOT IN ('mikey', 'jonfroehlich')
ORDER BY time_created
LIMIT 1;

@jonfroehlich
Copy link
Member Author

jonfroehlich commented Sep 5, 2023

Thank you Mikey. Could we add this data into the overallStats API? Call it launch_date or something?

Re: DC. Can we just do date of first label?

@misaugstad
Copy link
Member

The earliest entry in the table that includes logs from the Explore page is on 2015-10-17. And yes this can be added to that API endpoint!

@jonfroehlich
Copy link
Member Author

Thanks Mikey!

@misaugstad
Copy link
Member

@davphan let's add the launch dates to the conf/cityparams.conf file and then include it in the /v2/overallStats API!

@davphan
Copy link
Collaborator

davphan commented Oct 2, 2023

Just to confirm, does /v2/overallStats give the stats for a specific city? Or the stats for all cities combined? If it's all cities combined, should the csv be formatted as each city/date pair being its own row? Currently the csv has all individual stats as its own row as in this img:
image
So format it like this?
image

@jonfroehlich
Copy link
Member Author

It gives stats just for one city (the city you are calling the API on)

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

Successfully merging a pull request may close this issue.

3 participants