Relative time axis
First, I really like your project, thank you!
What I would find really interesting is to switch from the current fixed time axis using dates to a relative time axis: So, in the origin maybe the day the project started (or when it got its first star). This would allow to compare growth across repos that started at different times. Currently, it's not easy to compare the growth of projects that started years apart. It's natural that the younger project has less stars, but is it growing faster? A relative time axis showing the stars of both projects on their 50th day would help a lot, I think.
Thank you @fdw for the kind words!
I'm trying to understand how you envision the relative time axis - if every repo has a different time axis - what would this axis represent? What would be its units?
The x-axis would still be time, but instead of a fixed date, it would signify "days after project created" or "days after first star".
I've tried to make an example:
The top graph is the current axis, with each tick signifying a certain date. The bottom graph shows instead the star evolution in relation to each project's age: They both start in the origin (the day the project was created) and the ticks show day 50 and day 400 after creation. Here, it's much easier to see that blue is growing faster.
Now it's clear, thanks @fdw for the great illustration! I think that could be a nice feature, would you consider implementing it? We should also think how would users switch between the 2 views 🤔
In general, I could have a look at implementing it, but I don't know how much time I currently have, so if someone else wants to do it, go for it!
Ok sure, we can keep this issue open for now until someone can pick it up 👍
So, I was curious and had a look around, but now I'm back with questions: Mainly, how do you think this should be implemented? Currently, the chart uses timestamps (obviously), so I see three options:
- Build a new chart component that uses "days since" on the axis
- Calculate fake timestamps for the younger project, so that the current chart can be reused
- Migrate everything from timestamps to "days since"
Secondly, do you already have an idea how to switch between the views? Maybe another checkbox under "Repo Data and Statistics"?
Mainly, how do you think this should be implemented?
I guess we need to build a new chart component that still uses Plotly behind the scenes but takes a different data set with days a its time axis. What do you think?
Secondly, do you already have an idea how to switch between the views? Maybe another checkbox under "Repo Data and Statistics"?
Maybe add a new drop down above the chart that can switch between the 2 modes?
Good news: I've had a deeper look and I think we can integrate it easily in the existing Chart, with only an added parameter. I've pushed a proof of concept to my fork.
If that works for you, all that's left is some input on the main page to toggle timeline between absolute and relative.
Good news: I've had a deeper look and I think we can integrate it easily in the existing
Chart, with only an added parameter. I've pushed a proof of concept to my fork.If that works for you, all that's left is some input on the main page to toggle
timelinebetweenabsoluteandrelative.
Thank you @fdw ! Would you mind opening a PR with the change so I can review?
Done at #201