NetworkX:
Network Analysis with Python
Petko Georgiev (special thanks to Anastasios Noulas and Salvatore Scellato)
Computer Laboratory, University of Cambridge
February 2015
Outline
1. Introduction to NetworkX
2. Getting started with Python and NetworkX
3. Basic network analysis
4. Writing your own code
5. Ready for your own analysis!
2
1. Introduction to NetworkX
3
Introduction: networks are everywhere…
4
Social networks
Vehicular flows
Mobile phone networks
Web pages/citations
Internet routing
How can we analyse these networks?
Python + NetworkX
Introduction: why Python?
5
Python is an interpreted, general-purpose high-level programming
language whose design philosophy emphasises code readability
+
Clear syntax
Dynamic typing
Strong on-line community
Rich documentation
Numerous libraries
Multiple programming paradigms
Expressive features
Fast prototyping
-
Can be slow
Beware when you are
analysing very large networks
Introduction: Python’s Holy Trinity
NumPy is an extension to
include multidimensional
arrays and matrices.
Both SciPy and NumPy rely
on the C library LAPACK for
very fast implementation.
6
Matplotlib is the
primary plotting library
in Python.
Supports 2-D and 3-D
plotting. All plots are
highly customisable and
ready for professional
publication.
Dostları ilə paylaş: |