Skip to main content

Who influences whom in social network - an application for finding key nodes

Project description


pipeline status Finding influencers in social network

An application created as part of the project

Kto na kogo wpływa w sieci społecznej - aplikacja do wyszukiwania kluczowych węzłów

Who influences whom in social network - an application for finding key nodes

Author: Grzegorz Chilczuk

Supervisor: dr inż. Radosław Michalski


It should be as simple as

pip install influ


All dependencies will be installed automatically. However one of most important dependencies is cool python library called igraph which core is written in C. Sometimes it may cause some problem, igraph documentation should help.

Debian / Ubuntu and derivatives

If you encounter

Could not download and compile the C core of igraph

then installing those dependencies should help:

 sudo apt install build-essential python-dev libxml2 libxml2-dev zlib1g-dev

Konect Reader

In order to test your concepts quickly there is a KonectReader which simplifies downloading and extracting datasets and loading them into Graph object.

from influ import KonectReader

kr = KonectReader()
kr.list  # list available datasets
graph = kr.load('manufacturing_emails')  # load dataset

Currently there is only few datasets available but you can provide your own config file with other datasets specified. Currently only datasets from Konect are supported.

Your own config file

# Content of my_custom_config.yaml
example_dataset:  # name that will be used to access dataset
  name: Example Dataset 1
  url:  # url where dataset is described [optional]
  download:  # url where dataset can be downloaded directly
  file: out.dataset_example_example  # name of file with 
  directed: False  # does graph should be considered as directed?
  edge_attributes:  # list of names attributes
    - distance      # if this list will be empty or there will be more attributes
    - another_attr  # it will be named `attrX` where X is index counted from 0
  vertex_attributes:                # list of vertex attributes with files where they are stored
    - name: alias                   # name of attribute
      file: ent.vertex_alias_name   # file with attribute

Loading your custom config extends (does not override) those previously loaded.

kr = KonectReader('./my_custom_config.yaml')  # loading at creation time
kr.add_config('./my_custom_config.yaml')      # adding config after creation

Working example

from influ import KonectReader, SeedFinder

kr = KonectReader()
graph = kr.load('train_bombing')
finder = SeedFinder(graph)
result = finder.CELFpp()


Change log

[0.1.0] - 2018-12-01


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for influ, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size influ-0.1.0-py3-none-any.whl (11.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size influ-0.1.0.tar.gz (11.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page