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.7-cp312-cp312-win_amd64.whl (49.5 kB view details)

Uploaded CPython 3.12 Windows x86-64

coordinationz-0.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (176.0 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

coordinationz-0.0.7-cp312-cp312-macosx_11_0_arm64.whl (93.4 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

coordinationz-0.0.7-cp312-cp312-macosx_10_9_x86_64.whl (100.0 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

coordinationz-0.0.7-cp311-cp311-win_amd64.whl (49.5 kB view details)

Uploaded CPython 3.11 Windows x86-64

coordinationz-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (176.0 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

coordinationz-0.0.7-cp311-cp311-macosx_11_0_arm64.whl (93.4 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

coordinationz-0.0.7-cp311-cp311-macosx_10_9_x86_64.whl (99.9 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

coordinationz-0.0.7-cp310-cp310-win_amd64.whl (49.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

coordinationz-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (176.0 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

coordinationz-0.0.7-cp310-cp310-macosx_11_0_arm64.whl (93.4 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

coordinationz-0.0.7-cp310-cp310-macosx_10_9_x86_64.whl (99.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

coordinationz-0.0.7-cp39-cp39-win_amd64.whl (49.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

coordinationz-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (176.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

coordinationz-0.0.7-cp39-cp39-macosx_11_0_arm64.whl (93.4 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

coordinationz-0.0.7-cp39-cp39-macosx_10_9_x86_64.whl (99.9 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

coordinationz-0.0.7-cp38-cp38-win_amd64.whl (49.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

coordinationz-0.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (179.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

coordinationz-0.0.7-cp38-cp38-macosx_11_0_arm64.whl (95.4 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

coordinationz-0.0.7-cp38-cp38-macosx_10_9_x86_64.whl (101.8 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0e346362f07a067f80ce184774846c555d7683fa14c71087ed464d5836efddd6
MD5 2b8b687b7bca77cb2607d6ca507c99b9
BLAKE2b-256 99cae79dd1bede4a5fb67660641ac8f6395846236a378ea3aefa173b746ddd3f

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 338408da5228506582dc6b8bf2a92784256795ffbd7814809b23f7f978857232
MD5 6c9399737765b9db5b5ac63841c0aabe
BLAKE2b-256 1cc86dddaa25fd80c7e1b49f5ff9bd037b16baf3280adb3e897bb43fe77b3bea

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2d7081c2da7286726af96a6ffa0986732321c5991c9f5f2f527a6bf93b103bf2
MD5 5f790bfeb5f18e0fe65c8901a31dfbfa
BLAKE2b-256 1d2ca64bfb98ffba9c872f8faec46550a5787426d1aee6491a2b020da174248e

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 03edb4468198eec14ff22c02eb30866e65f7f698383c5ebc1915e9dafc7c3fb2
MD5 e8ae0718b9639206af685dea8b8540f5
BLAKE2b-256 40d00f9020faafa380cd2dd1372115cb2aaf11765bdaca7f464a3e721c783e49

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cffc94fa812b43499a1a292de67b52e566132512723f4bf66713c18040396dc7
MD5 3796e692227b3103a81d2b773a17be39
BLAKE2b-256 c0565ae8a7a2d0020a6f0afe7ccf801a4e82ef78116b3397d317686d46a070b1

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c503f8ebb48585a8df5ebdb5b3df0875d62e202c1728532fa7224b118a41e857
MD5 badfc41b201299c3e663c5199266a651
BLAKE2b-256 20213c2d0f58c64dcf6959868a446a28e4035124c99fc79e0f85e53934914a2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b2cea21aa934dfce70384e3d39171170521c1502158c35ff45be62e2b417752c
MD5 38176c33807b54a8322932359ae3a96e
BLAKE2b-256 bc594fefe47f2a1dfc66493705fa5b0326513810551e86e679380dbadea0adfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7b2237497fd2e12961ebbe870494e39e514348b9284de8bfdf65997c380c0bfe
MD5 9de985ae2f8961ebdc92986d5b35528f
BLAKE2b-256 82214b105925a78b6a3194172133bcc6241f6d7b37f91bf9f4717399f0fc129f

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ed2229c65845604981efb9f736fcf05e657b53d96e91d03b0c6ec05026529920
MD5 88bf83e71f9e505ecd8e7bdf98054dde
BLAKE2b-256 f4de53e9115afc0a09f7b928ffbb3afc8b629cef56a1390c676d7a9546e6a3e0

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9942a4885ae4b0a8043648c3aaeea7cdc415f5c5454696ad81008a1c6b620d71
MD5 0890a065fb236bd1c52fd57498a58821
BLAKE2b-256 c23e1681f66518ac4f5db6cd1d56739375a0c36b7960c350bb7494b0d2d147a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 95cddc5f7f1825267ec01fe6d9ad747160f198809cc0cc89539b7fffa0478831
MD5 94f7ca4974b922d088d7f99477edc895
BLAKE2b-256 305c1e6cf8e4174d3b1a09d5ac914bf5d69213a421721b5b843d612e83271139

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f4330a1623c2dd6a063d6a1cf065c99a8c07a442e0279b0b7d0843fecb3106a5
MD5 cc6b3978cdcc15060858fc24b2d33ad5
BLAKE2b-256 49331b698dac270cbeafac685cdd9e512e35d94181d0f0444cfa9219b76f7682

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 934ec416bb05a50a4460b5510e37431866f2af7d129e1c3fdb68c9a451fb4d23
MD5 67fa81c3d8dd80c59382c53948ee54c8
BLAKE2b-256 1f39010e8cb8e5f418084a4da05c98d40f7ef7bd45a31b38511fbb5fa2ef0921

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 56bdfed8b1da8d8a86830f1804aa75c70c9f177a98e183476d27308352e6da6a
MD5 c9599cce45c4189101097815fd3e8e6c
BLAKE2b-256 639b64e1dd30fa21ce1e2140ad9ae3a9c2a89524f02a861e6d0ea25a5eed789b

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 762eb394ce874bada21e2591ed3617a3c4f337e191b8fde7f57fa686e1393df0
MD5 9711f9f520421f789e355378342d1e72
BLAKE2b-256 3e1443a21e17bdf6b22106012af840525711c0ad70f12e1cf812de71933b427e

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bf08b08c24a41fad886d938703d28468037c3cb8aee30c301bcb54d1f0890b5c
MD5 60a346e1883783fa3bc59e1b8d072788
BLAKE2b-256 7bd21ea6cf0793b7e0680316c40a136e1d640f6787377b2798fe19e4aef76106

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0205565eb3956425d269aa0b7939fa44325ed8627807bce5fba0d84b930d4a0a
MD5 a61928ce62ee6cd236f6735678e9ad5a
BLAKE2b-256 f9572d649414cd0120264d4ae1a04e6d4dead01d4396af7c7e602db4460870e6

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1bf4e34a487e690c73055958dff4e0e396f61db5c6ffd6c543e891376157c943
MD5 4ce46a482989a2569e8c3a7f89aa0a36
BLAKE2b-256 ac91bc92cd3b5f9602b757a46ec88a425fc652cbdb3851bd84ab58d452f7d6c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7109baf8b288e6e6ebd111988b96b92d9d0e1d95677ae30da8b9b604b9e11ac4
MD5 e1f410543b91e034a28514d3ce067774
BLAKE2b-256 4f6988fbb8c8548056e90254c86d763698ae9edbe142e656200cbb46dd095171

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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.7-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coordinationz-0.0.7-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 052854a813f581bc516b091650336b09f3c66e510c05de7dcd6034bfffb59bdc
MD5 800d98b384a17be592b1dbe76b707ec2
BLAKE2b-256 4108c1c659d5f3abe396b100081b24dcbe30febe0b10ae001e6ad2328a453157

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinationz-0.0.7-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