Skip to content

Commit

Permalink
feat(networks): ignore ids
Browse files Browse the repository at this point in the history
  • Loading branch information
ahonestla committed Jan 7, 2025
1 parent 014b0d3 commit dbc922b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/src/api/networks/network/ignore.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const ignore_ids = {
domains: [
"Q3526257", // Thèse d'exercice
"Q913404", // Thèse d'exercice de médecine
"Q669220", // Not available
],
}
3 changes: 3 additions & 0 deletions client/src/api/networks/network/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import communitiesCreate from "./communities"
import { configGetItemUrl } from "./config"
import { getParameters } from "./parameters"
import { ElasticAggregation, ElasticBucket } from "../../../types/commons"
import { ignore_ids } from "./ignore"

type NetworkBucket = ElasticBucket & { max_year: ElasticAggregation }

Expand Down Expand Up @@ -45,6 +46,8 @@ export default async function networkCreate(
const maxYear = item.max_year?.value
const nodes = key.split("---")

if (ignore_ids[model].includes(nodeGetId(nodes[0])) || ignore_ids[model].includes(nodeGetId(nodes[1]))) return

// Add nodes and compute weight
nodes.forEach((id: string) =>
graph.updateNode(nodeGetId(id), (attr) => ({
Expand Down

0 comments on commit dbc922b

Please sign in to comment.