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

Bokeh & Dash Cytoscape 〜 Pythonによるインタラクティブなネットワ...

komo_fr
October 15, 2021

Bokeh & Dash Cytoscape 〜 Pythonによるインタラクティブなネットワーク可視化ライブラリの比較 / PyConJP2021

komo_fr

October 15, 2021
Tweet

More Decks by komo_fr

Other Decks in Programming

Transcript

  1. !LPNP@GS ࣗݾ঺հ 2 ‣ ݹ໦༑ࢠ ‣ ࢓ࣄ ‣ 1ZUIPOʹΑΔσʔλղੳɾιϑτ΢ΤΞ։ൃ ‣

    גࣜձࣾϏʔϓϥ΢υ ‣ ౦ژେֶઌ୺Պֶٕज़ݚڀηϯλʔ ‣ ࣥච ‣ ே૔ॻళ1ZUIPOΠϯλϥΫςΟϒɾσʔλϏδϡΞϥΠθʔγϣϯೖ໳ʢڞஶʣ ‣ %BTI$ZUPTDBQFؔ࿈ষʢ ষʣΛ୲౰ ‣ 1ZUIPOίϛϡχςΟʹ͓͚Δొஃཤྺ ‣ 1Z$PO+1 UBML  ‣ &VSP1ZUIPO -5 &VSP1ZUIPO!εΠε ిࢠॻ੶൛ Ͱ·ͨ͠ 🎉
  2. !LPNP@GS ຊ೔ͷ಺༰ ‣ ಺༰ ‣ 1ZUIPOͰΠϯλϥΫςΟϒͳωοτϫʔΫՄࢹԽ͕ߦ͑ΔϥΠϒϥϦͱͯ͠ɺ #PLFI͓Αͼ%BTI$ZUPTDBQFͷಛ௃Λൺֱͯ͠঺հ͠·͢ɻ ‣ ࿩͢͜ͱ ‣

    ωοτϫʔΫߏ଄ͷσʔλΛՄࢹԽ͢Δ্ͰͷϙΠϯτ ‣ 1ZUIPOͰΠϯλϥΫςΟϒͳωοτϫʔΫՄࢹԽΛߦ͏্ͰͷϥΠϒϥϦͷબ୒ࢶ ‣ #PLFI͓Αͼ%BTI$ZUPTDBQFͷಛ௃ͱɺ྆ϥΠϒϥϦͷجຊతͳ࢖͍ํ ‣ ࿩͞ͳ͍͜ͱ ‣ #PLFI΍%BTI$ZUPTDBQFͷݸʑͷࡉ͔͍ΧελϚΠζͷํ๏ ‣ ωοτϫʔΫ෼ੳͷख๏ 3
  3. !LPNP@GS ωοτϫʔΫՄࢹԽͱ͸ ‣ ʮԿ͔ʯͱʮԿ͔ʯͷؔ܎ΛՄࢹԽ͢Δख๏ͷͻͱͭ ‣ σʔλͱσʔλͷؔ܎ʹண໨͢Δ͜ͱͰɺ σʔλ୯ମͷଐੑͰ͸Θ͔Βͳ͍ੑ࣭Λ୳Δ ‣ ྫ ‣

    ࿦จͱ࿦จͷҾ༻ؔ܎ ‣ ༑ਓؔ܎ 5 ϊʔυ ϊʔυ Τοδ ۭखΫϥϒͷ ༑ਓؔ܎ωοτϫʔΫ ϊʔυ෦һ Τοδަ༑ؔ܎ ৭ॴଐ೿ൊʢ෦௕೿ࢣൣ೿ʣ
  4. !LPNP@GS $07*%ؔ࿈ͷ࿦จωοτϫʔΫ ‣ $03%ʢ$07*%0QFO3FTFBSDI%BUBTFU$IBMMFOHFʣ ‣ $07*%ؔ࿈࿦จΛͷτϐοΫʹ෼ྨ͠Ҿ༻ؔ܎Λදࣔ ‣ 6 ৭࿦จͷτϐοΫ ϊʔυαΠζඃҾ༻਺

    දࣔର৅ͱͳΔ ඃҾ༻਺ͷ࠷খ஋ ެ։ઌͷδϟʔφϧ Τοδͷදࣔɾඇදࣔ ੾ସ ࣍ݩ࡟ݮΞϧΰϦζϜ ࣍ݩ࡟ݮΞϧΰϦζϜ Ͱ࢖͏ύϥϝʔλ IUUQTEBTIHBMMFSZQMPUMZIPTUEBTIDZUPTDBQFMEB
  5. !LPNP@GS ωοτϫʔΫՄࢹԽͷجຊ ‣ ߏ੒ཁૉʢϊʔυͱΤοδʣ ‣ ʮԿͱԿ͕ؔ܎͋Δ͔ʯΛࣔ͢ߏ଄ ‣ Կͷϊʔυ͕͋Δ͔ɺͲͷϊʔυಉ࢜ʹΤοδ͕ுΒΕ͍ͯΔ͔ ‣ ελΠϧʢେ͖͞ɺ৭ɺܗঢ়ͳͲʣ

    ‣ ͨ͘͞Μͷ࿦จ͔ΒҾ༻͞Ε͍ͯͨΒ ϊʔυΛେ͖͘͢Δ ‣ ࿦จͷΧςΰϦ͝ͱʹ৭Λม͑Δ ‣ ϊʔυͷ഑ஔ ‣ ෺ཧతͳҐஔͱϊʔυͷ഑ஔΛҰகͤ͞Δ ‣ Ӻ΍ۭߓͷަ௨ωοτϫʔΫͳͲ ‣ ͹ͶྗֶΛ༻͍ͯɺࢹೝੑ͕ߴ͍Α͏ʹ഑ஔ͢Δ 7
  6. !LPNP@GS 1ZUIPOʹΑΔωοτϫʔΫՄࢹԽͷબ୒ࢶ ‣ /FUXPSL9 ‣ෳࡶωοτϫʔΫͷͨΊͷύοέʔδ ‣ωοτϫʔΫߏ଄ͷߏங΍ม׵ɺ෼ੳɺϊʔυͷ഑ஔΞϧΰϦζϜͳͲ ‣ՄࢹԽ෦෼͸NBUQMPUMJCʹґଘʢ੩ࢭը૾ͷΈʣ ‣ %BTI$ZUPTDBQF ‣

    %BTIͷ௥Ճίϯϙʔωϯτ ‣ ΠϯλϥΫςΟϒͳάϥϑΛ૊ΈࠐΜͩ8FCΞϓϦΛߏஙͰ͖ΔϑϨʔϜϫʔΫ ‣ $ZUPTDBQFKTͷ1ZUIPOϥούʔ ‣ (BMMFSZIUUQTEBTIHBMMFSZQMPUMZIPTU1PSUBM ‣ CPLFI ‣ 1ZUIPOͷΠϯλϥΫςΟϒͳάϥϑඳըϥΠϒϥϦ ‣ /FUXPSL9ͱͷ࿈ܞ͕εϜʔζʹߦ͑Δ ‣ 6TFS(VJEFIUUQTEPDTCPLFIPSHFOMBUFTUEPDTVTFS@HVJEFHSBQIIUNM 8 ✅ΠϯλϥΫςΟϒ ✅ΠϯλϥΫςΟϒ
  7. !LPNP@GS CPLFIͷ࣮ߦํ๏ 13 ‣ ํ๏PVUQVU@OPUFCPPL Λ࢖ͬͯ+VQZUFS্Ͱදࣔ ‣ खૣ͘ΠϯλϥΫςΟϒʹݟ͍ͨ࣌ʹศར ‣ OCWFXFSͳͲͰڞ༗Ͱ͖Δ

    ‣ ํ๏PVUQVU@pMF Λ࢖ͬͯάϥϑΛIUNMϑΝΠϧͱͯ͠อଘ ‣ ؀ڥͳͲؾʹͤͣڞ༗͍ͨ࣌͠ʹศར ‣ (JU)VC1BHFTͳͲʹIUNMϑΝΠϧ͚ͩஔ͘ͳͲɺ αʔόΛཱͯͳͯ͘΋ڞ༗Ͱ͖Δ ‣ ํ๏#PLFI4FSWFS ‣ IUUQTEPDTCPLFIPSHFOMBUFTUEPDTVTFS@HVJEFTFSWFSIUNM ‣ ࢲ͸࢖༻ͨ͜͠ͱ͕ͳ͍ͨΊׂѪ 
  8. !LPNP@GS 15 ‣ ͜Ε·ͰͷαϯϓϧίʔυͰ͸ ϊʔυΤοδͷఆٛΛ௚઀ίʔυʹॻ͍͍ͯͨ ‣ ࣮ࡍʹ͸ɺ࣍ͷΑ͏ͳσʔλ΋࢖ΘΕΔ ‣ ֎෦ϑΝΠϧʹఆٛ͞Ε࣮ͨσʔλʢDTW HNM

    OFUʣ ‣ γϛϡϨʔγϣϯͳͲʹΑͬͯਓ޻తʹੜ੒ͨ͠σʔλ ‣ /FUXPSL9Λܦ༝͢Δͱɺ΄͔ͷσʔλܗ͔ࣜΒ%BTI $ZUPTDBQF΍CPLFIͷσʔλߏ଄ʹม׵͠΍͘͢ͳΔ ‣ /FUXPSL9ͷσʔλม׵ػೳ ‣ IUUQTOFUXPSLYPSHEPDVNFOUBUJPOTUBCMFSFGFSFODF DPOWFSUIUNM /FUXPSL9ͱͷ࿈ܞ 
  9. !LPNP@GS 16 ‣ %BTI$ZUPTDBQFͷ৔߹ ‣ /FUXPSL9$ZUPTDBQFʹม׵ ‣ /FUXPSL9ͷOYSFBEXSJUFKTPO@HSBQIDZUPTDBQF@EBUB ؔ਺ ‣

    $ZUPTDBQF%BTI$ZUPTDBQFʹม׵ ‣ ࣗ෼ͰίʔυΛॻ͍ͯม׵ ‣ Wͷ৔߹ɺϊʔυɾΤοδͷσʔλࣙॻʹ਺ࣈ͕͋ΔͱΤϥʔʹͳΔͨΊɺ จࣈྻʹม׵͢Δ ‣ #PLFIͷ৔߹ ‣ /FUXPSL9CPLFIʹม׵ ‣ CPLFIͷGSPN@OFUXPSLY ؔ਺ ‣ /FUXPSL9ͷϨΠΞ΢τؔ਺Λࢦఆ͢Δ͜ͱͰϊʔυͷҐஔΛࣗಈܭࢉͰ͖Δ /FUXPSL9ͱͷ࿈ܞ  📄TDSJQUTOFUXPSLY@XJUI@EBTIQZ 📄OPUFCPPLTCPLFI@TBNQMFJQZOC
  10. !LPNP@GS %BTI$ZPUTDBQF#PLFIൺֱ 17 %BTI$ZUPTDBQF #PLFI ߏ੒ཁૉ ʢϊʔυɾ Τοδͷఆٛʣ w /FUXPSL9ͷάϥϑߏ଄͔Βͷม׵͸গͩ͠

    ͚खؒʢࣗ෼ͰίʔυΛॻ͘ඞཁ͕͋Δʣ w /FUXPSL9ͷάϥϑߏ଄͔Βͷม׵͸ָ ʢม׵༻ͷؔ਺GSPN@OFUXPSL ͕͋Δʣ ϊʔυͷ ഑ஔํ๏ w DZUPTDBQFKTͰ࢖͑Δࣗಈ഑ஔΞϧΰϦζϜ Λར༻Ͱ͖Δʢ໌ࣔతͳ࠲ඪࢦఆ΋Մʣ w ࣗಈ഑ஔΞϧΰϦζϜ͸ͳ͍ʢ໌ࣔతͳ࠲ ඪࢦఆͷΈʣ w GSPN@OFUXPSLY Ͱ͸ɺ/FUXPSL9ͷϨΠ Ξ΢τؔ਺Λར༻Ͱ͖Δ ελΠϧ w ͢΂ͯͷϊʔυɾΤοδΛҰׅͰࢦఆ w ݸʑͷϊʔυΤοδ͝ͱ w ಛఆͷΫϥεͷάϧʔϓ͝ͱ w ৚݅ࢦఆͳͲ w ͢΂ͯͷϊʔυΤοδΛҰׅͰࢦఆ w ݸʑͷϊʔυΤοδຖʹࢦఆ ͦͷଞ w ༗޲άϥϑՄʢελΠϧͰࢦఆʣ w +VQZUFS্Ͱ͸දࣔෆՄ w ൃදޙ௥هKVQZUFSEBTIΛ࢖͑͹Մ ʢOPUFCPPLTKVQZUFS@EBTI@DZUPJQZOCʣ w )5.-ϑΝΠϧอଘෆՄ w ༗޲άϥϑ͸ෆՄʢ಺෦తʹ͸࢝఺ɾऴ఺ ͷ۠ผ͸͋Δ͕ɺද্ࣔʹҧ͍͕ग़ͳ͍ʣ w +VQZUFS্ͰදࣔՄ w )5.-ϑΝΠϧอଘՄ 📄OPUFCPPLTCPLFI@TBNQMFJQZOC
  11. !LPNP@GS 19 ‣ ڞ௨ͰͰ͖Δ͜ͱ ‣ ֦େॖখɺਤશମͷҠಈɺϊʔυ΍Τοδͷબ୒ͳͲ ‣ %BTI$ZUPTDBQFͷ৔߹ ‣ υϥοάͰϊʔυͷҐஔΛมߋ

    ‣ ϊʔυɾΤοδຖͷબ୒ෆՄɾυϥοάෆՄͳͲͷࢦఆ ‣ #PLFIͷ৔߹ ‣ ϊʔυɾΤοδ্ʹπʔϧνοϓΛϗόʔͤ͞Δ ‣ ϊʔυબ୒࣌ͷศརͳελΠϧϙϦγʔͷద༻ ‣ ϊʔυΛબ୒ͨ͠Βɺྡ઀͢ΔΤοδͷελΠϧΛม͑ΔͳͲ ‣ %BTI$ZUPTDBQFͰ΋Մೳ͕ͩɺίʔϧόοΫؔ਺Λࣗ෼Ͱॻ͘ඞཁ͕͋Δ γϯϓϧͳΠϯλϥΫςΟϒੑ 📄OPUFCPPLTCPLFI@TBNQMFJQZOC
  12. !LPNP@GS ίʔϧόοΫ 20 ‣ ίʔυΛ௥Ճ͢Δ͜ͱʹΑͬͯ࢖͑ΔΠϯλϥΫςΟϒͳૢ࡞ ‣ ίϯϙʔωϯτಉ࢜Λ࿈ܞͤͨ͞ಈ࡞ ‣ υϩοϓμ΢ϯͰબ୒ͨ͠஋ʹΑͬͯɺϊʔυͷ഑ஔํ๏Λมߋ͢Δ ‣

    ΫϦοΫͨ͠ϊʔυͷ৘ใΛɺଞͷίϯϙʔωϯτʢςΩετͳͲʣͰදࣔ͢Δ ‣ ίʔϧόοΫͱݺ͹ΕΔ࢓૊ΈΛ࢖࣮ͬͯ૷͢Δ ‣ ίʔϧόοΫಛఆͷΠϕϯτΛ͖͔͚ͬʹผͷؔ਺Λݺͼग़͢ॲཧ ‣ ಛఆͷΠϕϯτυϩοϓμ΢ϯͰ஋Λબ୒ͨ͠ͱ͖ɺϊʔυΛΫϦοΫͨ͠ͱ͖౳ ೖྗݩͷ ίϯϙʔωϯτ ଐੑ໊஋ ग़ྗઌͷ ίϯϙʔωϯτ ଐੑ໊஋ ίʔϧόοΫ ؔ਺
  13. !LPNP@GS %BTI$ZPUTDBQF#PLFIൺֱ 27 %BTI$ZUPTDBQF #PLFI γϯϓϧͳ ΠϯλϥΫςΟϒ ੑ w ֦େॖখɺਤશମͷҠಈɺϊʔυ΍Το

    δͷબ୒͸Մ w ϊʔυɾΤοδͷҠಈ͸Մ w ϗόʔπʔϧͷ࣮૷͸೉͍͠ w ֦େॖখɺਤશମͷҠಈɺϊʔυ΍Τοδͷબ ୒͸Մ w ϊʔυɾΤοδͷҠಈ͸ෆՄ w ϗόʔπʔϧ͸؆୯ʹ࣮૷Մ w ઃఆʹΑͬͯɺϊʔυΤοδબ୒࣌ͷྡ઀ཁ ૉͷελΠϧมߋ͕͠΍͍͢ ίʔϧόοΫ ؔ਺ w σίϨʔλΛ࢖ͬͯ1ZUIPOͰίʔϧό οΫؔ਺Λఆٛ͢Δ w $VTUPN+4ΫϥεΛ࢖ͬͯ+BWB4DSJQUͰίʔ ϧόοΫؔ਺Λఆٛ͢Δ ͦͷଞ ίʔϧόοΫؔ਺ͷσόοάͷͨΊͷػೳ ͕༻ҙ͞Ε͍ͯΔ
  14. !LPNP@GS ݁ہͲͬͪΛ࢖͑͹͍͍ͷʁ 28 ‣ ࢖͍΍͢͞ʹؔͯ͠ ‣ ॻ͖ํʹؔͯ͠͸ɺ%BTIQMPUMZͷΤίγεςϜʹ׳Ε͍ͯΔ͔ɺ#PLFIͷΤίγεςϜʹ׳Ε͍ͯΔ ͔ͰมΘΔʢωοτϫʔΫਤҎ֎ͷཁૉʣ ‣ ͋͘·ͰݸਓతͳॴײͰ͸

    ‣ /FUXPSL9Ͱલॲཧɾ෼ੳͨ݁͠ՌΛ+VQZUFS্ͰͪΐͬͱΠϯλϥΫςΟϒʹݟ͍ͨͱ͖ ‣ #PLFI ‣ +VQZUFS্Ͱ֬ೝͰ͖Δɺϗόʔπʔϧ΍/FUXPSL9ͱͷ࿈ܞ͕ศར ‣ ൃදޙ௥هKVQZUFSEBTIΛೖΕΕ͹%BTI$ZUPTDBQFͰ΋+VQZUFS্ͰදࣔՄ ‣ ෳ਺ͷ6*͕བྷΜͰগ͠ࠐΈೖͬͨμογϡϘʔυΛ࡞Γ͍ͨͱ͖ ‣ %BTI$ZUPTDBQF ‣ #PLFIͰෳࡶͳ͜ͱΛ΍Ζ͏ͱ͢Δͱɺ+BWB4DSJQUͰίʔϧόοΫؔ਺Λॻ͘ͷ͕ͪΐͬͱਏ͍