{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Test area for DISARM code" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "dict_keys(['df_phases', 'df_frameworks', 'df_techniques', 'df_tasks', 'df_incidents', 'df_externalgroups', 'df_tools', 'df_examples', 'df_counters', 'df_detections', 'df_actortypes', 'df_resources', 'df_responsetypes', 'df_metatechniques', 'it', 'df_tactics', 'df_playbooks', 'df_techniques_per_tactic', 'df_counters_per_tactic', 'phases', 'tactics', 'techniques', 'counters', 'metatechniques', 'actortypes', 'resources', 'num_tactics', 'cross_counterid_techniqueid', 'cross_counterid_resourceid', 'cross_counterid_actortypeid', 'cross_detectionid_techniqueid', 'cross_detectionid_resourceid', 'cross_detectionid_actortypeid'])\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
disarm_idtechnique_id
0C00006T0007
0C00006T0015
0C00006T0018
0C00006T0043
0C00006T0053
.........
135C00219T0025
136C00220
137C00221
138C00222
139C00223
\n", "

909 rows × 2 columns

\n", "
" ], "text/plain": [ " disarm_id technique_id\n", "0 C00006 T0007\n", "0 C00006 T0015\n", "0 C00006 T0018\n", "0 C00006 T0043\n", "0 C00006 T0053\n", ".. ... ...\n", "135 C00219 T0025\n", "136 C00220 \n", "137 C00221 \n", "138 C00222 \n", "139 C00223 \n", "\n", "[909 rows x 2 columns]" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "import sqlite3 as sql\n", "from generate_DISARM_pages import Disarm\n", "\n", "\n", "# Generate DISARM datasets\n", "disarm = Disarm()\n", "\n", "# Check which disarm variables we can see from here\n", "print('{}'.format(vars(disarm).keys()))\n", "vars(disarm)['cross_counterid_techniqueid']" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "scrolled": true }, "outputs": [ { "ename": "AttributeError", "evalue": "'Disarm' object has no attribute 'cross_counterid_actorid'", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mdisarm\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcross_counterid_actorid\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mAttributeError\u001b[0m: 'Disarm' object has no attribute 'cross_counterid_actorid'" ] } ], "source": [ "disarm.cross_counterid_actorid" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
disarm_idtechnique_idWeight
0C00006T00071
0C00006T00151
0C00006T00181
0C00006T00431
0C00006T00531
............
134C00216T00181
134C00216T00571
135C00219T00241
135C00219T00261
135C00219T00251
\n", "

881 rows × 3 columns

\n", "
" ], "text/plain": [ " disarm_id technique_id Weight\n", "0 C00006 T0007 1\n", "0 C00006 T0015 1\n", "0 C00006 T0018 1\n", "0 C00006 T0043 1\n", "0 C00006 T0053 1\n", ".. ... ... ...\n", "134 C00216 T0018 1\n", "134 C00216 T0057 1\n", "135 C00219 T0024 1\n", "135 C00219 T0026 1\n", "135 C00219 T0025 1\n", "\n", "[881 rows x 3 columns]" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ct = disarm.cross_counterid_techniqueid\n", "ct['Weight'] = 1\n", "ct = ct[ct['technique_id'].str.len() > 0]\n", "ct.to_csv('../visualisations/cross_counterid_techniqueid.csv', index=False, header=['Source','Target', 'Weight'])\n", "ct" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "dict_keys(['df_phases', 'df_frameworks', 'df_techniques', 'df_tasks', 'df_incidents', 'df_externalgroups', 'df_tools', 'df_examples', 'df_counters', 'df_detections', 'df_actortypes', 'df_resources', 'df_responsetypes', 'df_metatechniques', 'it', 'df_tactics', 'df_playbooks', 'df_techniques_per_tactic', 'df_counters_per_tactic', 'phases', 'tactics', 'techniques', 'counters', 'metatechniques', 'actortypes', 'resources', 'num_tactics', 'cross_counterid_techniqueid', 'cross_counterid_resourceid', 'cross_counterid_actortypeid', 'cross_detectionid_techniqueid', 'cross_detectionid_resourceid', 'cross_detectionid_actortypeid'])\n", "\n", "it columns: Index(['disarm_id', 'name', 'summary', 'disarm_id_incident', 'name_incident',\n", " 'disarm_id_technique', 'name_technique'],\n", " dtype='object')\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
disarm_idnamesummarydisarm_id_incidentname_incidentdisarm_id_techniquename_technique
0IT00000001buy FB targeted adsI00002#VaccinateUST0018Purchase advertisements
1IT00000010Targeted FB paid adsI00005Brexit voteT0018Purchase advertisements
2IT00000057Targeted FB paid adsI00017US presidential electionsT0018Purchase advertisements
3IT00000002Promote \"funding\" campaignI00002#VaccinateUST0017Conduct Fundraising Campaigns
4IT00000003create web-site - information pollutionI00002#VaccinateUST0019Generate information pollution
........................
181IT00000127Promote fake “experts” with impressive (and sc...I00044JadeHelm exerciseT0009Create fake experts
182IT00000130(Distort) Kremlin-controlled RT cited Russian ...I00047Sea of AzovT0023Distort facts
183IT00000163Distorted, saccharine “news” about the Chinese...I00053China Huawei CFO ArrestT0023Distort facts
184IT00000174Memes... anti-Isreal/USA/West, conspiracy narr...I00056Iran Influence OperationsT0022Conspiracy narratives
185IT00000175Fake news/synthetic web-sitesI00056Iran Influence OperationsT0008Create fake or imposter news sites
\n", "

186 rows × 7 columns

\n", "
" ], "text/plain": [ " disarm_id name summary \\\n", "0 IT00000001 buy FB targeted ads \n", "1 IT00000010 Targeted FB paid ads \n", "2 IT00000057 Targeted FB paid ads \n", "3 IT00000002 Promote \"funding\" campaign \n", "4 IT00000003 create web-site - information pollution \n", ".. ... ... ... \n", "181 IT00000127 Promote fake “experts” with impressive (and sc... \n", "182 IT00000130 (Distort) Kremlin-controlled RT cited Russian ... \n", "183 IT00000163 Distorted, saccharine “news” about the Chinese... \n", "184 IT00000174 Memes... anti-Isreal/USA/West, conspiracy narr... \n", "185 IT00000175 Fake news/synthetic web-sites \n", "\n", " disarm_id_incident name_incident disarm_id_technique \\\n", "0 I00002 #VaccinateUS T0018 \n", "1 I00005 Brexit vote T0018 \n", "2 I00017 US presidential elections T0018 \n", "3 I00002 #VaccinateUS T0017 \n", "4 I00002 #VaccinateUS T0019 \n", ".. ... ... ... \n", "181 I00044 JadeHelm exercise T0009 \n", "182 I00047 Sea of Azov T0023 \n", "183 I00053 China Huawei CFO Arrest T0023 \n", "184 I00056 Iran Influence Operations T0022 \n", "185 I00056 Iran Influence Operations T0008 \n", "\n", " name_technique \n", "0 Purchase advertisements \n", "1 Purchase advertisements \n", "2 Purchase advertisements \n", "3 Conduct Fundraising Campaigns \n", "4 Generate information pollution \n", ".. ... \n", "181 Create fake experts \n", "182 Distort facts \n", "183 Distort facts \n", "184 Conspiracy narratives \n", "185 Create fake or imposter news sites \n", "\n", "[186 rows x 7 columns]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Check which disarm variables we can see from here\n", "print('{}\\n'.format(vars(disarm).keys()))\n", "testdfname = 'it'\n", "testdf = vars(disarm)[testdfname]\n", "print('{} columns: {}'.format(testdfname, testdf.columns))\n", "testdf" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
disarm_idnamesummaryincident_idtechnique_id
0IT00000001buy FB targeted adsI00002T0018
1IT00000010Targeted FB paid adsI00005T0018
2IT00000057Targeted FB paid adsI00017T0018
3IT00000002Promote \"funding\" campaignI00002T0017
4IT00000003create web-site - information pollutionI00002T0019
..................
181IT00000127Promote fake “experts” with impressive (and sc...I00044T0009
182IT00000130(Distort) Kremlin-controlled RT cited Russian ...I00047T0023
183IT00000163Distorted, saccharine “news” about the Chinese...I00053T0023
184IT00000174Memes... anti-Isreal/USA/West, conspiracy narr...I00056T0022
185IT00000175Fake news/synthetic web-sitesI00056T0008
\n", "

186 rows × 5 columns

\n", "
" ], "text/plain": [ " disarm_id name summary \\\n", "0 IT00000001 buy FB targeted ads \n", "1 IT00000010 Targeted FB paid ads \n", "2 IT00000057 Targeted FB paid ads \n", "3 IT00000002 Promote \"funding\" campaign \n", "4 IT00000003 create web-site - information pollution \n", ".. ... ... ... \n", "181 IT00000127 Promote fake “experts” with impressive (and sc... \n", "182 IT00000130 (Distort) Kremlin-controlled RT cited Russian ... \n", "183 IT00000163 Distorted, saccharine “news” about the Chinese... \n", "184 IT00000174 Memes... anti-Isreal/USA/West, conspiracy narr... \n", "185 IT00000175 Fake news/synthetic web-sites \n", "\n", " incident_id technique_id \n", "0 I00002 T0018 \n", "1 I00005 T0018 \n", "2 I00017 T0018 \n", "3 I00002 T0017 \n", "4 I00002 T0019 \n", ".. ... ... \n", "181 I00044 T0009 \n", "182 I00047 T0023 \n", "183 I00053 T0023 \n", "184 I00056 T0022 \n", "185 I00056 T0008 \n", "\n", "[186 rows x 5 columns]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "it = vars(disarm)['it'][['disarm_id', 'name', 'summary', 'disarm_id_incident', 'disarm_id_technique']].copy()\n", "it.rename(columns={'disarm_id_incident':'incident_id', \n", " 'disarm_id_technique': 'technique_id'}, inplace=True)\n", "it" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "incident 44\n", "campaign 16\n", "apt 2\n", "tactic 1\n", "Name: objecttype, dtype: int64" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dii = vars(disarm)['df_incidents']\n", "dii['objecttype'].value_counts()" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
disarm_idnameobjecttypesummaryyear_startedattributions_seenfound_in_countryurlsnoteswhen_addedfound_vialongname
30I00031antivaxapt2018RussiaWorldhttps://ajph.aphapublications.org/doi/pdf/10.2...2019-02-24OIII00031 - antivax
32I00033China 50cent Armyapt50cent Army is a CCP “tool” - “massive secret ...2014ChinaChinahttps://gking.harvard.edu/files/gking/files/ho...campaign (multiple incidents, e.g. Shanshan ri...2019-02-24OIII00033 - China 50cent Army
\n", "
" ], "text/plain": [ " disarm_id name objecttype \\\n", "30 I00031 antivax apt \n", "32 I00033 China 50cent Army apt \n", "\n", " summary year_started \\\n", "30 2018 \n", "32 50cent Army is a CCP “tool” - “massive secret ... 2014 \n", "\n", " attributions_seen found_in_country \\\n", "30 Russia World \n", "32 China China \n", "\n", " urls \\\n", "30 https://ajph.aphapublications.org/doi/pdf/10.2... \n", "32 https://gking.harvard.edu/files/gking/files/ho... \n", "\n", " notes when_added found_via \\\n", "30 2019-02-24 OII \n", "32 campaign (multiple incidents, e.g. Shanshan ri... 2019-02-24 OII \n", "\n", " longname \n", "30 I00031 - antivax \n", "32 I00033 - China 50cent Army " ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dii[dii['objecttype'] == 'apt']" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
disarm_idnamename_DEtactic_idsummarysummary_DElongname
0T00015Ds (dismiss, distort, distract, dismay, divide)TA01Nimmo's \"4Ds of propaganda\": dismiss, distort,...T0001 - 5Ds (dismiss, distort, distract, disma...
1T0002Facilitate State PropagandaTA01Organize citizens around pro-state messaging. ...T0002 - Facilitate State Propaganda
2T0003Leverage Existing NarrativesTA01Use or adapt existing narrative themes, where ...T0003 - Leverage Existing Narratives
3T0004Devise Competing NarrativesTA01Advance competing narratives connected to same...T0004 - Devise Competing Narratives
4T0006Develop Narrative ConceptsTA02The promotion of beneficial master narratives ...T0006 - Develop Narrative Concepts
........................
66T0068Respond to breaking news eventTA02Media attention on a story or event is heighte...T0068 - Respond to breaking news event
67T0069Respond to active crisisTA02Panic, rumors, and speculation are heightened ...T0069 - Respond to active crisis
68T0070Analyze existing communitiesTA02Assess influence operation potential of existi...T0070 - Analyze existing communities
69T0071Find echo chambersTA13Find or plan to create areas (social media gro...T0071 - Find echo chambers
70T0072Segment audiencesTA13Create audience segmentations by features of i...T0072 - Segment audiences
\n", "

71 rows × 7 columns

\n", "
" ], "text/plain": [ " disarm_id name name_DE \\\n", "0 T0001 5Ds (dismiss, distort, distract, dismay, divide) \n", "1 T0002 Facilitate State Propaganda \n", "2 T0003 Leverage Existing Narratives \n", "3 T0004 Devise Competing Narratives \n", "4 T0006 Develop Narrative Concepts \n", ".. ... ... ... \n", "66 T0068 Respond to breaking news event \n", "67 T0069 Respond to active crisis \n", "68 T0070 Analyze existing communities \n", "69 T0071 Find echo chambers \n", "70 T0072 Segment audiences \n", "\n", " tactic_id summary summary_DE \\\n", "0 TA01 Nimmo's \"4Ds of propaganda\": dismiss, distort,... \n", "1 TA01 Organize citizens around pro-state messaging. ... \n", "2 TA01 Use or adapt existing narrative themes, where ... \n", "3 TA01 Advance competing narratives connected to same... \n", "4 TA02 The promotion of beneficial master narratives ... \n", ".. ... ... ... \n", "66 TA02 Media attention on a story or event is heighte... \n", "67 TA02 Panic, rumors, and speculation are heightened ... \n", "68 TA02 Assess influence operation potential of existi... \n", "69 TA13 Find or plan to create areas (social media gro... \n", "70 TA13 Create audience segmentations by features of i... \n", "\n", " longname \n", "0 T0001 - 5Ds (dismiss, distort, distract, disma... \n", "1 T0002 - Facilitate State Propaganda \n", "2 T0003 - Leverage Existing Narratives \n", "3 T0004 - Devise Competing Narratives \n", "4 T0006 - Develop Narrative Concepts \n", ".. ... \n", "66 T0068 - Respond to breaking news event \n", "67 T0069 - Respond to active crisis \n", "68 T0070 - Analyze existing communities \n", "69 T0071 - Find echo chambers \n", "70 T0072 - Segment audiences \n", "\n", "[71 rows x 7 columns]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dii = vars(disarm)['df_techniques']\n", "dii" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[['TA01',\n", " 'TA02',\n", " 'TA03',\n", " 'TA04',\n", " 'TA05',\n", " 'TA06',\n", " 'TA07',\n", " 'TA08',\n", " 'TA09',\n", " 'TA10',\n", " 'TA11',\n", " 'TA12',\n", " 'TA13'],\n", " ['T0001',\n", " 'T0006',\n", " 'T0007',\n", " 'T0010',\n", " 'T0016',\n", " 'T0019',\n", " 'T0029',\n", " 'T0039',\n", " 'T0047',\n", " 'T0057',\n", " 'T0058',\n", " 'T0062',\n", " 'T0071'],\n", " ['T0002',\n", " 'T0066',\n", " 'T0008',\n", " 'T0011',\n", " 'T0017',\n", " 'T0020',\n", " 'T0030',\n", " 'T0040',\n", " 'T0048',\n", " 'T0061',\n", " 'T0059',\n", " 'T0063',\n", " 'T0072'],\n", " ['T0003',\n", " 'T0067',\n", " 'T0009',\n", " 'T0012',\n", " 'T0018',\n", " 'T0021',\n", " 'T0031',\n", " 'T0041',\n", " 'T0049',\n", " '',\n", " 'T0060',\n", " 'T0064',\n", " ''],\n", " ['T0004',\n", " 'T0068',\n", " '',\n", " 'T0013',\n", " '',\n", " 'T0022',\n", " 'T0032',\n", " 'T0042',\n", " 'T0050',\n", " '',\n", " '',\n", " '',\n", " ''],\n", " ['',\n", " 'T0069',\n", " '',\n", " 'T0014',\n", " '',\n", " 'T0023',\n", " 'T0033',\n", " 'T0043',\n", " 'T0051',\n", " '',\n", " '',\n", " '',\n", " ''],\n", " ['',\n", " 'T0070',\n", " '',\n", " 'T0015',\n", " '',\n", " 'T0024',\n", " 'T0034',\n", " 'T0044',\n", " 'T0052',\n", " '',\n", " '',\n", " '',\n", " ''],\n", " ['', '', '', 'T0065', '', 'T0025', 'T0035', 'T0045', 'T0053', '', '', '', ''],\n", " ['', '', '', '', '', 'T0026', 'T0036', 'T0046', 'T0054', '', '', '', ''],\n", " ['', '', '', '', '', 'T0027', 'T0037', '', 'T0055', '', '', '', ''],\n", " ['', '', '', '', '', 'T0028', 'T0038', '', 'T0056', '', '', '', '']]" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Generate arrays used to create D3 grids\n", "dflists = dii.groupby('tactic_id')['disarm_id'].apply(list).reset_index()\n", "dfidgrid = pd.DataFrame(dflists['disarm_id'].to_list())\n", "dfgrid = pd.concat([dflists[['tactic_id']], dfidgrid], axis=1).fillna('')\n", "gridarray = [dfgrid[col].to_list() for col in dfgrid.columns]\n", "gridarray" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'IT00000001': 'buy FB targeted ads',\n", " 'IT00000010': 'Targeted FB paid ads',\n", " 'IT00000057': 'Targeted FB paid ads',\n", " 'IT00000002': 'Promote \"funding\" campaign',\n", " 'IT00000003': 'create web-site - information pollution',\n", " 'IT00000014': 'RT & Sputnik generate information pollution',\n", " 'IT00000031': 'RT & Sputnik generate information pollution (report an unreported false story/event)',\n", " 'IT00000037': 'RT & Sputnik generate information pollution ',\n", " 'IT00000061': 'RT & Sputnik generate information pollution',\n", " 'IT00000082': 'RT & Sputnik generate information pollution (synthetic media)',\n", " 'IT00000094': 'RT & Sputnik generate information pollution',\n", " 'IT00000120': 'RT & Sputnik generate information pollution',\n", " 'IT00000137': 'RT & Sputnik generate information pollution (synthetic media)',\n", " 'IT00000146': 'RT & Sputnik generate information pollution (synthetic media)',\n", " 'IT00000156': 'RT & Sputnik generate information pollution',\n", " 'IT00000180': 'RT & Sputnik generate information pollution (synthetic media)',\n", " 'IT00000004': 'create web-site - information pollution',\n", " 'IT00000015': 'RT & Sputnik generate information pollution',\n", " 'IT00000032': 'RT & Sputnik generate information pollution (report an unreported false story/event)',\n", " 'IT00000038': 'RT & Sputnik generate information pollution ',\n", " 'IT00000062': 'RT & Sputnik generate information pollution',\n", " 'IT00000083': 'RT & Sputnik generate information pollution (synthetic media)',\n", " 'IT00000095': 'RT & Sputnik generate information pollution',\n", " 'IT00000121': 'RT & Sputnik generate information pollution',\n", " 'IT00000138': 'RT & Sputnik generate information pollution (synthetic media)',\n", " 'IT00000147': 'RT & Sputnik generate information pollution (synthetic media)',\n", " 'IT00000157': 'RT & Sputnik generate information pollution',\n", " 'IT00000162': 'State-run media seeds foreign influence environment',\n", " 'IT00000181': 'RT & Sputnik generate information pollution (synthetic media)',\n", " 'IT00000005': 'SEO optimisation/manipulation (\"key words\")',\n", " 'IT00000022': 'SEO optimisation/manipulation (\"key words\")',\n", " 'IT00000043': 'SEO optimisation/manipulation (\"key words\")',\n", " 'IT00000071': 'SEO optimisation/manipulation (\"key words\")',\n", " 'IT00000085': 'SEO optimisation/manipulation (\"key words\")',\n", " 'IT00000103': 'SEO optimisation/manipulation (\"key words\")',\n", " 'IT00000125': 'SEO optimisation/manipulation (\"key words\")',\n", " 'IT00000140': 'SEO optimisation/manipulation (\"key words\")',\n", " 'IT00000149': 'SEO optimisation/manipulation (\"key words\")',\n", " 'IT00000161': 'SEO optimisation/manipulation (\"key words\")',\n", " 'IT00000172': 'SEO optimisation/manipulation (\"key words\")',\n", " 'IT00000183': 'SEO optimisation/manipulation (\"key words\")',\n", " 'IT00000006': 'legacy web content',\n", " 'IT00000007': 'hard to remove content and/or campaign/exploit TOS',\n", " 'IT00000176': 'legacy web content',\n", " 'IT00000008': 'Twitter bots amplify & manipulate',\n", " 'IT00000034': 'Twitter bots amplify & manipulate',\n", " 'IT00000041': 'Twitter bots amplify & manipulate',\n", " 'IT00000055': 'Twitter bots amplify & manipulate',\n", " 'IT00000076': 'Twitter bots amplify & manipulate',\n", " 'IT00000079': 'Twitter bots amplify & manipulate',\n", " 'IT00000090': 'Twitter bots amplify & manipulate',\n", " 'IT00000115': 'Twitter bots amplify & manipulate',\n", " 'IT00000118': 'Twitter bots amplify & manipulate',\n", " 'IT00000131': 'Twitter bots amplify & manipulate',\n", " 'IT00000134': 'Twitter bots amplify & manipulate',\n", " 'IT00000144': 'Twitter bots amplify & manipulate',\n", " 'IT00000154': 'Twitter bots amplify & manipulate',\n", " 'IT00000169': 'Twitter bots amplify & manipulate',\n", " 'IT00000177': 'Twitter bots amplify & manipulate',\n", " 'IT00000009': 'Twitter trolls amplify & manipulate',\n", " 'IT00000035': 'Twitter trolls amplify & manipulate',\n", " 'IT00000042': 'Twitter trolls amplify & manipulate',\n", " 'IT00000056': 'Twitter trolls amplify & manipulate',\n", " 'IT00000077': 'Twitter trolls amplify & manipulate',\n", " 'IT00000080': 'Twitter trolls amplify & manipulate',\n", " 'IT00000091': 'Twitter trolls amplify & manipulate',\n", " 'IT00000119': 'Twitter trolls amplify & manipulate',\n", " 'IT00000132': 'Twitter trolls amplify & manipulate',\n", " 'IT00000135': 'Twitter trolls amplify & manipulate',\n", " 'IT00000145': 'Twitter trolls amplify & manipulate',\n", " 'IT00000155': 'Twitter trolls amplify & manipulate',\n", " 'IT00000170': 'Twitter trolls amplify & manipulate',\n", " 'IT00000178': 'Twitter trolls amplify & manipulate',\n", " 'IT00000011': 'Fake FB groups + dark content',\n", " 'IT00000029': 'Fake twitter profiles to amplify',\n", " 'IT00000039': 'FB pages',\n", " 'IT00000045': 'FB pages/groups/profiles',\n", " 'IT00000058': 'Fake FB groups + dark content',\n", " 'IT00000078': 'Fake FB groups/pages/profiles + dark content',\n", " 'IT00000092': 'Fake FB groups/pages/profiles ',\n", " 'IT00000171': 'Fake FB groups/pages/profiles + dark content (non-paid advertising)',\n", " 'IT00000012': 'Digital to physical \"organize+promote\" rallies & events?',\n", " 'IT00000059': 'Digital to physical \"organize+promote\" rallies & events',\n", " 'IT00000093': 'Digital to physical \"organize+promote\" rallies & events?',\n", " 'IT00000164': 'Events coordinated and promoted across media platforms',\n", " 'IT00000166': 'Extend digital the physical space… gatherings ie: support for Meng outside courthouse',\n", " 'IT00000013': 'manipulate social media \"online polls\"? ',\n", " 'IT00000060': 'manipulate social media \"online polls\"? ',\n", " 'IT00000016': 'cultivate, manipulate, exploit useful idiots',\n", " 'IT00000033': 'cultivate, manipulate, exploit useful idiots (in the case Paul Manafort)',\n", " 'IT00000044': 'cultivate, manipulate, exploit useful idiots (Alex Jones... drives conspiracy theories; false flags, crisis actors)',\n", " 'IT00000063': 'cultivate, manipulate, exploit useful idiots',\n", " 'IT00000084': 'cultivate, manipulate, exploit useful idiots',\n", " 'IT00000104': 'cultivate, manipulate, exploit useful idiots (Alex Jones... drives conspiracy theories)',\n", " 'IT00000126': 'cultivate, manipulate, exploit useful idiots (Alex Jones... drives conspiracy theories)',\n", " 'IT00000139': 'cultivate, manipulate, exploit useful idiots (Roger Waters; Venessa Beeley...)',\n", " 'IT00000148': 'cultivate, manipulate, exploit useful idiots (Roger Waters)',\n", " 'IT00000158': 'cultivate, manipulate, exploit useful idiots',\n", " 'IT00000182': 'cultivate, manipulate, exploit useful idiots ',\n", " 'IT00000017': 'YouTube; Reddit; LinkedIn; Pinterest; WhatsApp?',\n", " 'IT00000046': 'YouTube; Reddit',\n", " 'IT00000064': 'YouTube; Reddit; (Instagram, LinkedIn; Pinterest; WhatsApp?)',\n", " 'IT00000087': 'YouTube; Reddit; ',\n", " 'IT00000096': 'YouTube; Reddit; (Instagram, LinkedIn; Pinterest; WhatsApp?)',\n", " 'IT00000122': 'YouTube; Reddit',\n", " 'IT00000142': 'YouTube; Reddit; ',\n", " 'IT00000151': 'YouTube; Reddit; ',\n", " 'IT00000159': 'YouTube; Reddit',\n", " 'IT00000185': 'YouTube; Reddit; ',\n", " 'IT00000018': 'YouTube; Reddit; LinkedIn; Pinterest; WhatsApp?',\n", " 'IT00000047': 'YouTube; Reddit',\n", " 'IT00000065': 'YouTube; Reddit; (Instagram, LinkedIn; Pinterest; WhatsApp?)',\n", " 'IT00000088': 'YouTube; Reddit; ',\n", " 'IT00000097': 'YouTube; Reddit; (Instagram, LinkedIn; Pinterest; WhatsApp?)',\n", " 'IT00000123': 'YouTube; Reddit',\n", " 'IT00000143': 'YouTube; Reddit; ',\n", " 'IT00000152': 'YouTube; Reddit; ',\n", " 'IT00000160': 'YouTube; Reddit',\n", " 'IT00000186': 'YouTube; Reddit; ',\n", " 'IT00000019': 'YouTube; Reddit; LinkedIn; Pinterest; WhatsApp?',\n", " 'IT00000067': 'YouTube; Reddit; (Instagram, LinkedIn; Pinterest; WhatsApp?)',\n", " 'IT00000099': 'YouTube; Reddit; (Instagram, LinkedIn; Pinterest; WhatsApp?)',\n", " 'IT00000020': 'YouTube; Reddit; LinkedIn; Pinterest; WhatsApp?',\n", " 'IT00000068': 'YouTube; Reddit; (Instagram, LinkedIn; Pinterest; WhatsApp?)',\n", " 'IT00000100': 'YouTube; Reddit; (Instagram, LinkedIn; Pinterest; WhatsApp?)',\n", " 'IT00000021': 'YouTube; Reddit; LinkedIn; Pinterest; WhatsApp?',\n", " 'IT00000069': 'YouTube; Reddit; (Instagram, LinkedIn; Pinterest; WhatsApp?)',\n", " 'IT00000101': 'YouTube; Reddit; (Instagram, LinkedIn; Pinterest; WhatsApp?)',\n", " 'IT00000023': 'Memes... anti-immigration; euroskepticism; fear, outrage, conspiracy narratives',\n", " 'IT00000072': 'Memes... anti-immigration; euroskepticism; fear, outrage, conspiracy narratives',\n", " 'IT00000117': 'memes',\n", " 'IT00000173': 'Memes... anti-Isreal/USA/West, conspiracy narratives',\n", " 'IT00000024': 'Backstop personas',\n", " 'IT00000074': 'Backstop personas',\n", " 'IT00000025': 'Use SMS/text messages',\n", " 'IT00000026': 'Fake video/images',\n", " 'IT00000116': 'photoshopped/fake images',\n", " 'IT00000027': 'Create and use hashtag',\n", " 'IT00000028': 'Create and use hashtag',\n", " 'IT00000030': 'bait journalists/media/politicians',\n", " 'IT00000049': 'journalist/media baiting',\n", " 'IT00000053': 'journalist/media baiting',\n", " 'IT00000036': 'Using \"expert\"',\n", " 'IT00000040': 'News circulated/amplifed by tertiary sites (Russia Insider, The Duran, Geopolitica.ru, Mint Press News, Oriental Review, globalresearch.ca)',\n", " 'IT00000086': 'News circulated/amplifed by tertiary sites (Russia Insider, The Duran, Geopolitica.ru, Mint Press News, Oriental Review, globalresearch.ca)',\n", " 'IT00000141': 'News circulated/amplifed by tertiary sites (Russia Insider, The Duran, Geopolitica.ru, Mint Press News, Oriental Review, globalresearch.ca)',\n", " 'IT00000150': 'News circulated/amplifed by tertiary sites (Mint Press News, globalresearch.ca)',\n", " 'IT00000184': 'News circulated/amplifed by tertiary sites (Russia Insider, The Duran, Geopolitica.ru, Mint Press News, Oriental Review, globalresearch.ca)',\n", " 'IT00000048': '4Chan/8Chan - trial content',\n", " 'IT00000070': '4Chan/8Chan - trial content',\n", " 'IT00000102': '4Chan/8Chan - trial content',\n", " 'IT00000124': '4Chan/8Chan - trial content',\n", " 'IT00000050': \"Forge ('release' altered hacked documents)\",\n", " 'IT00000051': 'hack/leak/manipulate/distort',\n", " 'IT00000054': 'hack/leak/manipulate/distort',\n", " 'IT00000075': 'hack/leak/manipulate/distort',\n", " 'IT00000153': 'hack/leak/manipulate/distort',\n", " 'IT00000052': 'Circulate to media via DM, then release publicly',\n", " 'IT00000066': 'YouTube; Reddit; (Instagram, LinkedIn; Pinterest; WhatsApp?)',\n", " 'IT00000098': 'YouTube; Reddit; (Instagram, LinkedIn; Pinterest; WhatsApp?)',\n", " 'IT00000073': 'Click-bait (economic actors) fake news sites (ie: Denver Guardian; Macedonian teens)',\n", " 'IT00000081': \"4 D's (dismiss, distort, distract, dismay...Official channels ie: Embassies & Defence Ministry; TASS\",\n", " 'IT00000128': \"4 D's (dismiss, distort, distract, dismay...Official channels ie: Embassies & Defence Ministry; TASS\",\n", " 'IT00000129': 'Russian FSB security service blamed Ukraine for sparking the clashes, saying their \"irrefutable\" evidence would \"soon be made public',\n", " 'IT00000136': \"4 D's (dismiss, distort, distract, dismay...Official channels ie: Embassies & Defence Ministry; TASS\",\n", " 'IT00000167': 'China also plays victim, innocence, plays by rules, misunderstood narrative',\n", " 'IT00000168': 'Chinese ambassador Lu Shaye accused Canada of applying a double standard, and has decried what he sees as “Western egotism and white supremacy” in the treatment of detained Huawei executive Meng Wanzhou.” ',\n", " 'IT00000179': \"4 D's (dismiss, distort, distract, dismay...Official channels ie: Putin himself; Embassies & Sports Ministry; TASS\",\n", " 'IT00000089': 'Demand insurmountable proof',\n", " 'IT00000133': 'Demand insurmountable proof',\n", " 'IT00000105': '2,000,000 people (est.) part of state run/sponsored astroturfing',\n", " 'IT00000112': 'flood the Facebook pages of Taiwanese politicians and news agencies with a pro-PRC message',\n", " 'IT00000113': 'Democratic Progressive Party (DPP), attracted nearly 40,000 Facebook comments in just eight hours.',\n", " 'IT00000106': 'fabricated social media comment',\n", " 'IT00000107': 'domestic social media influence operations focus primarily on “cheerleading” or presenting or furthering a positive narrative about the Chinese state',\n", " 'IT00000165': 'Extend digital the physical space… gatherings ie: support for Meng outside courthouse',\n", " 'IT00000108': 'cow online opinion leaders into submission, muzzling social media as a political force',\n", " 'IT00000109': 'cow online opinion leaders into submission, muzzling social media as a political force',\n", " 'IT00000110': 'facilitate state propaganda and defuse crises',\n", " 'IT00000111': 'Netizens from one of the largest discussion forums in China, known as Diba, coordinated to overcome China’s Great Firewall',\n", " 'IT00000114': '“hack” of Qatar’s official news agency',\n", " 'IT00000127': 'Promote fake “experts” with impressive (and scary) titles',\n", " 'IT00000130': '(Distort) Kremlin-controlled RT cited Russian Minister of Foreign Affairs Sergei Lavrov suggesting that Ukraine deliberately provoked Russia in hopes of gaining additional support from the United States and Europe.',\n", " 'IT00000163': 'Distorted, saccharine “news” about the Chinese State and Party',\n", " 'IT00000174': 'Memes... anti-Isreal/USA/West, conspiracy narratives',\n", " 'IT00000175': 'Fake news/synthetic web-sites'}" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "it.index = it.disarm_id\n", "it[['name']].transpose().to_dict('records')[0]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.3" } }, "nbformat": 4, "nbformat_minor": 4 }