Platform
Solutions
Resources
Pricing
Sign in
Sign up
W.J.H.
Workspace
Fork
Public
By
W.J.H.
Edited
Jan 16, 2023
Fork of
Coordinape Plugin Walk-Through
Insert cell
Insert cell
Insert cell
sc
=
require
(
"sourcecred@latest"
)
// In other environments, you might need to use:
// sc = require("sourcecred").sourcecred
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
createIdentityProposals
=
(
{
pluginName
,
participants
}
)
=>
(
participants
.
map
(
(
participant
)
=>
(
{
// "name" can only contain letters, numbers, and dashes
name
:
toId
(
participant
.
name
)
,
pluginName
,
type
:
'USER'
,
// The options are USER, BOT, ORGANIZATION, PROJECT
alias
:
{
description
:
`participant: ${
participant
.
name
}`
,
address
:
addr
(
participant
)
,
}
}
)
)
)
Insert cell
identityProposals
=
createIdentityProposals
(
{
pluginName
,
participants
:
Object
.
values
(
participants
)
}
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// should not error
graphOutput
=
sc
.
api
.
graph
.
graph
(
graphInput
)
Insert cell
Insert cell
Insert cell
// should not error
credrankOutput
=
sc
.
api
.
credrank
.
credrank
(
credrankInput
)
Insert cell
Insert cell
credrankOutput
.
credGrainView
.
participants
(
)
.
map
(
p
=>
`${
p
.
identity
.
name
.
padStart
(
15
,
' '
)
} ${
p
.
cred
}`
)
.
join
(
'\n'
)
Insert cell
Insert cell
Insert cell
serializedWeightedGraph
=
JSON
.
stringify
(
sc
.
core
.
weightedGraph
.
toJSON
(
weightedGraph
)
,
null
,
2
// Notice, this is a little different than the other two.
)
Insert cell
serializedDeclaration
=
JSON
.
stringify
(
declaration
,
null
,
2
)
Insert cell
serializedIdentityProposals
=
JSON
.
stringify
(
identityProposals
,
null
,
2
)
Insert cell
csv
=
sc
.
api
.
analysis
.
analysis
(
{
credGraph
:
credrankOutput
.
credGraph
,
ledger
:
credrankOutput
.
ledger
,
featureFlags
:
{
neo4j
:
true
}
,
}
)
Insert cell
nodeList
=
{
const
nodeList
=
[
]
for
(
let
line
of
csv
.
neo4j
.
nodes
)
{
nodeList
.
push
(
line
)
}
return
nodeList
.
join
(
'\n'
)
}
Insert cell
Insert cell
Insert cell
Insert cell
One platform
to build and deploy the best data apps
Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Try it for free
Learn more
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
sc
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
pluginName
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
addressPrefix
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
nodePrefix
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
edgePrefix
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
addr
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
declaration
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dateRangeFor
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
toId
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
participants
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
participantNamed
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
TableSearchError
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
pullCircle
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
processSheet
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
buildGraph
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
weightedGraph
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
nodes
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
edges
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
createIdentityProposals
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
identityProposals
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
graphInput
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
graphOutput
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
credrankInput
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
credrankOutput
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
table
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
serializedWeightedGraph
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
serializedDeclaration
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
serializedIdentityProposals
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
csv
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
nodeList
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
getSheet
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML