Skip to main content

Utility packages for Twitter tennis tournaments data sets.

Project description

twittertennis

build codecov PyPI - Python Version Binder

Utility python package for RG17 and UO17 Twitter tennis tournament data sets.

Introduction

This repository is a Python package that ease the interaction with two Twitter data sets related to tennis tournaments: RG17 (Roland-Garros 2017) and UO17 (USOpen 2017). In our research, we used the underlying Twitter mention graphs to analyse the performance of mulitple dynamic centrality measures and temporal node embedding methods. A huge advantage of our data is that the nodes (Twitter accounts) of the network are temporally labeled thus we could compare online graph algortihms in supervised evaluation tasks. The labels encode whether a given node in the Twitter mention network is related to a tennis player who played in a tournament on the given day. For more details on these data sets, see our paper: Temporal walk based centrality metric for graph streams.

How to deploy?

Install

pip install twittertennis

Tests

git clone https://github.com/ferencberes/twittertennis.git
cd twittertennis
python setup.py test

Examples

Quick start

In this short example the RG17 (Roland-Garros 2017) data set is processed by the TennisDataHandler object. The data is automatically downloaded to the '../data/' folder during the first execution! After (downloading and) processing the data, daily node relevance labels are exported and prepared for further analysis.

import twittertennis.handler as tt

handler = tt.TennisDataHandler("../data/", "rg17", include_qualifiers=True)
print(handler.summary())
handler.export_relevance_labels(YOUR_OUTPUT_DIR, binary=True)

OR change the last line of the code if you only want to export relevant nodes for each day:

handler.export_relevance_labels(YOUR_OUTPUT_DIR, binary=True, only_pos_label=True)

See more examples and information about the data in this notebook.

Related research

1. Temporal walk based centrality metric for graph streams: paper code

@article{Beres2018,
author="B{\'e}res, Ferenc
and P{\'a}lovics, R{\'o}bert
and Ol{\'a}h, Anna
and Bencz{\'u}r, Andr{\'a}s A.",
title="Temporal walk based centrality metric for graph streams",
journal="Applied Network Science",
year="2018",
volume="3",
number="32",
pages="26",
issn="2364-8228",
}

2. Node embeddings in dynamic graphs: paper code

@Article{Béres2019,
author="B{\'e}res, Ferenc
and Kelen, Domokos M.
and P{\'a}lovics, R{\'o}bert
and Bencz{\'u}r, Andr{\'a}s A.",
title="Node embeddings in dynamic graphs",
journal="Applied Network Science",
year="2019",
volume="4",
number="64",
pages="25",
}

3. PyTorch Geometric Temporal: Spatiotemporal Signal Processing with Neural Machine Learning Models: paper code

@article{RozemberczkiPGT2021,
  author    = {Benedek Rozemberczki and
               Paul Scherer and
               Yixuan He and
               George Panagopoulos and
               Maria Sinziana Astefanoaei and
               Oliver Kiss and
               Ferenc B{\'{e}}res and
               Nicolas Collignon and
               Rik Sarkar},
  title     = {PyTorch Geometric Temporal: Spatiotemporal Signal Processing with
               Neural Machine Learning Models},
  volume    = {abs/2104.07788},
  year      = {2021},
  url       = {https://arxiv.org/abs/2104.07788},
  archivePrefix = {arXiv},
  eprint    = {2104.07788},
}

Project details


Download files

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

Source Distribution

twittertennis-0.1.2.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

twittertennis-0.1.2-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file twittertennis-0.1.2.tar.gz.

File metadata

  • Download URL: twittertennis-0.1.2.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.10

File hashes

Hashes for twittertennis-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6421de69753135db1dd45880c8584ba8db9bd63b9fab1714af44ce4998c60a93
MD5 6c0c4db82198f6baeb2a094047dc6db0
BLAKE2b-256 5f1bbfccb221e0fe61b383498c9723be9c83e36a242696b615b728833989c4ea

See more details on using hashes here.

File details

Details for the file twittertennis-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: twittertennis-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.10

File hashes

Hashes for twittertennis-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ed4623473d025af2785e37b220259e649285c25c345ff0a25e61f7a2db27f585
MD5 4bb0fea2ddbe85a0c0e4fee59ee4eb45
BLAKE2b-256 e697b8c40aa036308367f22220c7a8e7dace95fb0745c6caf49b6e81f13a92fe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page