Tidytuesday python: translating board games

  Рет қаралды 491

Michael Chow

Michael Chow

Күн бұрын

Пікірлер: 7
@aswansyahputra
@aswansyahputra 3 жыл бұрын
I use tidyverse everyday, knowing about siuba and plotnine is really mind-blowing for me! Python is totally new for me, but the way you explain the translation from R makes it easier for me grasp python. Love it! Can't wait for the second part about modelling. Cheers!
@ronit8067
@ronit8067 3 жыл бұрын
ggplot(aes(annual_salary)) + geom_histogram() + scale_x_log10(labels = dollar_format()) + labs(x = "Annual") its a distribution plot, with correct bin settings it looks the same but i am unable to set the x-ticks in python. i am trying to recreate this plot using plotnine, but i cannot find any solution. any ideas are appreciated.
@ChowTheDog
@ChowTheDog 3 жыл бұрын
Are you having trouble with finding a python version of dollar_format or is something else happening? (E.g. the x ticks show up at funky breakpoints etc)
@ronit8067
@ronit8067 3 жыл бұрын
@@ChowTheDog exactly the dollar format thing, plus the grid that form on the plot is significantly different. technically the distribution that is generated is the same.
@ChowTheDog
@ChowTheDog 3 жыл бұрын
I often use something like this to do percentages, so maybe something similar will work? (The labels argument takes a function that runs on each break value) percent_format = lambda l: ["{:.0f}%".format(v * 100) for v in l] scale_x_log10(labels=percent_format) I'm guessing you'll have to specify break values where you want them. plotnine's author is pretty good with issues on GitHub, so maybe something is up there about this..
@ChowTheDog
@ChowTheDog 3 жыл бұрын
Wait sorry, I guess it takes a function that operates over an array (or something), since format_percent is using a comprehension
@ronit8067
@ronit8067 3 жыл бұрын
@@ChowTheDog yeah thats what i assumed and tried using the “breaks” argument, but it doesn’t change the graph at all. I thought that the dollar format was an internal ggplot method. as i did not see any such function in the script.
TidyTuesday python: analyzing GDPR fines
1:14:43
Michael Chow
Рет қаралды 2,2 М.
Python packages - adding tests and a new function to siuba
52:08
Triple kill😹
00:18
GG Animation
Рет қаралды 13 МЛН
这是自救的好办法 #路飞#海贼王
00:43
路飞与唐舞桐
Рет қаралды 94 МЛН
2 MAGIC SECRETS @denismagicshow @roman_magic
00:32
MasomkaMagic
Рет қаралды 27 МЛН
The Oldest Unsolved Problem in Math
31:33
Veritasium
Рет қаралды 11 МЛН
This Single Rule Underpins All Of Physics
32:44
Veritasium
Рет қаралды 3,9 МЛН
The Worst Programming Language Ever - Mark Rendle - NDC Oslo 2021
1:00:41
NDC Conferences
Рет қаралды 1,3 МЛН
Tidy Tuesday python: translating women in the workforce
1:03:13
Michael Chow
Рет қаралды 863
But what is a neural network? | Chapter 1, Deep learning
18:40
3Blue1Brown
Рет қаралды 17 МЛН
The Only Unbreakable Law
53:25
Molly Rocket
Рет қаралды 335 М.
TidyTuesday python: analyzing hockey goals
1:21:09
Michael Chow
Рет қаралды 1,5 М.
A Future of Data Science - posit conf 2024
58:29
Posit PBC
Рет қаралды 3,3 М.
Tidy Tuesday python: translating train delays in France analysis
1:32:20
AlphaGo - The Movie | Full award-winning documentary
1:30:28
Google DeepMind
Рет қаралды 35 МЛН
Triple kill😹
00:18
GG Animation
Рет қаралды 13 МЛН