SciPyJapan2019: Let's Enjoy the Python World Using Network Analysis

98df8bb11748bb59fef1aa1e474e8e02?s=47 komo_fr
April 24, 2019

SciPyJapan2019: Let's Enjoy the Python World Using Network Analysis

98df8bb11748bb59fef1aa1e474e8e02?s=128

komo_fr

April 24, 2019
Tweet

Transcript

  1. -FUT&OKPZUIF1ZUIPO8PSME 6TJOH/FUXPSL"OBMZTJT 0WFSMPPLJOHUIF3FGFSFODF3FMBUJPOTIJQPG1&1TXJUI/FUXPSL9 4DJ1Z+BQBO   5PNPLP'VSVLJ 5XJUUFS!LPNP@GS SFQPTJUPSZIUUQTHJUIVCDPNLPNPGS4DJ1Z+BQBO@@UBML ωοτϫʔΫ෼ੳͰݟΔ1ZUIPOͷੈքʙ1&1ͷࢀরؔ܎Λ/FUXPSL9Ͱ၆ᛌ͢Δ

  2. 8IPBN* 5PNPLP'VSVLJ !LPNP@GS!LPNPGS *`NPOWBDBUJPO# BUQSFWJPVTKPCʜʜ EFWFMPQTPGUXBSFGPSIFBMUIDBSF DSFBUFB1P$ 1SPPGPG$PODFQU XJUI1ZUIPO පӃͷγεςϜ࡞ͬͨΓ

    ࣗࣾσʔλΛ׆༻͢ΔͨΊͷϓϩτλΠϓΛ1ZUIPOͰ࡞ͬͨΓ ઌ݄ձࣾࣙΊͨͷͰࣗ༝ΛᨳՎ͍ͯ͠Δ
  3. 8IPBN* *HBWFBUBMLBU1Z$PO+1 *OUFSBDUJWF/FUXPSL7JTVBMJ[BUJPOVTJOH1ZUIPOʙ /FUXPSL9 #PLFIͰ1&1ͷࢀরؔ܎ΛՄࢹԽ͢Δz *XJMMHJWFBUBMLBU1Z$PO,ZVTIVJO0LJOBXB  ΞΠσΞΛখ࢝͘͞Ίͯɺখ͘͞ҭ͍ͯͯ͘ํ๏ʙϋο ΧιϯͰਂ૚ֶशϞσϧΛ࡞ͬͯӡ༻͢Δ·Ͱz

  4. .Z1FSTPOBM1SPKFDU 7JTVBMJ[FUIFSFGFSFODFSFMBUJPOTIJQ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QSPDFTTFT BOE FOWJSPONFOUT 1&1T  

    :PVDBOTFFBMM1&1TPOQZUIPOPSH 1&1IUUQTXXXQZUIPOPSHEFWQFQT 1ZUIPOͷػೳ΍ϓϩηεɾ؀ڥͳͲʹ͍ͭͯେ͖ͳมߋ͕͋Δͱ͖ʹॻ͔ΕΔఏҊॻ
  10. FH1&14UZMF(VJEFGPS1ZUIPO IUUQTXXXQZUIPOPSHEFWQFQTQFQ

  11. 8IBUEPZPVLOPXGSPN1&1 1ZUIPO`TIJTUPSZ 8IBUQSPQPTBMTIBWFCFFONBEFTPGBS  8IBUXBTUIFEJTDVTTJPO  'JOBMMZ XBTJUBDDFQUFEPSSFKFDUFE  8IZXBTJUSFKFDUFE

     ʜʜ ʢࠓ·ͰͲͷΑ͏ͳఏҊ͕͋ͬͨͷ͔ʣ ʢͲͷΑ͏ͳ͜ͱ͕ٞ࿦͞Εͨͷ͔ʣ ࠷ऴతʹͦͷఏҊ͸"DDFQU͞Εͨͷ͔3FKFDU͞Εͨͷ͔ʣ ͳͥ3FKFDU͞Εͨͷ͔ʣ
  12. 3FGFSFODF3FMBUJPOTIJQPG1&1T !12 link to other PEP https://www.python.org/dev/peps/pep-0008/

  13. 3FGFSFODF3FMBUJPOTIJQPG1&1T 1&1 Style Guide for Python Code

  14. 3FGFSFODF3FMBUJPOTIJQPG1&1T 1&1 1&1 Style Guide for Python Code The Zen

    of Python As PEP 20 says, “Readability counts".
  15. 3FGFSFODF3FMBUJPOTIJQPG1&1T 1&1 1&1 1&1 Style Guide for Python Code The

    Zen of Python Docstring Conventions The "Specification" text comes mostly verbatim from the Python Style Guide [4] essay by Guido van Rossum.
  16. 3FGFSFODF3FMBUJPOTIJQPG1&1T 1&1 1&1 1&1 Style Guide for Python Code The

    Zen of Python Docstring Conventions
  17. None
  18. 0VUMJOF  8IBUJTUIF3FGFSFODF3FSBUJPOTIJQPG1&1T   8IZBN*EPJOHUIJT  .PUJWBUJPO  

    )PX   /FUXPSL"OBMZTJT/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Β ͦͷ1&1ಉ࢜͸Կ͔ͷؔ܎͕͋Δɺͱݴ͑ΔΑͶ

  28. 0VUMJOF  8IBUJTUIF3FGFSFODF3FMBUJPOTIJQPG1&1T   8IZBN*EPJOHUIJT  .PUJWBUJPO  

    )PX   /FUXPSL"OBMZTJT/FUXPSL9  1SFQBSFBOE4FF%BUB  %SBXUIFFOUJSFOFUXPSL  $PNNVOJUZ%FUFDUJPO
  29. /FUXPSL"OBMZTJT UIFBOBMZTJTPGSFMBUJPOTCFUXFFOlTPNFUIJOHzBOE lTPNFUIJOHz DJUBUJPOSFMBUJPOʢEPDVNFOUBOEEPDVNFOUʣ 4/4GSJFOETIJQSFMBUJPOʢQFSTPOBOEQFSTPOʣ OPEF OPEF FEHF Կ͔ͱԿ͔ͷؔ܎ੑΛ෼ੳ͢ΔͨΊͷख๏ ωοτϫʔΫ෼ੳ

    Ҿ༻ؔ܎ 4/4্ͷ͓༑ୡؔ܎
  30. "OBMZUJDBM.FUIPET5PPMT 1ZUIPO /FUXPSL9 QZUIPOJHSBQI 3 J(SBQI +BWB4DSJQU %KT POMZ WJTVBMJ[BUJPO

    (6*"QQT $ZUPTDBQF (FQIJ QBKFL 7JTVBMJ[BUJPO $FOUSBMJUZNFBTVSFT $PNNVOJUZ%FUFDUJPO FUDʜ .FUIPET 5PPMT ख๏΋πʔϧ΋৭ʑ͋ΔΑ
  31. /FUXPSL9 1ZUIPOQBDLBHFGPSDPNQMFYOFUXPSLT MBUFTU   5IJTWFSTJPOTVQQPSUTPOMZ1ZUIPO 5IFDPEFQSFTFOUFEJOUIJTTMJEFTIPVMECFSVOXJUI /FUXPSL9PSIJHIFS NetworkX is

    a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks. IUUQTOFUXPSLYHJUIVCJP 1ZUIPOͰෳࡶωοτϫʔΫΛѻ͏ͨΊͷύοέʔδ ࠷৽൛͸ ͜ͷηογϣϯʹग़ͯ͘Δίʔυ͸ɺ1ZUIPOҎ্Ͱಈ͔ͯ͠Ͷ
  32. 0VUMJOF  8IBUJTUIF3FGFSFODF3FMBUJPOTIJQPG1&1T   8IZBN*EPJOHUIJT  .PUJWBUJPO  

    )PX   /FUXPSL"OBMZTJT/FUXPSL9  1SFQBSFBOE4FF%BUB  %SBXUIFFOUJSFOFUXPSL  $PNNVOJUZ%FUFDUJPO σʔλΛ༻ҙͯ͠ݟͯΈΑ͏
  33. %BUB MJOLJOGPSNBUJPOˠFEHF 1&1`TIFBEFSˠOPEF ࠓճ࢖͏σʔλ ΤοδͷݩʹͳΔϦϯΫͷ৘ใ ݸʑͷϊʔυͷ৘ใͷݩʹͳΔ1&1ͷϔομ৘ใ

  34. %BUB MJOLJOGPSNBUJPOˠFEHF 1&1`TIFBEFSˠOPEF ࠓճ࢖͏σʔλ ΤοδͷݩʹͳΔϦϯΫͷ৘ใ ݸʑͷϊʔυͷ৘ใͷݩʹͳΔ1&1ͷϔομ৘ใ

  35. MJOLJOGPSNBUJPO   )PXUP.BLF/FUXPSL4USVDUVSF !35    Style Guide

    for Python Code The Zen of Python Docstring Conventions 1&1 1&1 1&1 1&1    1&1    1&1    BEKBDFODZNBUSJY TUBSU FOE 1&1 1&1 1&1 1&1 1&1 1&1 FEHFMJTU ωοτϫʔΫߏ଄ͷ࡞Γํ ྡ઀ߦྻ ΤοδϦετ
  36. 1&1 1&1 1&1 1&1    1&1  

     1&1    MJOLJOGPSNBUJPO   &YUSBDUBUBHTXJUI#FBVUJGVM4PVQ
  37. MJOLJOGPSNBUJPO   OYGSPN@QBOEBT@BEKBDFODZ import pandas as pd import networkx

    as nx adj_df = pd.read_csv(‘adjacency_matrix.csv’) # NetworkX 2.2 pep_graph = nx.from_pandas_adjacency(adj_df, create_using=nx.DiGraph)
  38. MJOLJOGPSNBUJPO   $POpSN print(nx.info(pep_graph)) Name: Type: DiGraph Number of

    nodes: 486 Number of edges: 964 Average in degree: 1.9835 Average out degree: 1.9835 pep_graph[‘0001'] # Confirm about PEP 1 AtlasView({'0001': {'weight': 1.0}, '0002': {'weight': 1.0}, '0007': {'weight': 1.0}, …
  39. %BUB MJOLJOGPSNBUJPOˠFEHF 1&1`TIFBEFSˠOPEF

  40. 1&1`T)FBEFS https://www.python.org/dev/peps/pep-0008/

  41. 1&1`T)FBEFS 5JUMF 5ZQF 4UBUVT $SFBUFE

  42. l5JUMFz 1&1UJUMF FH 4UZMF(VJEFGPS1ZUIPO$PEF 1&1  1&11VSQPTFBOE(VJEFMJOFT 1&1  5ZQF)JOUT

    1&1
  43. l5ZQFz 4UBOEBSET5SBDL EFTDSJCFTBOFXGFBUVSFPSJNQMFNFOUBUJPOGPS1ZUIPO FHʣ1&15ZQF)JOUT 1&15IFQBUIMJCNPEVMFPCKFDU PSJFOUFEpMFTZTUFNQBUIT *OGPSNBUJPOBM EFTDSJCFTB1ZUIPOEFTJHOJTTVF PSQSPWJEFTHFOFSBMHVJEFMJOFTPS JOGPSNBUJPOUPUIF1ZUIPODPNNVOJUZ

    CVUEPFTOPUQSPQPTFB OFXGFBUVSF FH 1&11ZUIPO3FMFBTF4DIFEVMF 1&15IF5IFPSZPG 5ZQF)JOUT 1SPDFTT EFTDSJCFTBQSPDFTTTVSSPVOEJOH1ZUIPO PSQSPQPTFTBDIBOHF UP PSBOFWFOUJO BQSPDFTT FH 1&11VSQPTFBOE(VJEFMJOFT 1&11ZUIPO %PDVNFOUBUJPO5SBOTMBUJPOT ৽͍͠ػೳʹؔ͢Δ΋ͷ ΨΠυϥΠϯͳͲɻ৽ػೳͷఏҊ͸͠ͳ͍ ϓϩηεʹؔ͢Δ΋ͷ
  44. None
  45. l4UBUVT 4FFBMTP1&1 4VQFSTFEFE

  46. None
  47. None
  48. 4UBUVT"QSJM'PPM 1&1Š#%'-3FUJSFNFOU KPLF1&1 Guido leaves Python in the good hands

    of its new leader and its vibrant community, in order to train for his lifelong dream of climbing Mount Everest.
  49. l$SFBUFEz EBUFDSFBUFEPO 1&1TBZTlEENNNZZZZGPSNBUz ʜCVU JOGBDU UIFSFBSFWBSJPVTGPSNBUT 0MEFTU1&1JTʜ 1&1ͷ࡞੒೔ 1&1Ͱॻ͕ࣜࢦఆ͞ΕͯΔ͚Ͳ ࣮ࡍʹ͸1&1Λक͍ͬͯͳ͍1&1͕͋ΔͷͰલॲཧͯ͠΍ΔΑ

  50. l$SFBUFEz EBUFDSFBUFEPO 1&1TBZTlEENNNZZZZGPSNBUz ʜCVU JOGBDU UIFSFBSFWBSJPVTGPSNBUT 0MEFTU1&1JTʜ 1&1Š1&11VSQPTFBOE(VJEFMJOFT 

  51. l$SFBUFEz EBUFDSFBUFEPO 1&1TBZTlEENNNZZZZGPSNBUz ʜCVU JOGBDU UIFSFBSFWBSJPVTGPSNBUT 0MEFTU1&1JTʜ 1&1Š1&11VSQPTFBOE(VJEFMJOFT  

    1&1Š1ZUIPO6OJDPEF*OUFHSBUJPO 
  52. "EE)FBEFS%BUBBT/PEF`T"UUSJCVUF 5JUMF 4UZMF(VJEFGPS 1ZUIPO$PEF 4UBUVT "DUJWF 5ZQF 1SPDFTT $SFBUFE +VM

    5JUMF ʜ 4UBUVT ʜ 5ZQF ʜ $SFBUFE ʜ 5JUMF ʜ 4UBUVT ʜ 5ZQF ʜ $SFBUFE ʜ    ͜ΕΒͷϔομ৘ใΛɺϊʔυͷଐੑͱͯ͠෇༩͢Δ
  53. for column_name, series in header_df.iteritems(): nx.set_node_attributes(pep_graph, dict(series), column_name) # Confirm

    pep_graph.nodes[‘0001'] {'Created': '13-Jun-2000', 'Status': 'Active', 'Title': 'PEP Purpose and Guidelines', 'Type': 'Process', } 1&1`T)FBEFS OYTFU@OPEF@BUUSJCVUFT
  54. 0VUMJOF  8IBUJTUIF3FGFSFODF3FMBUJPOTIJQPG1&1T   8IZBN*EPJOHUIJT  .PUJWBUJPO  

    )PX   /FUXPSL"OBMZTJT/FUXPSL9  1SFQBSFBOE4FF%BUB  %SBXUIFFOUJSFOFUXPSL  $PNNVOJUZ%FUFDUJPO ωοτϫʔΫશମΛඳըͯ͠ΈΔ
  55. plt.figure(figsize=(110, 110)) # Calc Layout position_dict = nx.nx_agraph.graphviz_layout(pep_graph, prog='fdp') #

    Draw nx.draw_networkx_nodes(pep_graph, pos=position_dict, node_color="#ffa1a1", node_size=1200) nx.draw_networkx_labels(pep_graph, pos=position_dict, font_size=30, alpha=0.7) nx.draw_networkx_edges(pep_graph, pos=position_dict, alpha=0.7, arrowsize=30) plt.show() %SBXJOH IUUQTOFUXPSLYHJUIVCJPEPDVNFOUBUJPOTUBCMFSFGFSFODFESBXJOHIUNM /FUXPSL9͸؆୯ͳඳըͷػೳΛඋ͍͑ͯΔ
  56. None
  57. None
  58. *TPMBUFE1&1T OYJTPMBUFT QFQ@HSBQI ݽཱͨ͠1&1

  59. SFMBZPVU 1MFBTFTFFUIFKVQZUFSOPUFCPPLGPSEFUBJMT ΅ͬͪ͸࠶഑ஔ

  60. $PMPSFECZ1&1`T4UBUVT ͖ͬ͞ઃఆͨ͠4UBUVTͷ৘ใΛ࢖ͬͯϊʔυͷ৭Λมߋͯ͋͛͠Δ

  61. $IBOHF/PEF4J[FCZ%FHSFF OPEF JOEFHSFF PVUEFHSFF EFHSFF ࣍਺ʹΑͬͯαΠζΛม͑ͯΈΔ ೖ࣍਺ ग़࣍਺ ࣍਺

  62. $IBOHF/PEF4J[FCZ%FHSFF OPEF JOEFHSFF PVUEFHSFF EFHSFF QFQ@HSBQIJO@EFHSFF /0%&@*% QFQ@HSBQIPVU@EFHSFF /0%&@*% QFQ@HSBQIEFHSFF

    /0%&@*%
  63. $IBOHF4J[FCZJOEFHSFF

  64. $IBOHF4J[FCZJOEFHSFF

  65. 2VJ[ 8IJDI1&1IBTUIFIJHIFTUJOEFHSFF  " 1&14UZMF(VJEFGPS1ZUIPO$PEF
    # 1&11&11VSQPTFBOE(VJEFMJOFT


      $ 1&15ZQF)JOUT
   Ұ൪ೖ࣍਺͕ߴ͍ʢ୔ࢁͷ1&1͔Βࢀর͞Ε͍ͯΔ1&1ʣ͸Կʁ
  66. 5PQ JOEFHSFF 1&14UZMF(VJEFGPS1ZUIPO$PEF


  67. *OUFSBDUJWF7JTVBMJ[BUJPO IUUQTLPNPGSHJUIVCJPQFQ@NBQ@TJUFOFUXPSLIUNM /FUXPSL9#PLFI 1&1.BQc/FUXPSL

  68. $IBOHF4J[FCZPVUEFHSFF

  69. $IBOHF4J[FCZPVUEFHSFF

  70. 5PQ PVUEFHSFF 3FMFBTF4DIFEVMF

  71. 1&11ZUIPO3FMFBTF4DIFEVMF

  72. 0UIFST 7BSJPVT$FOUSBMJUZ த৺ੑʣ IUUQTOFUXPSLYHJUIVCJPEPDVNFOUBUJPOTUBCMFSFGFSFODFBMHPSJUINT DFOUSBMJUZIUNM

  73. 5PQ EFHSFF JO EFHSFF PVU EFHSFF EFHSFF

  74. 5PQ EFHSFF JO EFHSFF PVU EFHSFF EFHSFF 1&1 .FUBEBUBGPS1ZUIPO4PGUXBSF1BDLBHF

  75. *OUFSBDUJWF7JTVBMJ[BUJPO 5JNFMJOF 1&1Š5ZQF)JOUT 1&1Š4UZMF(VJEFGPS1ZUIPO$PEF -POH4FMMFS 5SFOE IUUQTLPNPGSHJUIVCJPQFQ@NBQ@TJUFUJNFMJOFIUNM EBUFDSFBUFEPO

  76. 0VUMJOF  8IBUJTUIF3FGFSFODF3FMBUJPOTIJQPG1&1T   8IZBN*EPJOHUIJT  .PUJWBUJPO  

    )PX   /FUXPSL"OBMZTJT/FUXPSL9  1SFQBSFBOE4FF%BUB  %SBXUIFFOUJSFOFUXPSL  $PNNVOJUZ%FUFDUJPO
  77. None
  78. None
  79. $PNNVOJUZ%FUFDUJPO $POOFDUFE$PNQPOFOU $MVTUFSJOH 6TFQZUIPOMPVWBJOQBDLBHF

  80. (SPVQCZDPOOFDUFEDPNQPOFOU

  81. (SPVQCZDPOOFDUFEDPNQPOFOU

  82. for group_nodes in nx.weakly_connected_components(sample_graph): print(group_nodes) {'A'} {'C', 'B'} {'D', 'F',

    'E'} {'G', 'H', 'K', 'L'} OYXFBLMZ@DPOOFDUFE@DPNQPOFOUT
  83. None
  84. JTPMBUFE1&1T 1&1T 4NBMM(SPVQ 1&1T -BSHF(SPVQ 1&1T

  85. 4NBMM(SPVQ 1&1T

  86. 3FKFDUFE4XJUDI4UBUFNFOU

  87. 3FKFDUFE4XJUDI4UBUFNFOU • [PEP 275] Switching on Multiple Values • [PEP

    3103] A Switch/Case Statement
  88.  One day, an island appeared. PEP 80xx

  89.  ……The island was connected to the continent. PEP 1

    PEP 80xx
  90. )VC1&1 1&1 1&1 3FMFBTF4DIFEVMF1&1

  91. $PNNVOJUZ%FUFDUJPO $POOFDUFE$PNQPOFOU $MVTUFSJOH 6TFQZUIPOMPVWBJOQBDLBHF

  92. -PVWBJOBMHPSJUIN #MPOEFM 7JODFOU% FUBM'BTUVOGPMEJOHPGDPNNVOJUJFT JOMBSHFOFUXPSLT+PVSOBMPGTUBUJTUJDBMNFDIBOJDTUIFPSZ BOEFYQFSJNFOU  1 IUUQTBSYJWPSHBCT QZUIPOMPVWBJOQBDLBHF

    (JU)VCIUUQTHJUIVCDPNUBZOBVEQZUIPOMPVWBJO
  93. /FUXPSL9JTTVF -FUTNFSHFQZUIPOMPVWBJOJOUP/FUXPSL9 *UJTTUJMMPQFO IUUQTHJUIVCDPNOFUXPSLYOFUXPSLYJTTVFT

  94. 4BNQMF LBSBUFDMVCOFUXPSL

  95. 4BNQMF LBSBUFDMVCOFUXPSL

  96. "QQMZUP1&1(SBQI -BSHF(SPVQ 1&1T  ˣ (SPVQT 1&1T

  97. *OUFSBDUJWF7JTVBMJ[BUJPO IUUQTLPNPGSHJUIVCJPQFQ@NBQ@TJUFMPVWBJOIUNM /FUXPSL9#PLFI

  98. (SPVQ" 1&1T 1&1 (PWFSOBODFʜʜ

  99. (SPVQ" 1&1T .FUBEBUB 1BDLBHF 8IFFMʜʜ

  100. (SPVQ" 1&1T 4USJOHʜʜ

  101. (SPVQ" 1&1T 1Z1*ʜʜ

  102. *NQSFTTJPO

  103. *NQSFTTJPO ❌/FUXPSL9Ͱ࢖͑͹όγοͱ໌֬ͳߏ଄͕Θ͔Δ ⭕ʮԿͰ͜͏͍͏݁ՌʹͳΔΜͩΖ͏ʁʯͱ୳ࡧ͠ ͍ͯ͘͏ͪʹɺ΅Μ΍Γ֓؍Λ௫ΜͰ͍͘ײ͡ ϦϯΫషͬͯͳ͍͚Ͳ࣮͸͜Εؔ܎ͯ͠ΔΜ͡Ό ͳ͍ͷʁ ͦ΋ͦ΋ʮؔ܎ʯͷఆٛͬͯԿͩʁʁ

  104. 4PNFUIJOHMJLFBNBQ • ݁ہͷͱ͜Ζɺ࣮ࡍͲ͏ͳͷ͔͸ݱ஍ʹ଍ΛӡͿʢ= PEPͷத਎ ΛͪΌΜͱಡΉʣ͜ͱൈ͖Ͱ͸Θ͔Βͳ͍ • Ͱ΋ཱྀ׳Ε͍ͯ͠ͳ͍΍͕ͭ஍ਤແ͠Ͱา͘ͷ͸ͭΒ͍ • ͳΜͱͳ͋͘ͷลʹࢁ΍઒ʢಛ௃తͳPEPʣ͕͋Δ •

    ͋ͷล͸ཱྀͷ೉౓ߴͦ͏͔ͩΒࠓ͸ආ͚Α͏ʢඃࢀর਺ଟ͍ͷ ʹԘ௮͚ʹͳͬͨPEPͱ͔ʣ • ͬ͘͟Γ͜͏͍͏஍Ҭʢαϒάϧʔϓʣ͕͋ΔΜͩͳ͊ • ʢ೔ʑߋ৽͞Ε͍ͯΔͷͰʣͨ·ʹ஍ܗͷେن໛มԽ͕ى͜Δ
  105. %BUB$PEF • PEP Map • https://github.com/komo-fr/pep_map_site • Network • https://komo-fr.github.io/pep_map_site/network.html

    • Clustering Result • https://komo-fr.github.io/pep_map_site/louvain.html • Jupyter Notebook • https://github.com/komo-fr/SciPyJapan_2019_talk