Skip to main content

Package to create networks for detecting coordination in social media.

Project description

coordinationz

Collection of scripts and package to analyze coordination in social media data.

To install the package, download the git repository and run the following command in the root directory:

pip install .

To install the package in development mode, run the following commands in the root directory:

pip install meson-python ninja numpy
pip install --no-build-isolation -e .

For debug mode, use the following command for local installation:

pip install --no-build-isolation -U -e . -Csetup-args=-Dbuildtype=debug

To debug the C code, use gdb:

gdb -ex=run -args python <python file>

Run for INCAS datasets (e.g., phase2a or phase2b)

First install the package as described above. The next step is setting up the config.toml file. You can use config_template.toml as a template.

cp config_template.toml config.toml

Setup the paths for the INCAS datasets and networks

# Location of jsonl files
INCAS_DATASETS = "/mnt/osome/INCAS/datasets" 

# Location where the preprocessed datasets will be stored
PREPROCESSED_DATASETS = "Data/Preprocessed"

#Logation of the outputs 
NETWORKS = "Outputs/Networks"
FIGURES = "Outputs/Figures"
TABLES = "Outputs/Tables"
CONFIGS = "Outputs/Configs"

The INCAS_DATASETS folder should contain the uncompressed jsonl files.

First, the files should be preprocessed. This can be done by running the following python script:

python pipeline/preprocess/preprocessINCAS.py <dataname>

where dataname is the name of the dataset, which correspondts to the <INCAS_DATASETS>/<dataname>.jsonl file. Together with the preprocessed data, the script will generate a .txt file with some information about the dataset.

The parameters of the indicators can be set in the config.toml file.

Currently, only co-hashtag, co-URL and co-retweets are supported.

To run the indicators, you can use the pipeline/indicators.py script by running the following command:

python pipeline/indicators.py <dataname>

where dataname is the name of the dataset and indicator is the indicator to be run.

You an add a suffix to the output files by adding the --suffix parameter:

python pipeline/indicators.py <dataname> --suffix <suffix>

if no suffix is provided, the a timestamp will be used as suffix.

Such a process will generate files in the output directories defined by NETWORKS, TABLES, and CONFIGS.

In particular, the TABLES folder will contain the suspicious pairs of users and clusters in CSV format.

The NETWORKS folder will contain the networks in xnet format. xnet format can be read by using the xnetwork package:

pip install xnetwork

and using the following code:

import xnetwork as xn
g = xn.load("network.xnet")

The result is an igraph network. You can convert it to the networkx format by using the following code:

network = g.to_networkx()

The config file used to generate the data will be copied to the "CONFIG" directory. A new section will be added to the config with extra parameters about the run.

Text similarity indicators

