mirror of
https://github.com/DISARMFoundation/DISARMframeworks.git
synced 2025-03-28 17:38:03 -04:00
added code to check for name and summary changes across versions
This commit is contained in:
parent
9f847e4d99
commit
a483bf4c80
CODE
@ -1198,30 +1198,35 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": 25,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"dict_keys(['ADMIN_README', 'ADMIN CODES', 'phases', 'tactics', 'techniques', 'countermeasures', 'frameworks', 'tasks', 'detections', 'playbooks', 'responsetypes', 'metatechniques', 'actortypes', 'actortype_framework', 'actortype_sector', 'sectors', 'resources', 'MOE', 'MOP'])"
|
||||
]
|
||||
},
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Current keys: dict_keys(['FRAMEWORK_ADMIN_README', 'FRAMEWORK_ADMIN CODES', 'phases', 'tactics', 'techniques', 'subtechniques', 'frameworks', 'tasks', 'detections', 'countermeasures', 'playbooks', 'responsetypes', 'metatechniques', 'actortypes', 'sectors', 'resources', 'MOE', 'MOP'])\n",
|
||||
"Old keys: dict_keys(['ADMIN_README', 'ADMIN CODES', 'phases', 'tactics', 'techniques', 'countermeasures', 'frameworks', 'tasks', 'detections', 'playbooks', 'responsetypes', 'metatechniques', 'actortypes', 'actortype_framework', 'actortype_sector', 'sectors', 'resources', 'MOE', 'MOP'])\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"MASTERDATA_DIR = '../DISARM_MASTER_DATA/'\n",
|
||||
"frameworkfile = MASTERDATA_DIR + 'DISARM_FRAMEWORKS_MASTER.xlsx'\n",
|
||||
" \n",
|
||||
"metadata = {}\n",
|
||||
"xlsx = pd.ExcelFile(frameworkfile)\n",
|
||||
"for sheetname in xlsx.sheet_names:\n",
|
||||
" metadata[sheetname] = xlsx.parse(sheetname)\n",
|
||||
" metadata[sheetname].fillna('', inplace=True)\n",
|
||||
"metadata.keys()"
|
||||
"oldframefile = MASTERDATA_DIR + '2022-06-30_DISARM_0_1/DISARM_FRAMEWORKS_MASTER_0_1.xlsx'\n",
|
||||
"\n",
|
||||
"def create_excel_metadata(frameworkfile):\n",
|
||||
" metadata = {}\n",
|
||||
" xlsx = pd.ExcelFile(frameworkfile)\n",
|
||||
" for sheetname in xlsx.sheet_names:\n",
|
||||
" metadata[sheetname] = xlsx.parse(sheetname)\n",
|
||||
" metadata[sheetname].fillna('', inplace=True)\n",
|
||||
" return metadata\n",
|
||||
"\n",
|
||||
"metadata = create_excel_metadata(frameworkfile)\n",
|
||||
"oldmeta = create_excel_metadata(oldframefile)\n",
|
||||
"print('Current keys: {}'.format(metadata.keys()))\n",
|
||||
"print('Old keys: {}'.format(oldmeta.keys()))"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1963,11 +1968,369 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
"source": [
|
||||
"# Check against last version of framework"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 45,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>disarm_id</th>\n",
|
||||
" <th>name_changed</th>\n",
|
||||
" <th>summary_changed</th>\n",
|
||||
" <th>name_x</th>\n",
|
||||
" <th>name_y</th>\n",
|
||||
" <th>summary_x</th>\n",
|
||||
" <th>summary_y</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>P04</td>\n",
|
||||
" <td>False</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Assess</td>\n",
|
||||
" <td>Assess</td>\n",
|
||||
" <td>Evaluate effectiveness of action, for use in f...</td>\n",
|
||||
" <td>Evaluate effectiveness of action, for use in f...</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" disarm_id name_changed summary_changed name_x name_y \\\n",
|
||||
"3 P04 False True Assess Assess \n",
|
||||
"\n",
|
||||
" summary_x \\\n",
|
||||
"3 Evaluate effectiveness of action, for use in f... \n",
|
||||
"\n",
|
||||
" summary_y \n",
|
||||
"3 Evaluate effectiveness of action, for use in f... "
|
||||
]
|
||||
},
|
||||
"execution_count": 45,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"def check_version_descriptions(df1, df2):\n",
|
||||
" merge = df1.merge(df2, on='disarm_id')\n",
|
||||
" merge['name_changed'] = merge['name_x'] != merge['name_y']\n",
|
||||
" merge['summary_changed'] = merge['summary_x'] != merge['summary_y']\n",
|
||||
" return merge[(merge['name_changed']) | (merge['summary_changed'])][['disarm_id', 'name_changed', 'summary_changed', 'name_x', \n",
|
||||
" 'name_y', 'summary_x', 'summary_y']]\n",
|
||||
"\n",
|
||||
"check_version_descriptions(metadata['phases'], oldmeta['phases'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 46,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>disarm_id</th>\n",
|
||||
" <th>name_changed</th>\n",
|
||||
" <th>summary_changed</th>\n",
|
||||
" <th>name_x</th>\n",
|
||||
" <th>name_y</th>\n",
|
||||
" <th>summary_x</th>\n",
|
||||
" <th>summary_y</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>TA01</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>False</td>\n",
|
||||
" <td>Plan Strategy</td>\n",
|
||||
" <td>Strategic Planning</td>\n",
|
||||
" <td>Define the desired end state, i.e. the set of ...</td>\n",
|
||||
" <td>Define the desired end state, i.e. the set of ...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>TA02</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Plan Objectives</td>\n",
|
||||
" <td>Objective Planning</td>\n",
|
||||
" <td>Set clearly defined, measurable, and achievabl...</td>\n",
|
||||
" <td>Set clearly defined, measurable, and achievabl...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>2</th>\n",
|
||||
" <td>TA05</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>False</td>\n",
|
||||
" <td>Microtarget</td>\n",
|
||||
" <td>Microtargeting</td>\n",
|
||||
" <td>Target very specific populations of people</td>\n",
|
||||
" <td>Target very specific populations of people</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>TA06</td>\n",
|
||||
" <td>False</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Develop Content</td>\n",
|
||||
" <td>Develop Content</td>\n",
|
||||
" <td></td>\n",
|
||||
" <td>Create and acquire content used in incident</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>4</th>\n",
|
||||
" <td>TA07</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Select Channels and Affordances</td>\n",
|
||||
" <td>Channel Selection</td>\n",
|
||||
" <td>Selecting platforms and affordances assesses w...</td>\n",
|
||||
" <td>Set up specific delivery, amplification and ma...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>5</th>\n",
|
||||
" <td>TA08</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Conduct Pump Priming</td>\n",
|
||||
" <td>Pump Priming</td>\n",
|
||||
" <td>Release content on a targetted small scale, pr...</td>\n",
|
||||
" <td>Release content on a targetted small scale, pr...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>6</th>\n",
|
||||
" <td>TA09</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Deliver Content</td>\n",
|
||||
" <td>Exposure</td>\n",
|
||||
" <td>Release content to general public or larger po...</td>\n",
|
||||
" <td>Release content to general public or push to l...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>7</th>\n",
|
||||
" <td>TA10</td>\n",
|
||||
" <td>False</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Drive Offline Activity</td>\n",
|
||||
" <td>Drive Offline Activity</td>\n",
|
||||
" <td>Move incident/campaign from online to offline....</td>\n",
|
||||
" <td>Move incident into offline world</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>8</th>\n",
|
||||
" <td>TA11</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Persist in the Information Environment</td>\n",
|
||||
" <td>Persistence</td>\n",
|
||||
" <td>Persist in the Information Space refers to tak...</td>\n",
|
||||
" <td>Keep incident 'alive', beyond the incident cre...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>9</th>\n",
|
||||
" <td>TA12</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Assess Effectiveness</td>\n",
|
||||
" <td>Measure Effectiveness</td>\n",
|
||||
" <td>Assess effectiveness of action, for use in fut...</td>\n",
|
||||
" <td>Measure effectiveness of incident, for use in ...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>10</th>\n",
|
||||
" <td>TA13</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Target Audience Analysis</td>\n",
|
||||
" <td>Conduct Center of Gravity Analysis</td>\n",
|
||||
" <td>Identifying and analyzing the target audience ...</td>\n",
|
||||
" <td>Recon/research to identify \"the source of powe...</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" disarm_id name_changed summary_changed \\\n",
|
||||
"0 TA01 True False \n",
|
||||
"1 TA02 True True \n",
|
||||
"2 TA05 True False \n",
|
||||
"3 TA06 False True \n",
|
||||
"4 TA07 True True \n",
|
||||
"5 TA08 True True \n",
|
||||
"6 TA09 True True \n",
|
||||
"7 TA10 False True \n",
|
||||
"8 TA11 True True \n",
|
||||
"9 TA12 True True \n",
|
||||
"10 TA13 True True \n",
|
||||
"\n",
|
||||
" name_x \\\n",
|
||||
"0 Plan Strategy \n",
|
||||
"1 Plan Objectives \n",
|
||||
"2 Microtarget \n",
|
||||
"3 Develop Content \n",
|
||||
"4 Select Channels and Affordances \n",
|
||||
"5 Conduct Pump Priming \n",
|
||||
"6 Deliver Content \n",
|
||||
"7 Drive Offline Activity \n",
|
||||
"8 Persist in the Information Environment \n",
|
||||
"9 Assess Effectiveness \n",
|
||||
"10 Target Audience Analysis \n",
|
||||
"\n",
|
||||
" name_y \\\n",
|
||||
"0 Strategic Planning \n",
|
||||
"1 Objective Planning \n",
|
||||
"2 Microtargeting \n",
|
||||
"3 Develop Content \n",
|
||||
"4 Channel Selection \n",
|
||||
"5 Pump Priming \n",
|
||||
"6 Exposure \n",
|
||||
"7 Drive Offline Activity \n",
|
||||
"8 Persistence \n",
|
||||
"9 Measure Effectiveness \n",
|
||||
"10 Conduct Center of Gravity Analysis \n",
|
||||
"\n",
|
||||
" summary_x \\\n",
|
||||
"0 Define the desired end state, i.e. the set of ... \n",
|
||||
"1 Set clearly defined, measurable, and achievabl... \n",
|
||||
"2 Target very specific populations of people \n",
|
||||
"3 \n",
|
||||
"4 Selecting platforms and affordances assesses w... \n",
|
||||
"5 Release content on a targetted small scale, pr... \n",
|
||||
"6 Release content to general public or larger po... \n",
|
||||
"7 Move incident/campaign from online to offline.... \n",
|
||||
"8 Persist in the Information Space refers to tak... \n",
|
||||
"9 Assess effectiveness of action, for use in fut... \n",
|
||||
"10 Identifying and analyzing the target audience ... \n",
|
||||
"\n",
|
||||
" summary_y \n",
|
||||
"0 Define the desired end state, i.e. the set of ... \n",
|
||||
"1 Set clearly defined, measurable, and achievabl... \n",
|
||||
"2 Target very specific populations of people \n",
|
||||
"3 Create and acquire content used in incident \n",
|
||||
"4 Set up specific delivery, amplification and ma... \n",
|
||||
"5 Release content on a targetted small scale, pr... \n",
|
||||
"6 Release content to general public or push to l... \n",
|
||||
"7 Move incident into offline world \n",
|
||||
"8 Keep incident 'alive', beyond the incident cre... \n",
|
||||
"9 Measure effectiveness of incident, for use in ... \n",
|
||||
"10 Recon/research to identify \"the source of powe... "
|
||||
]
|
||||
},
|
||||
"execution_count": 46,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"check_version_descriptions(metadata['tactics'], oldmeta['tactics'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 47,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>disarm_id</th>\n",
|
||||
" <th>name_changed</th>\n",
|
||||
" <th>summary_changed</th>\n",
|
||||
" <th>name_x</th>\n",
|
||||
" <th>name_y</th>\n",
|
||||
" <th>summary_x</th>\n",
|
||||
" <th>summary_y</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
"Empty DataFrame\n",
|
||||
"Columns: [disarm_id, name_changed, summary_changed, name_x, name_y, summary_x, summary_y]\n",
|
||||
"Index: []"
|
||||
]
|
||||
},
|
||||
"execution_count": 47,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"check_version_descriptions(metadata['techniques'], oldmeta['techniques'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
@ -1198,30 +1198,35 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": 25,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"dict_keys(['ADMIN_README', 'ADMIN CODES', 'phases', 'tactics', 'techniques', 'countermeasures', 'frameworks', 'tasks', 'detections', 'playbooks', 'responsetypes', 'metatechniques', 'actortypes', 'actortype_framework', 'actortype_sector', 'sectors', 'resources', 'MOE', 'MOP'])"
|
||||
]
|
||||
},
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Current keys: dict_keys(['FRAMEWORK_ADMIN_README', 'FRAMEWORK_ADMIN CODES', 'phases', 'tactics', 'techniques', 'subtechniques', 'frameworks', 'tasks', 'detections', 'countermeasures', 'playbooks', 'responsetypes', 'metatechniques', 'actortypes', 'sectors', 'resources', 'MOE', 'MOP'])\n",
|
||||
"Old keys: dict_keys(['ADMIN_README', 'ADMIN CODES', 'phases', 'tactics', 'techniques', 'countermeasures', 'frameworks', 'tasks', 'detections', 'playbooks', 'responsetypes', 'metatechniques', 'actortypes', 'actortype_framework', 'actortype_sector', 'sectors', 'resources', 'MOE', 'MOP'])\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"MASTERDATA_DIR = '../DISARM_MASTER_DATA/'\n",
|
||||
"frameworkfile = MASTERDATA_DIR + 'DISARM_FRAMEWORKS_MASTER.xlsx'\n",
|
||||
" \n",
|
||||
"metadata = {}\n",
|
||||
"xlsx = pd.ExcelFile(frameworkfile)\n",
|
||||
"for sheetname in xlsx.sheet_names:\n",
|
||||
" metadata[sheetname] = xlsx.parse(sheetname)\n",
|
||||
" metadata[sheetname].fillna('', inplace=True)\n",
|
||||
"metadata.keys()"
|
||||
"oldframefile = MASTERDATA_DIR + '2022-06-30_DISARM_0_1/DISARM_FRAMEWORKS_MASTER_0_1.xlsx'\n",
|
||||
"\n",
|
||||
"def create_excel_metadata(frameworkfile):\n",
|
||||
" metadata = {}\n",
|
||||
" xlsx = pd.ExcelFile(frameworkfile)\n",
|
||||
" for sheetname in xlsx.sheet_names:\n",
|
||||
" metadata[sheetname] = xlsx.parse(sheetname)\n",
|
||||
" metadata[sheetname].fillna('', inplace=True)\n",
|
||||
" return metadata\n",
|
||||
"\n",
|
||||
"metadata = create_excel_metadata(frameworkfile)\n",
|
||||
"oldmeta = create_excel_metadata(oldframefile)\n",
|
||||
"print('Current keys: {}'.format(metadata.keys()))\n",
|
||||
"print('Old keys: {}'.format(oldmeta.keys()))"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1963,11 +1968,369 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
"source": [
|
||||
"# Check against last version of framework"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 45,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>disarm_id</th>\n",
|
||||
" <th>name_changed</th>\n",
|
||||
" <th>summary_changed</th>\n",
|
||||
" <th>name_x</th>\n",
|
||||
" <th>name_y</th>\n",
|
||||
" <th>summary_x</th>\n",
|
||||
" <th>summary_y</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>P04</td>\n",
|
||||
" <td>False</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Assess</td>\n",
|
||||
" <td>Assess</td>\n",
|
||||
" <td>Evaluate effectiveness of action, for use in f...</td>\n",
|
||||
" <td>Evaluate effectiveness of action, for use in f...</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" disarm_id name_changed summary_changed name_x name_y \\\n",
|
||||
"3 P04 False True Assess Assess \n",
|
||||
"\n",
|
||||
" summary_x \\\n",
|
||||
"3 Evaluate effectiveness of action, for use in f... \n",
|
||||
"\n",
|
||||
" summary_y \n",
|
||||
"3 Evaluate effectiveness of action, for use in f... "
|
||||
]
|
||||
},
|
||||
"execution_count": 45,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"def check_version_descriptions(df1, df2):\n",
|
||||
" merge = df1.merge(df2, on='disarm_id')\n",
|
||||
" merge['name_changed'] = merge['name_x'] != merge['name_y']\n",
|
||||
" merge['summary_changed'] = merge['summary_x'] != merge['summary_y']\n",
|
||||
" return merge[(merge['name_changed']) | (merge['summary_changed'])][['disarm_id', 'name_changed', 'summary_changed', 'name_x', \n",
|
||||
" 'name_y', 'summary_x', 'summary_y']]\n",
|
||||
"\n",
|
||||
"check_version_descriptions(metadata['phases'], oldmeta['phases'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 46,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>disarm_id</th>\n",
|
||||
" <th>name_changed</th>\n",
|
||||
" <th>summary_changed</th>\n",
|
||||
" <th>name_x</th>\n",
|
||||
" <th>name_y</th>\n",
|
||||
" <th>summary_x</th>\n",
|
||||
" <th>summary_y</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>TA01</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>False</td>\n",
|
||||
" <td>Plan Strategy</td>\n",
|
||||
" <td>Strategic Planning</td>\n",
|
||||
" <td>Define the desired end state, i.e. the set of ...</td>\n",
|
||||
" <td>Define the desired end state, i.e. the set of ...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>TA02</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Plan Objectives</td>\n",
|
||||
" <td>Objective Planning</td>\n",
|
||||
" <td>Set clearly defined, measurable, and achievabl...</td>\n",
|
||||
" <td>Set clearly defined, measurable, and achievabl...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>2</th>\n",
|
||||
" <td>TA05</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>False</td>\n",
|
||||
" <td>Microtarget</td>\n",
|
||||
" <td>Microtargeting</td>\n",
|
||||
" <td>Target very specific populations of people</td>\n",
|
||||
" <td>Target very specific populations of people</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>TA06</td>\n",
|
||||
" <td>False</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Develop Content</td>\n",
|
||||
" <td>Develop Content</td>\n",
|
||||
" <td></td>\n",
|
||||
" <td>Create and acquire content used in incident</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>4</th>\n",
|
||||
" <td>TA07</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Select Channels and Affordances</td>\n",
|
||||
" <td>Channel Selection</td>\n",
|
||||
" <td>Selecting platforms and affordances assesses w...</td>\n",
|
||||
" <td>Set up specific delivery, amplification and ma...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>5</th>\n",
|
||||
" <td>TA08</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Conduct Pump Priming</td>\n",
|
||||
" <td>Pump Priming</td>\n",
|
||||
" <td>Release content on a targetted small scale, pr...</td>\n",
|
||||
" <td>Release content on a targetted small scale, pr...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>6</th>\n",
|
||||
" <td>TA09</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Deliver Content</td>\n",
|
||||
" <td>Exposure</td>\n",
|
||||
" <td>Release content to general public or larger po...</td>\n",
|
||||
" <td>Release content to general public or push to l...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>7</th>\n",
|
||||
" <td>TA10</td>\n",
|
||||
" <td>False</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Drive Offline Activity</td>\n",
|
||||
" <td>Drive Offline Activity</td>\n",
|
||||
" <td>Move incident/campaign from online to offline....</td>\n",
|
||||
" <td>Move incident into offline world</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>8</th>\n",
|
||||
" <td>TA11</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Persist in the Information Environment</td>\n",
|
||||
" <td>Persistence</td>\n",
|
||||
" <td>Persist in the Information Space refers to tak...</td>\n",
|
||||
" <td>Keep incident 'alive', beyond the incident cre...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>9</th>\n",
|
||||
" <td>TA12</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Assess Effectiveness</td>\n",
|
||||
" <td>Measure Effectiveness</td>\n",
|
||||
" <td>Assess effectiveness of action, for use in fut...</td>\n",
|
||||
" <td>Measure effectiveness of incident, for use in ...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>10</th>\n",
|
||||
" <td>TA13</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>True</td>\n",
|
||||
" <td>Target Audience Analysis</td>\n",
|
||||
" <td>Conduct Center of Gravity Analysis</td>\n",
|
||||
" <td>Identifying and analyzing the target audience ...</td>\n",
|
||||
" <td>Recon/research to identify \"the source of powe...</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" disarm_id name_changed summary_changed \\\n",
|
||||
"0 TA01 True False \n",
|
||||
"1 TA02 True True \n",
|
||||
"2 TA05 True False \n",
|
||||
"3 TA06 False True \n",
|
||||
"4 TA07 True True \n",
|
||||
"5 TA08 True True \n",
|
||||
"6 TA09 True True \n",
|
||||
"7 TA10 False True \n",
|
||||
"8 TA11 True True \n",
|
||||
"9 TA12 True True \n",
|
||||
"10 TA13 True True \n",
|
||||
"\n",
|
||||
" name_x \\\n",
|
||||
"0 Plan Strategy \n",
|
||||
"1 Plan Objectives \n",
|
||||
"2 Microtarget \n",
|
||||
"3 Develop Content \n",
|
||||
"4 Select Channels and Affordances \n",
|
||||
"5 Conduct Pump Priming \n",
|
||||
"6 Deliver Content \n",
|
||||
"7 Drive Offline Activity \n",
|
||||
"8 Persist in the Information Environment \n",
|
||||
"9 Assess Effectiveness \n",
|
||||
"10 Target Audience Analysis \n",
|
||||
"\n",
|
||||
" name_y \\\n",
|
||||
"0 Strategic Planning \n",
|
||||
"1 Objective Planning \n",
|
||||
"2 Microtargeting \n",
|
||||
"3 Develop Content \n",
|
||||
"4 Channel Selection \n",
|
||||
"5 Pump Priming \n",
|
||||
"6 Exposure \n",
|
||||
"7 Drive Offline Activity \n",
|
||||
"8 Persistence \n",
|
||||
"9 Measure Effectiveness \n",
|
||||
"10 Conduct Center of Gravity Analysis \n",
|
||||
"\n",
|
||||
" summary_x \\\n",
|
||||
"0 Define the desired end state, i.e. the set of ... \n",
|
||||
"1 Set clearly defined, measurable, and achievabl... \n",
|
||||
"2 Target very specific populations of people \n",
|
||||
"3 \n",
|
||||
"4 Selecting platforms and affordances assesses w... \n",
|
||||
"5 Release content on a targetted small scale, pr... \n",
|
||||
"6 Release content to general public or larger po... \n",
|
||||
"7 Move incident/campaign from online to offline.... \n",
|
||||
"8 Persist in the Information Space refers to tak... \n",
|
||||
"9 Assess effectiveness of action, for use in fut... \n",
|
||||
"10 Identifying and analyzing the target audience ... \n",
|
||||
"\n",
|
||||
" summary_y \n",
|
||||
"0 Define the desired end state, i.e. the set of ... \n",
|
||||
"1 Set clearly defined, measurable, and achievabl... \n",
|
||||
"2 Target very specific populations of people \n",
|
||||
"3 Create and acquire content used in incident \n",
|
||||
"4 Set up specific delivery, amplification and ma... \n",
|
||||
"5 Release content on a targetted small scale, pr... \n",
|
||||
"6 Release content to general public or push to l... \n",
|
||||
"7 Move incident into offline world \n",
|
||||
"8 Keep incident 'alive', beyond the incident cre... \n",
|
||||
"9 Measure effectiveness of incident, for use in ... \n",
|
||||
"10 Recon/research to identify \"the source of powe... "
|
||||
]
|
||||
},
|
||||
"execution_count": 46,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"check_version_descriptions(metadata['tactics'], oldmeta['tactics'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 47,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>disarm_id</th>\n",
|
||||
" <th>name_changed</th>\n",
|
||||
" <th>summary_changed</th>\n",
|
||||
" <th>name_x</th>\n",
|
||||
" <th>name_y</th>\n",
|
||||
" <th>summary_x</th>\n",
|
||||
" <th>summary_y</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
"Empty DataFrame\n",
|
||||
"Columns: [disarm_id, name_changed, summary_changed, name_x, name_y, summary_x, summary_y]\n",
|
||||
"Index: []"
|
||||
]
|
||||
},
|
||||
"execution_count": 47,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"check_version_descriptions(metadata['techniques'], oldmeta['techniques'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
Loading…
x
Reference in New Issue
Block a user