Code Monkey home page Code Monkey logo

Comments (12)

crflynn avatar crflynn commented on June 18, 2024

This particular plot would probably be best. I'll take a look at getting it inserted between the absolutes.

from pypistats.org.

crflynn avatar crflynn commented on June 18, 2024

Currently prototyping this in a branch: https://github.com/crflynn/pypistats.org/tree/proportions

I'll have to either upgrade the db instance or chop the data retention period a bit to make this work.

from pypistats.org.

njsmith avatar njsmith commented on June 18, 2024

...can't you compute them on the fly? you're already loading all the relevant data into memory...

from pypistats.org.

crflynn avatar crflynn commented on June 18, 2024

Sure. I figured storing on db would be faster but I probably shouldn't be too worried about performance here...

from pypistats.org.

crflynn avatar crflynn commented on June 18, 2024

@njsmith changes should be live. e.g. all

from pypistats.org.

njsmith avatar njsmith commented on June 18, 2024

Beautiful!

A few small comments, which I hope are taken as helpful feedback rather than nitpicking :-)

I thought I would like the stacked area plot but... now that I've seen it in action, I think the ideal is actually the original line plot (but still with percentages). In particular, the line plot makes it much easier to compare the different proportions to each other – for example, on numpy, when was the last day that Python 2 had more downloads than Python 3? With the line plot it's not too hard to pick out that it's 8-24, but with the stacked area plot it's pretty much impossible to tell except by mousing over one point at a time and looking at the numbers.

The x-axis for the new and old graphs doesn't match, which doesn't really matter but is a bit odd once I noticed.

I like the way the new graph shows both the percentages and the absolute counts in the tooltips. In fact, given this, I sort of feel like the old graphs can be removed, since the new ones have all the same information and present it in a more useful way :-).

Random other thought that occurred to me: for the plots in general, I wonder if showing a smoothed line would be a bit nicer, e.g. a 7-day moving average (perhaps with the individual points as well).

from pypistats.org.

crflynn avatar crflynn commented on June 18, 2024

I could make the hover text identical between charts; I probably should have just done that here.

Yeah the x-axis not lining up was something I noticed as well. I did a bit of searching and found this to be an open issue with respect to the plotly codebase not being consistent between chart types, unfortunately. Maybe I can do some fiddling and try to line it up.

The reason I kept the old charts is because on smaller projects (like mine) the fill plots look really janky due to proportional variations and are difficult to read.

I'll have to think about the ability to flip between absolute and 7d-avg in the browser. Plotly might support it, otherwise I might need some more javascript knowledge for this :|

I'm planning on attending the pypa October sprint, so hopefully I can chat with some of the maintainers about warehouse, stats, and more features like your suggestions :)

from pypistats.org.

njsmith avatar njsmith commented on June 18, 2024

The reason I kept the old charts is because on smaller projects (like mine) the fill plots look really janky due to proportional variations and are difficult to read.

Do you think it would help to switch away from fill plots, like I suggested?

I'll have to think about the ability to flip between absolute and 7d-avg in the browser. Plotly might support it, otherwise I might need some more javascript knowledge for this :|

Yeah, I know there are a lot of tools like this for js these days but I have like zero idea what they are.

I'm planning on attending the pypa October sprint, so hopefully I can chat with some of the maintainers about warehouse, stats, and more features like your suggestions :)

Oh cool! I won't be able to make it unfortunately, but it'd be awesome to see this integrated more with PyPI.

from pypistats.org.

crflynn avatar crflynn commented on June 18, 2024

Oh, I misread. You meant to discard the fill plots and instead just add proportions to the hover text. That might make more sense. I'll sleep on it for a bit.

from pypistats.org.

njsmith avatar njsmith commented on June 18, 2024

To make sure it's clear: my suggestion is to have one plot, make it a line plot like the old plots, and on that plot we put the percentages, rather than the absolute values. We keep putting both the percentages and the absolute values in the tooltips. That way:

  • The percentages are emphasized visually, which seems like what you want 99% of the time

  • It's easy to compare the different categories like "python 2", "python 3", against each other because it's a line plot, not an area plot

  • If someone does want the absolute values, they can easily get them by checking the tooltips

from pypistats.org.

crflynn avatar crflynn commented on June 18, 2024

I just pushed an update which addresses this. Each segmentation now has a plot for absolute downloads and proportional downloads. https://pypistats.org/packages/numpy

from pypistats.org.

njsmith avatar njsmith commented on June 18, 2024

Beautiful!

from pypistats.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.