Skip to content

Commit

Permalink
Add hcf_community
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Deschamps committed May 6, 2017
1 parent 744f11f commit 5f88362
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions descriptor/create_graphs_in_R.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"metadata": {
"collapsed": true
},
Expand All @@ -46,7 +46,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"metadata": {
"collapsed": true
},
Expand All @@ -73,15 +73,16 @@
},
{
"cell_type": "code",
"execution_count": 55,
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Warning message in (function (..., deparse.level = 1) :\n",
"“number of columns of result is not a multiple of vector length (arg 1)”"
"Warning message:\n",
"“closing unused connection 4 (/data/links/ALBERTA_hcf_alberta_online_encyclopedia-links.txt)”Warning message:\n",
"“closing unused connection 5 (/data/links/ALBERTA_fort_mcmurray_wildfire_2016-links.txt)”"
]
}
],
Expand All @@ -91,11 +92,11 @@
"filepath = '/data/links/'\n",
"\n",
"# Change the following file to the \n",
"file = 'WINNIPEG_uofw_website'\n",
"file = 'ALBERTA_hcf_alberta_online_encyclopedia'\n",
"# ^^^^^^^^^^^^^^^^^^^^^^^^^^ <- Change to the file name you want. Leave out \"-links.txt\"\n",
"\n",
"suffix = '-links.txt'\n",
"file2 = 'WAHR_panamapapers'\n",
"file2 = 'ALBERTA_fort_mcmurray_wildfire_2016'\n",
"# ^^^^^^^^^^^^^^^^^^^^^^^^^^ <- Change to the file name you want. Leave out \"-links.txt\"\n",
"\n",
"\n",
Expand Down Expand Up @@ -135,19 +136,16 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1] \"Average In-degree: 0.992753623188406\"\n",
"[1] \"Average Out-degree: 0.992753623188406\"\n",
"[1] \"Average Degree: 1.98550724637681\"\n",
" [1] \"cepa.com\" \"ceaa-acee.gc.ca\" \"capp.ca\" \"greenpeace.org\" \n",
" [5] \"youtube.com\" \"npa.gc.ca\" \"enform.ca\" \"state.gov\" \n",
" [9] \"plus.google.com\" \"twitter.com\" \n"
"[1] \"Average In-degree: 1.72986328024988\"\n",
"[1] \"Average Out-degree: 1.72986328024989\"\n",
"[1] \"Average Degree: 3.45972656049977\"\n"
]
}
],
Expand Down Expand Up @@ -209,7 +207,7 @@
"\n",
"\n",
"# With this, you will see the number and names of websites that will be labelled in the network graph.\n",
"print(V(graph_plot_name)$rlabel[which(V(graph_plot_name)$relevant == TRUE)])\n"
"#print(V(graph_plot_name)$rlabel[which(V(graph_plot_name)$relevant == TRUE)])\n"
]
},
{
Expand Down Expand Up @@ -328,8 +326,10 @@
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"execution_count": 4,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Write the graphml\n",
Expand Down

0 comments on commit 5f88362

Please sign in to comment.