Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TokyoR#93

 TokyoR#93

TokyoR#93の初心者セッション可視化パートです。

soriente

July 03, 2021
Tweet

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ w TPSJFOUF w ౎಺*5اۀۈ຿ w 3ྺ೥໨ ࡉ͘௕͘΍ͬͯ·͢ɻ  w

    ͱ͍ͬͯ΋࠷ۙ͸1ZUIPO͕ϝΠϯ w 1)1ॻ͍ͯͨ࣌ظ΋͋Γ·ͨ͠ɻ
  2. ՄࢹԽͱ͸ w จࣈͷ௨Γɺݟ͑ΔԽ͢Δɻ σʔλ෼ੳͷจ຺Ͱ͸ɺσʔλͷؔ܎ੑΛݟ͑ ΔԽ͢Δɻ  w ՄࢹԽΛ͚ͨͩ͠ͰΘ͔Δ͜ͱ΋ଟ͍ɻ w ՄࢹԽΛ͢ΔͱɺΘ͔Γ΍͍͢ɻ

    w ՄࢹԽΛͨ͋͠ͱʹԿΒ͔ͷҙࢥܾఆΛߦ͏͜ͱ͕ଟ͍ɻ ෼ੳऀࣗ਎͕ҙࢥ ܾఆ͢Δ͜ͱ΋ɺ୭͔ʹҙࢥܾఆͯ͠΋Β͏͜ͱ΋͋Δɻ
  3. ࠓճ࢖͏σʔλQFOHVJOT JOTUBMMQBDLBHFT QBMNFSQFOHVJOT  MJCSBSZ QBMNFSQFOHVJOT  IFBE QFOHVJOT 

     TQFDJFT JTMBOE CJMM@MFOHUI@NN CJMM@EFQUI@NN fl JQQFS@MFOHUI@NN CPEZ@NBTT@H TFY ZFBS  "EFMJF 5PSHFSTFO     NBMF   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO /" /" /" /" /"   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO     NBMF 
  4. ࠓճ࢖͏σʔλQFOHVJOT JOTUBMMQBDLBHFT QBMNFSQFOHVJOT  MJCSBSZ QBMNFSQFOHVJOT  IFBE QFOHVJOT 

     TQFDJFT JTMBOE CJMM@MFOHUI@NN CJMM@EFQUI@NN fl JQQFS@MFOHUI@NN CPEZ@NBTT@H TFY ZFBS  "EFMJF 5PSHFSTFO     NBMF   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO /" /" /" /" /"   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO     NBMF 
  5. ࠓճ࢖͏σʔλQFOHVJOT JOTUBMMQBDLBHFT QBMNFSQFOHVJOT  MJCSBSZ QBMNFSQFOHVJOT  IFBE QFOHVJOT 

     TQFDJFT JTMBOE CJMM@MFOHUI@NN CJMM@EFQUI@NN fl JQQFS@MFOHUI@NN CPEZ@NBTT@H TFY ZFBS  "EFMJF 5PSHFSTFO     NBMF   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO /" /" /" /" /"   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO     NBMF 
  6. ࢄ෍ਤ ॻ͖ํ͸ओʹ3ύλʔϯ > ggplot(penguins, aes(x = bill_length_mm, y = bill_depth_mm))

    + geom_point() > ggplot(penguins) + geom_point(aes(x = bill_length_mm, y = bill_depth_mm)) > ggplot() + geom_point( data = penguins, aes(x = bill_length_mm, y = bill_depth_mm) )
  7. ࠓճ࢖͏σʔλQFOHVJOT JOTUBMMQBDLBHFT QBMNFSQFOHVJOT  MJCSBSZ QBMNFSQFOHVJOT  IFBE QFOHVJOT 

     TQFDJFT JTMBOE CJMM@MFOHUI@NN CJMM@EFQUI@NN fl JQQFS@MFOHUI@NN CPEZ@NBTT@H TFY ZFBS  "EFMJF 5PSHFSTFO     NBMF   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO /" /" /" /" /"   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO     NBMF 
  8. ࠓճ࢖͏σʔλQFOHVJOT JOTUBMMQBDLBHFT QBMNFSQFOHVJOT  MJCSBSZ QBMNFSQFOHVJOT  IFBE QFOHVJOT 

     TQFDJFT JTMBOE CJMM@MFOHUI@NN CJMM@EFQUI@NN fl JQQFS@MFOHUI@NN CPEZ@NBTT@H TFY ZFBS  "EFMJF 5PSHFSTFO     NBMF   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO /" /" /" /" /"   "EFMJF 5PSHFSTFO     GFNBMF   "EFMJF 5PSHFSTFO     NBMF 
  9. σʔλूܭ MJCBSBSZ EQMZS  QFOHVJOT@GPS@MJOFQFOHVJOT HSPVQ@CZ ZFBS  TVNNBSJTF NFBO@NBTTNFBO

    CPEZ@NBTT@H OBSN536&  QFOHVJOT@GPS@MJOF ZFBS NFBO@NBTT         
  10. ંΕઢάϥϑ ॻ͖ํ͸ओʹ3ύλʔϯ > ggplot(penguins_for_line, aes(x = year, y = mean_mass))

    + geom_line() > penguins_for_line %>% ggplot() + geom_line(aes(x = year, y = mean_mass)) > ggplot(penguins_for_line) + geom_line(aes(x = year, y = mean_mass)) > ggplot() + geom_line( data = penguins_for_line, aes(x = year, y = mean_mass) )
  11. ๮άϥϑ ॻ͖ํ͸3ύλʔϯ > ggplot(penguins_for_line, aes(x = year, y = mean_mass))

    + geom_bar(stat = "identity") > ggplot(penguins_for_line) + geom_bar(aes(x = year, y = mean_mass), stat = "identity") > ggplot() + geom_bar( data = penguins_for_line, aes(x = year, y = mean_mass), stat = "identity") ҎԼͰ΋Մ > ggplot() + geom_bar( data = penguins, aes(x = year, y = body_mass_g), stat = "summary", fun = "mean" )
  12. > ggplot() + geom_line( data = penguins_for_line, aes(x = year,

    y = mean_mass) ) + ggtitle("ંΕઢάϥϑ") + theme_gray(base_family = "HiraKakuPro-W3") λΠτϧઃఆ
  13. λΠτϧઃఆ > ggplot() + geom_line( data = penguins_for_line, aes(x =

    year, y = mean_mass) ) + ggtitle("ંΕઢάϥϑ") + theme_gray(base_family = "HiraKakuPro-W3")
  14. Y࣠ > ggplot() + geom_line( data = penguins_for_line, aes(x =

    year, y = mean_mass)) + ggtitle("ંΕઢάϥϑ") + theme_gray(base_family = "HiraKakuPro-W3") + scale_x_continuous(breaks=seq(2007,2009,1))
  15. Z࣠ > ggplot() + geom_line( data = penguins_for_line, aes(x =

    year, y = mean_mass) ) + ggtitle("ࢄ෍ਤ") + theme_gray(base_family = "HiraKakuPro-W3") + scale_x_continuous( breaks = seq( min(penguins_for_line$year), max(penguins_for_line$year), 1 ) ) + ylim(0, 4300)
  16. ࢄ෍ਤ छྨʹΑͬͯ৭෼͚͍ͨ > ggplot() + geom_point( data = penguins, aes(x

    = bill_length_mm, y = bill_depth_mm, color = species) )
  17. ·ͱΊ w ՄࢹԽ͸͔ͳΓधཁͳύʔτ͕ͩɺ೉͍͠ɻ w άϥϑ͸HHQMPU ͱHFPN@YYY Λ࢖͏ͱॻ͘͜ͱ͕Ͱ͖Δɻ w ؔ਺͸ϓϥεͰͭͳ͙ɻ w

    ΍Γ͍ͨ͜ͱΛάάͬͯΈͯɺࢼͯ͠ΈͯɺΘ͔Βͳ͚Ε͹ɺ4MBDLͷSXBLBMBOHʹ࣭ͯ໰ͯ͠ Έ·͠ΐ͏ʂ