The text similarity indicators can be run by including usctextsimilarity, textsimilarity or coword to the indicator list. For instance pipeline/indicators.py <data_name> -i cohashtag coretweet courl textsimilarity. usctextsimilarity` and textsimilarity requires the instalation of packages faiss and sentence-transformers. GPU is recommended for performance.

Run for IO datasets

Repeat the same steps as for INCAS datasets, but set the IO_DATASETS variable in the config.toml file to the location of the IO datasets. Also, for preprocessing, use the pipeline/preprocess/preprocessIO.py script.

Submitted methodologies

To generate the results submmited for the evaluation datasets, use the following procedures:

First preprocess the dataset according to the preprocess instructions above.

For the UNION approach:

  • Copy the config_template_union.toml to config_union.toml and set the PATHS accordingly.
  • Run the following command:
python pipeline/indicators.py <dataname> -c config_union.toml -i cohashtag coretweet courl coword -s union

where <dataname> is the filename of the dataset (for the evaluation dataset it should be TA2_full_eval_NO_GT_nat_2024-06-03 or TA2_full_eval_NO_GT_nat+synth_2024-06-03).

  • The results will be stored in the Outputs/Tables (or the folder defined in the config file).

For the SOFTUNION approach:

  • Copy the config_template_softunion.toml to config_softunion.toml and set the PATHS accordingly.
  • Run the following command:
python pipeline/indicators.py <dataname> -c config_softunion.toml -i cohashtag coretweet courl coword -s softunion

where <dataname> is the filename of the dataset (for the evaluation dataset it should be TA2_full_eval_NO_GT_nat_2024-06-03 or TA2_full_eval_NO_GT_nat+synth_2024-06-03).

  • The results will be stored in the Outputs/Tables (or the folder defined in the config file).

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

coordinationz-0.0.8-cp312-cp312-win_amd64.whl (50.2 kB view details)

Uploaded CPython 3.12 Windows x86-64

coordinationz-0.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (176.7 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

coordinationz-0.0.8-cp312-cp312-macosx_11_0_arm64.whl (94.1 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

coordinationz-0.0.8-cp312-cp312-macosx_10_9_x86_64.whl (100.7 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

coordinationz-0.0.8-cp311-cp311-win_amd64.whl (50.1 kB view details)

Uploaded CPython 3.11 Windows x86-64

coordinationz-0.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (176.7 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

coordinationz-0.0.8-cp311-cp311-macosx_11_0_arm64.whl (94.1 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

coordinationz-0.0.8-cp311-cp311-macosx_10_9_x86_64.whl (100.6 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

coordinationz-0.0.8-cp310-cp310-win_amd64.whl (50.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

coordinationz-0.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (176.7 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

coordinationz-0.0.8-cp310-cp310-macosx_11_0_arm64.whl (94.0 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

coordinationz-0.0.8-cp310-cp310-macosx_10_9_x86_64.whl (100.6 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

coordinationz-0.0.8-cp39-cp39-win_amd64.whl (50.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

coordinationz-0.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (176.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

coordinationz-0.0.8-cp39-cp39-macosx_11_0_arm64.whl (94.0 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

coordinationz-0.0.8-cp39-cp39-macosx_10_9_x86_64.whl (100.6 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

coordinationz-0.0.8-cp38-cp38-win_amd64.whl (50.0 kB view details)

Uploaded CPython 3.8 Windows x86-64

coordinationz-0.0.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (179.7 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

coordinationz-0.0.8-cp38-cp38-macosx_11_0_arm64.whl (96.1 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

coordinationz-0.0.8-cp38-cp38-macosx_10_9_x86_64.whl (102.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file coordinationz-0.0.8-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c4b7220901f621e37a494207908ddd7370d30d881124a365dd531c4ec192b1b2
MD5 85af54c007a4b7573ce48ff0825310b0
BLAKE2b-256 e447ad4ce88d98bd04bf7e6bfe40408a9573c1cf35caf450a6ce15cea0383bd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp312-cp312-win_amd64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ad08a521bd8accf9cdaba9b91b9e8e9fd63d89b26eaa541eb81e8b39d79be32
MD5 b4c9bfd84363aade3f838deb76c3380a
BLAKE2b-256 d4e022954f13d2dbafce6a20afee19006aa7d5af7341a7fdc7bd39a3a4ecbd05

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 039ec8522343e66ce0041d5b03dc436142b3114d97b28d2905b706e5417756f9
MD5 8a015f1c0f311a4a2227b46145e77bf7
BLAKE2b-256 099bd2f5886aed2730d9307087f54297877bc7105d8852df1073a791c6426523

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d372d63615c9396e1e20f68d3ada8c98b565687abce90633d2afcb3b6f230678
MD5 a9b62c2e7b371d0613706e59ecee580b
BLAKE2b-256 0efb9ece3249968f6bc8e212d820d66ff04b40178d6c91911ce2c162ca6d779f

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp312-cp312-macosx_10_9_x86_64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 98847cf2b3b83609c96605446f8fad2281e60f88cd2cf067df495f779829432d
MD5 392e3e567c93ed9eafb5a417426d0e91
BLAKE2b-256 b4eb8f7137fb86bdf7a4af74806df40e59af84bb59ca9000a7242bf991570396

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp311-cp311-win_amd64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 eecf0ea10af916e8b3912e4afa90224dc0008479461ca3586b5fa4cb6b613a4c
MD5 0c511b3883d0d3c29181c046c606c438
BLAKE2b-256 2d086b3b17f031eb3daa4d217d3c93ffbbb66bfeb0d46413db40ba127ee8f562

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0197e85e8f51c5f58ab1332940c7628b89aca1a587ad27e53a17c6612f1ecf92
MD5 cfb9743c8a03fc5a1930fd655ace55f2
BLAKE2b-256 0c50d68689118a51e5340043ca9dbf9040ec33319df83b201f11f49eae6aad93

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a6011e187602e658b530f6e2da7bcc18c6aff93468c840f67db2a95dba22e275
MD5 930877b2682663550454488372d34e51
BLAKE2b-256 65f09d43b76b3b691eab0592e1a845d8a30df62f4821c2b9827d48cfc7451a12

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 28e3f92ed0cabb6786b3c4408cd3d811954b4210e2a001781a0ecdb2e2bc59be
MD5 9f45198602b04088953a894e3766abde
BLAKE2b-256 67fa636397a7002c17e6a30696530679ec1759b541104c5e31205e8df187671b

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp310-cp310-win_amd64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bed0173433e0a72104b172c87685a678bf914902766bc9a60c25a0af7396a604
MD5 3aa51f603da224707e06f89dff27215a
BLAKE2b-256 ec02c07dd570e446f91e18bc0b0ddfa03e5b76a46bc667a29129ffd7875f1b41

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ffd14981a27d2e4aa2bc09c550e1eb9857329a8e725096abc29a45cf3558e31b
MD5 b0c8ce651b6ed05a5e2aaa0586e72d37
BLAKE2b-256 861dd24044cfa7aaec1660d354e7ae1f663840c89076c3d68866e9ab2ed38bdc

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7047dfbce5cbbf3f12120bfc90b569ddca7f08ea57220cce6f4ed4271fe0cd27
MD5 641acc546de414fad4886a1e14a7f0d9
BLAKE2b-256 bd6f4d3c6e1955eb68e301ece1631371ace719ed7469ab47cbb221db47de386e

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 adbf8640226af6c8b7be766222227e7e75d0d35f34413070430ba5b9126dbb3c
MD5 65e0920b8548c37c8b9aa8b712baf033
BLAKE2b-256 991294c3dd2e3a944404ad34dcf5ac1447765925ecb03491f6137f9abc2b155f

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp39-cp39-win_amd64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d6eaeadbfb7044bf9826f3f40f3a20e3f5523cda71b0ee7509b06c3dff3e924
MD5 68018162dc72eb5bfbe9eba2cca921ee
BLAKE2b-256 47eeb135d7ad5f8085ee407a3b8a0c5ac98c15b5c99da0cef9f216e3cab3981a

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e60e644488bdd0754a270c05d4f444ae4c8dc03fb946f0cdbba788d29ea29962
MD5 c11f057e4bde99e61e50fe576fa9d6f4
BLAKE2b-256 88d004920b3c2b7bf8068702ab148cfa2b7fb877f91b2604311bf59e2054b043

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ce29ee0030744e61b300dd507b6a54aefe372ef12f262313d1a50f28da703619
MD5 3034c76e0c9f666704fe5480f55338d9
BLAKE2b-256 3ad02a3b07ff22505f8cdbc87cba35d8354e7e44a38e3726656932f90bf9323d

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp39-cp39-macosx_10_9_x86_64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 021e700769a26a66029ca6546769a2811b4f0e2100e010ab0d40c4e988eb961b
MD5 1bedd5735eba320a61c99485a1de31b7
BLAKE2b-256 c7882b02a593e1ae39577d5eca611cbaa8e8217b5e0578e32a5ee0720454ac2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp38-cp38-win_amd64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e751bc2dd4802764631d10928364850841729189549305ea8baf5a7b200db26d
MD5 8295b7ce00cc53e1358ca542e35b9fa0
BLAKE2b-256 1a1282c80d78b5d365ebd479028e742b46c211618da608121ddbf04804e7206a

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3a9ee14dd61542d91c15ce27e6b99db8e812800fbb4be74b230ded7ab565957
MD5 43139b5c7f21ece160fdc8b62cef8c5b
BLAKE2b-256 18baef7d81a6531edf09ea2b9c9cc9b2899970ea01460ba148ca20ed4a74bbd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp38-cp38-macosx_11_0_arm64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

File details

Details for the file coordinationz-0.0.8-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.8-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d2ade1cd344eb407a43e202ee5d64a368617a336721d88410c10584e5b4fc3d5
MD5 5cd0114eb08ef517b02d7f4e8624a7b9
BLAKE2b-256 5097a869039f2e3abbadae01727bfb2666e9f7fa3a3337c9031c344a07985e92

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.8-cp38-cp38-macosx_10_9_x86_64.whl:

Publisher: build-publish-pypi.yml on filipinascimento/coordinationz

Attestations:

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