Page MenuHomePhabricator

Massviews: Add chart for total pageviews of pagepile collection
Closed, ResolvedPublic5 Estimate Story Points

Description

Massviews lets users see pageview stats for a selected group of pages:

https://tools.wmflabs.org/massviews/?platform=all-access&agent=user&source=pagepile&target=3055&range=latest-20&sort=views&direction=1

Program leaders, GLAM, editathons etc want to see the change in pageviews over time, to evaluate the impact of their work.

  • On the MassViews results page, under Pagepile #xxxx, show two buttons -- List view / Chart view.
  • Default is List view
  • Clicking on Chart view replaces the list of results with a chart that shows the total pageviews over time for that pile. This should behave in the same way as the regular PV Analysis page results.
  • PV Analysis page design TBD

Event Timeline

DannyH created this task.May 16 2016, 7:36 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 16 2016, 7:36 PM

This one is very sensible, but will be tricky! We might be better off creating the chart view within the Massviews app, since Pageviews is sort of hardwired around receiving up to 10 individual pages, and not other data sources. Once a Massviews query is complete, we have all the per-day data that we want, it just isn't plotted out. So maybe clicking the chart link will hide the "list view" and load a "chart view".

@MusikAnimal: That makes sense. We should also have a way to switch back to the list view.

DannyH updated the task description. (Show Details)May 17 2016, 5:37 PM
DannyH updated the task description. (Show Details)May 17 2016, 5:40 PM
DannyH set the point value for this task to 5.
DannyH moved this task from To Be Estimated/Discussed to Estimated on the Community-Tech board.

I've kind of got the UI mapped out in my head. The chart view will basically look like Pageviews, just you'll have the toggle at the top to go back to list view. I've got all the necessary refactoring done, so just a matter of plugging up the shared chart-specific code and the toggling functionality.

Alrighty! I think I've got this working, and hopefully didn't break something else in the process. You can link to which view you want too, see:
http://tools.wmflabs.org/massviews/?platform=all-access&agent=user&source=pagepile&target=3042&range=latest-20&sort=views&direction=1&view=chart

With more refactoring I hope to get the chart/list view toggle working on Langviews as well

Oh, that's phenomenal. Is it possible to add the date picker?

MusikAnimal added a comment.EditedMay 19 2016, 6:45 PM

Oh, that's phenomenal. Is it possible to add the date picker?

Unfortunately no, because that would require re-querying the API for every page in the collection. So if it took 20 seconds to run the initial Massviews query, changing any parameters like the date, agent, platform, etc, would mean another 20 second wait :(

Even when the API response times are improved (T124314) I think we'd still force the user to re-run the whole thing if they want to change any parameter. Massviews can amount to up to 500 individual queries, and we don't people to be able to re-run them all willy nilly.

Well, I think the Programs use case is: we run a huge event for Wiki Loves Ancient Egypt, getting people to write articles about ancient Egypt for two weeks. A month later, we want to know if there was any change in pageviews on the category, now that the articles are so much better.

So if we want to keep it to one date range, then I'd suggest a longer period than 30 days.

You can query for any date range, right now, that is. Just pick a range of 2 months, 3 months, etc, from the datepicker on http://tools.wmflabs.org/massviews. My point was I don't want to add these controls to the list/chart view because it would imply they could change it and get instant results, like you can with the main Pageviews.

Once a Massviews query has completed, and you want a different date range, you can still go back and change it as needed. You'll just have to wait the throttling period (currently 90 seconds), to ensure the API doesn't flake out =P To be clear that throttling period starts as soon as the Massview query is complete. I imagine many people will review the list/chart of data for some time, and when they return to the form the wait will be much shorter.

Oh! You're right. I was looking at the list/chart page, and I forgot that there was a date picker back on the query page. :)

Okay. Ignore me. It's good.

Thanks for advocating for us Danny! The new graphs are awesome :)

Oh! You're right. I was looking at the list/chart page, and I forgot that there was a date picker back on the query page. :)

No worries! I wonder if there's a better way to make it clear that you're looking at the results, and that you need to go back to the initial form to do another query? I also have concerns about other links on the page. Some outreach folks told me they are copying/pasting the results into a spreadsheet, unaware of the "Download as CSV" link, and several people didn't know you could change the chart type until I pointed it out.

DannyH closed this task as Resolved.Jun 23 2016, 5:18 PM
DannyH moved this task from Estimated to Archive on the Community-Tech board.