Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
14e9364d
Commit
14e9364d
authored
Dec 05, 2014
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Adjacency matrix bug, url disappeared (maybe because of merge).
parent
7225844c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
functions.py
analysis/functions.py
+1
-6
urls.py
gargantext_web/urls.py
+1
-1
No files found.
analysis/functions.py
View file @
14e9364d
...
@@ -133,7 +133,7 @@ def create_cooc(user=None, corpus=None, whitelist=None, size=150):
...
@@ -133,7 +133,7 @@ def create_cooc(user=None, corpus=None, whitelist=None, size=150):
cursor
.
execute
(
query_cooc
)
cursor
.
execute
(
query_cooc
)
return
cooc
return
cooc
def
get_cooc
(
request
=
None
,
corpus_id
=
None
,
cooc_id
=
None
,
type
=
"node_link"
):
def
get_cooc
(
request
=
None
,
corpus_id
=
None
,
cooc_id
=
None
,
type
=
"node_link"
,
n
=
150
):
import
pandas
as
pd
import
pandas
as
pd
from
copy
import
copy
from
copy
import
copy
import
numpy
as
np
import
numpy
as
np
...
@@ -152,11 +152,6 @@ def get_cooc(request=None, corpus_id=None, cooc_id=None, type="node_link"):
...
@@ -152,11 +152,6 @@ def get_cooc(request=None, corpus_id=None, cooc_id=None, type="node_link"):
if
Node
.
objects
.
filter
(
type
=
type_cooc
,
parent
=
corpus
)
.
first
()
is
None
:
if
Node
.
objects
.
filter
(
type
=
type_cooc
,
parent
=
corpus
)
.
first
()
is
None
:
print
(
"Coocurrences do not exist yet, create it."
)
print
(
"Coocurrences do not exist yet, create it."
)
if
type
==
"node_link"
:
n
=
150
elif
type
==
"adjacency"
:
n
=
50
whitelist
=
create_whitelist
(
request
.
user
,
corpus
,
size
=
n
)
whitelist
=
create_whitelist
(
request
.
user
,
corpus
,
size
=
n
)
cooccurrence_node
=
create_cooc
(
user
=
request
.
user
,
corpus
=
corpus
,
whitelist
=
whitelist
,
size
=
n
)
cooccurrence_node
=
create_cooc
(
user
=
request
.
user
,
corpus
=
corpus
,
whitelist
=
whitelist
,
size
=
n
)
print
(
cooccurrence_node
.
id
,
"Cooc created"
)
print
(
cooccurrence_node
.
id
,
"Cooc created"
)
...
...
gargantext_web/urls.py
View file @
14e9364d
...
@@ -35,7 +35,7 @@ urlpatterns = patterns('',
...
@@ -35,7 +35,7 @@ urlpatterns = patterns('',
# Getting data
# Getting data
url
(
r'^chart/corpus/(\d+)/data.csv$'
,
views
.
send_csv
),
url
(
r'^chart/corpus/(\d+)/data.csv$'
,
views
.
send_csv
),
url
(
r'^corpus/(\d+)/node_link.json$'
,
views
.
node_link
),
url
(
r'^corpus/(\d+)/node_link.json$'
,
views
.
node_link
),
url
(
r'^corpus/(\d+)/adja
ncy_matrix
$'
,
views
.
node_link
),
url
(
r'^corpus/(\d+)/adja
cency.json
$'
,
views
.
node_link
),
url
(
r'^api$'
,
gargantext_web
.
api
.
Root
),
url
(
r'^api$'
,
gargantext_web
.
api
.
Root
),
url
(
r'^api/nodes/(\d+)/children/metadata$'
,
gargantext_web
.
api
.
NodesChildrenMetatadata
.
as_view
()),
url
(
r'^api/nodes/(\d+)/children/metadata$'
,
gargantext_web
.
api
.
NodesChildrenMetatadata
.
as_view
()),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment