Closed Bug 951761 Opened 11 years ago Closed 10 years ago

Tracking metrics on Hour of Code Thimble Tutorials

Categories

(Webmaker Graveyard :: Metrics, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lainie, Assigned: cade)

Details

Attachments

(4 files)

Assignee: nobody → cade
Status: NEW → ASSIGNED
I've got a working API method for this on a local branch. Though, what I've implemented just leverages things we already have.

Every Make knows which make it was remixed from, so I search for makes whose remixedFrom field === the id of the make in question. Then you can count the total results, or, you iterate over each remix result and compare it's createdAt date to a specific Date range, giving you the total number of remixes in a specific time period. This method could be expanded to include some kind of depth level, I.E. remixes of remixes of remixes ....
This and the above patch implement the remixCount route on the MakeAPI. It takes a Make ID, and a from and to date, and calculates how many makes were made for the given project in the given time range.

I added UI on the Make editor for this. Using the grid, you click on the ID of the make you want to query for, and it's applied to the remix count input below the grid. you select a start and end date using the date input boxes and then press "Get Remix Count". The total count is displayed.
Could you link the publish URL's of those Makes in comment 0? I'll try and get the data manually tomorrow morning, so we don't have to wait for this to land.
Flags: needinfo?(lainie)
I'm not sure if my script is working properly, but here's what I get: https://gist.github.com/cadecairos/1c0f5ad13b3b853e10f5

Are you sure those makes were being remixed?
Flags: needinfo?(lainie)
aha! It was my code. I was only fetching at most ten remixes per url. Each make has thousands XD 

I will work on fixing up the script.
Flags: needinfo?(lainie)
https://gist.github.com/cadecairos/4b323796a8906d6bb765

Teh results from my updated script look much better!
For future reference, this is the script I used to generate the remix metrics.
Attachment #8350319 - Flags: review?(scott)
Attachment #8350324 - Flags: review?(scott)
Super helpful. Thank you!
Attachment #8350319 - Flags: review?(scott) → review+
Attachment #8350324 - Flags: review?(scott) → review+
Commit pushed to master at https://github.com/mozilla/MakeAPI

https://github.com/mozilla/MakeAPI/commit/6dd68f61b3c09d85c992af949b8fe81871af558c
Bug 951761 - Add route remixCount route, Admin page support for remixCount
This is on prod now, but I realized that the route can't count makes with > 10 remix results properly... a patch is on the way.
I've completely changed the way this works to make life easier. 

The previous approach I took got a list of remakes, and looped over them to check if the remix happened in a specific date range. 

This time, I extended the querybuilder so that it uses a remixedFrom filter and the all-new range filter to check the createdAt value. This method eliminates the need for any make data to be looped over as I can just return the total count of hits elasticsearch reports
Attachment #8355333 - Flags: review?(scott)
Does this mean the numbers in comment #8 are no longer valid?
@lainie I believe the numbers are still good. It looks like he just changed it to do the same thing faster and with less code to maintain.
Comment on attachment 8355333 [details] [review]
https://github.com/mozilla/MakeAPI/pull/186

I like where you're going with this.

Some questions in the pull request.
Attachment #8355333 - Flags: review?(scott) → review-
(In reply to lainie from comment #17)
> Does this mean the numbers in comment #8 are no longer valid?

(In reply to Scott [:thecount] Downe from comment #18)
> @lainie I believe the numbers are still good. It looks like he just changed
> it to do the same thing faster and with less code to maintain.

Yes, The numbers are still valid, I just improved the way I get them.
Attachment #8355333 - Flags: review- → review?(scott)
Attachment #8355333 - Flags: review?(scott) → review+
All fixed! now you can find remix metrics for every make using a date range using the Make Editor.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: