Last active
April 8, 2025 12:22
-
-
Save alimbada/4b9b3778d92f260cf289f1b2aa942aa8 to your computer and use it in GitHub Desktop.
Revisions
-
alimbada revised this gist
Apr 8, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,4 +8,4 @@ You will also need to install [xsv]([url](https://github.com/BurntSushi/xsv)) or Adjust the grep and awk expressions as appropriate. The grep expression will exclude lines where those strings are found (e.g. exclude teasers/trailers). The awk expression is necessary for specifying a cutoff for the show title to allow grouping of shows, e.g. `Stranger Things: Stranger Things 2: Chapter One: MADMAX (Episode 1)` will be transformed to `Stranger Things` to allow accurate counting of each shows views. ℹ️ Hint: If you want to see the number of unique titles viewed rather than the number of times a show/title was viewed, replace the first `sort` with `sort -u`. The default behaviour can be useful for analysing viewing habits of profiles where titles are viewed multiple times (e.g. children's profiles) but this may not be useful for many others. The default behaviour is also inaccurate as Netflix counts even viewing something for as little as 1 second as a view. -
alimbada revised this gist
Apr 8, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ This script allows you to analyse the `ViewingActivity.csv` file included in your Netflix data and outputs a list of shows watched by a particular profile ordered by frequency (i.e. number of times viewed and number of episodes viewed). #### Usage -
alimbada created this gist
Apr 8, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ This script allows you to analyse the `ViewingActivity.csv` file included in your Netflix data and outputs a list of shows watched by a particular user ordered by frequency (i.e. number of times viewed and number of episodes viewed). #### Usage You will first need to request your Netflix data, download it and extract the zip file. You can do this by going to `Account -> Security -> Personal information access` You will also need to install [xsv]([url](https://github.com/BurntSushi/xsv)) or a similar tool. Adjust the grep and awk expressions as appropriate. The grep expression will exclude lines where those strings are found (e.g. exclude teasers/trailers). The awk expression is necessary for specifying a cutoff for the show title to allow grouping of shows, e.g. `Stranger Things: Stranger Things 2: Chapter One: MADMAX (Episode 1)` will be transformed to `Stranger Things` to allow accurate counting of each shows views. ℹ️ Hint: If you want to see the number of unique titles viewed rather than the number of times a show/title was viewed, replace the first `sort` with `sort -u` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ grep PROFILE_NAME CONTENT_INTERACTION/ViewingActivity.csv | grep -Eiv "Trailer|Teaser|Clip" | xsv select 5 | tr -d '"' | sort | awk -F': Season|: Book|: Part|: Volume|: Limited|: Series|: Stranger' '{ print $1 }' | uniq -c | sort -nr