Skip to content

Commit

Permalink
Fix 2D Heatmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
minimaxir committed Nov 6, 2016
1 parent d547f4b commit 4f5f5fb
Show file tree
Hide file tree
Showing 104 changed files with 33 additions and 22 deletions.
Binary file modified img-2d/4chan-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/AdviceAnimals-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/Android-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/Art-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/AskMen-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/AskReddit-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/BlackPeopleTwitter-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/DIY-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/DestinyTheGame-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/Documentaries-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/DotA2-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/EarthPorn-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/Fallout-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/Fireteams-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/Fitness-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/Futurology-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/Games-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/GetMotivated-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/GlobalOffensive-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/IAmA-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/ImGoingToHellForThis-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/InternetIsBeautiful-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/Jokes-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/LifeProTips-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/Music-2d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2d/OldSchoolCool-2d.png
Binary file modified img-2d/Overwatch-2d.png
Binary file modified img-2d/PS4-2d.png
Binary file modified img-2d/RoastMe-2d.png
Binary file modified img-2d/SandersForPresident-2d.png
Binary file modified img-2d/Showerthoughts-2d.png
Binary file modified img-2d/StarWars-2d.png
Binary file modified img-2d/Steam-2d.png
Binary file modified img-2d/The_Donald-2d.png
Binary file modified img-2d/Tinder-2d.png
Binary file modified img-2d/TumblrInAction-2d.png
Binary file modified img-2d/TwoXChromosomes-2d.png
Binary file modified img-2d/UpliftingNews-2d.png
Binary file modified img-2d/WTF-2d.png
Binary file modified img-2d/WritingPrompts-2d.png
Binary file modified img-2d/anime-2d.png
Binary file modified img-2d/askscience-2d.png
Binary file modified img-2d/atheism-2d.png
Binary file modified img-2d/aww-2d.png
Binary file modified img-2d/bestof-2d.png
Binary file modified img-2d/books-2d.png
Binary file modified img-2d/buildapc-2d.png
Binary file modified img-2d/creepy-2d.png
Binary file modified img-2d/cringepics-2d.png
Binary file modified img-2d/dataisbeautiful-2d.png
Binary file modified img-2d/explainlikeimfive-2d.png
Binary file modified img-2d/fo4-2d.png
Binary file modified img-2d/food-2d.png
Binary file modified img-2d/funny-2d.png
Binary file modified img-2d/gadgets-2d.png
Binary file modified img-2d/gameofthrones-2d.png
Binary file modified img-2d/gaming-2d.png
Binary file modified img-2d/gifs-2d.png
Binary file modified img-2d/gonewild-2d.png
Binary file modified img-2d/hearthstone-2d.png
Binary file modified img-2d/hiphopheads-2d.png
Binary file modified img-2d/history-2d.png
Binary file modified img-2d/interestingasfuck-2d.png
Binary file modified img-2d/leagueoflegends-2d.png
Binary file modified img-2d/legaladvice-2d.png
Binary file modified img-2d/me_irl-2d.png
Binary file modified img-2d/mildlyinteresting-2d.png
Binary file modified img-2d/millionairemakers-2d.png
Binary file modified img-2d/movies-2d.png
Binary file modified img-2d/nba-2d.png
Binary file modified img-2d/news-2d.png
Binary file modified img-2d/nfl-2d.png
Binary file modified img-2d/nosleep-2d.png
Binary file modified img-2d/nottheonion-2d.png
Binary file modified img-2d/oddlysatisfying-2d.png
Binary file modified img-2d/pcmasterrace-2d.png
Binary file modified img-2d/personalfinance-2d.png
Binary file modified img-2d/photoshopbattles-2d.png
Binary file modified img-2d/pics-2d.png
Binary file modified img-2d/pokemon-2d.png
Binary file modified img-2d/pokemongo-2d.png
Binary file modified img-2d/politics-2d.png
Binary file modified img-2d/reactiongifs-2d.png
Binary file modified img-2d/relationships-2d.png
Binary file modified img-2d/science-2d.png
Binary file modified img-2d/sex-2d.png
Binary file modified img-2d/soccer-2d.png
Binary file modified img-2d/space-2d.png
Binary file modified img-2d/sports-2d.png
Binary file modified img-2d/technology-2d.png
Binary file modified img-2d/television-2d.png
Binary file modified img-2d/thebutton-2d.png
Binary file modified img-2d/tifu-2d.png
Binary file modified img-2d/tipofmytongue-2d.png
Binary file modified img-2d/todayilearned-2d.png
Binary file modified img-2d/trees-2d.png
Binary file modified img-2d/videos-2d.png
Binary file modified img-2d/woahdude-2d.png
Binary file modified img-2d/worldnews-2d.png
Binary file modified img-2d/wow-2d.png
Binary file modified reddit-first-2.png
Binary file modified reddit-first-2a.png
12 changes: 6 additions & 6 deletions reddit_first.Rmd
Expand Up @@ -86,7 +86,7 @@ plot <- ggplot(df, aes(x=created_rank, y=score_rank, fill=num_comments, z=num_co
scale_x_continuous(breaks = c(1,seq(10,100,by=10))) +
scale_y_continuous(breaks = c(1,seq(10,100,by=10))) +
fte_theme() +
theme(legend.title = element_text(size=7, family="Open Sans Condensed Bold"), legend.position="top", legend.direction="horizontal", legend.key.width=unit(1.5, "cm"), legend.key.height=unit(0.25, "cm"), legend.margin=unit(0,"cm"), panel.margin=element_blank()) +
theme(legend.title = element_text(size=7, family="Open Sans Condensed Bold"), legend.position="top", legend.direction="horizontal", legend.key.width=unit(1.25, "cm"), legend.key.height=unit(0.25, "cm"), legend.margin=unit(0,"cm"), panel.margin=element_blank()) +
scale_fill_viridis(name="# of\nComments", labels=comma, breaks=pretty_breaks(6)) +
labs(title = "Heatmap between Time Comment Made on Reddit and Score Rank",
x = "# Top-Level Comment (Lower Number is Posted Earlier)",
Expand All @@ -106,8 +106,8 @@ plot <- ggplot(df, aes(x=created_rank, y=score_rank, fill=num_comments, z=log10(
scale_x_continuous(breaks = c(1,seq(10,100,by=10))) +
scale_y_continuous(breaks = c(1,seq(10,100,by=10))) +
fte_theme() +
theme(legend.title = element_text(size=7, family="Open Sans Condensed Bold"), legend.position="top", legend.direction="horizontal", legend.key.width=unit(1.5, "cm"), legend.key.height=unit(0.25, "cm"), legend.margin=unit(0,"cm"), panel.margin=element_blank()) +
scale_fill_viridis(name="# of\nComments", labels=comma, breaks=10^(2:5), trans="log10") +
theme(legend.title = element_text(size=7, family="Open Sans Condensed Bold"), legend.position="top", legend.direction="horizontal", legend.key.width=unit(1.25, "cm"), legend.key.height=unit(0.25, "cm"), legend.margin=unit(0,"cm"), panel.margin=element_blank()) +
scale_fill_viridis(name="# of\nComments", labels=comma, breaks=10^(1:5), trans="log10") +
labs(title = "Heatmap between Time Comment Made on Reddit and Score Rank",
x = "# Top-Level Comment (Lower Number is Posted Earlier)",
y = "Comment Score Ranking (Lower Number is Higher Score)")
Expand Down Expand Up @@ -308,11 +308,11 @@ plot <- ggplot(df_subreddits %>% filter(subreddit == p_subreddit), aes(x=created
scale_y_continuous(breaks = c(1,seq(10,100,by=10))) +
fte_theme() +
theme(plot.title = element_text(size=7)) +
theme(legend.title = element_text(size=7, family="Open Sans Condensed Bold"), legend.position="top", legend.direction="horizontal", legend.key.width=unit(1.5, "cm"), legend.key.height=unit(0.25, "cm"), legend.margin=unit(0,"cm"), panel.margin=element_blank()) +
scale_fill_viridis(name="# of\nComments", labels=comma, breaks=10^(1:4), trans="log10") +
theme(legend.title = element_text(size=7, family="Open Sans Condensed Bold"), legend.position="top", legend.direction="horizontal", legend.key.width=unit(1.25, "cm"), legend.key.height=unit(0.25, "cm"), legend.margin=unit(0,"cm"), panel.margin=element_blank()) +
scale_fill_viridis(name="# of\nComments", labels=comma, breaks=10^(0:4), trans="log10") +
labs(title = sprintf("Heatmap between Time Comment Made and Score Rank for /r/%s", p_subreddit),
x = "# Top-Level Comment (Lower Number is Posted Earlier)",
y = "Comment Score Ranking (Lower Number is Higher Rank)")
y = "Comment Score Ranking (Lower Number is Higher Score)")
max_save(plot, sprintf("img-2d/%s-2d", p_subreddit), "Reddit (Jan 2015 - Sep 2016)")
}
Expand Down
43 changes: 27 additions & 16 deletions reddit_first.nb.html

Large diffs are not rendered by default.

0 comments on commit 4f5f5fb

Please sign in to comment.