# Enable Cred Analysis Notebooks

**URL:** <https://discourse.sourcecred.io/t/enable-cred-analysis-notebooks/573>\
**Category:** Initiatives\
**Tags:** 🏗️in-progress\
**Created:** [January 7, 2020, 4:58am UTC](https://discourse.sourcecred.io/t/enable-cred-analysis-notebooks/573 "2020-01-07T04:58:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![decentralion](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sourcecred.io/decentralion/32/7_2.png) [@decentralion](https://discourse.sourcecred.io/u/decentralion)\
**Post date:** [January 7, 2020, 4:58am UTC](https://discourse.sourcecred.io/t/enable-cred-analysis-notebooks/573/1 "2020-01-07T04:58:52Z")

</div>

# Description

* * *

We’ve found [Observable notebooks](https://observablehq.com/) really useful; they make it easy to analyze data and share results. Creating an Observable notebook is enormously easier than creating a new dedicated interface within SourceCred itself, so they allow fast iteration and exploration of concepts.

However, Observable notebooks are handicapped by a key limitation: we cannot run SourceCred’s native code inside of them. As such, we can’t re-compute Cred, or even do a good job of exploring our data structures.

This has basically blocked the [Cred Analysis Notebooks](https://discourse.sourcecred.io/t/cred-analysis-notebooks/267/6) initiative.

# Status: Championed

* * *
  

# Champion

* * *

- @decentralion  

# Benefits

* * *

Enable Cred Analysis Notebooks.

# Implementation Plan

* * *

- Enable compiling a JS file with major API points accessible
- Publish proof-of-concept notebook that does cred analysis in Observable

  

# Deliverables

* * *

Proof of concept observable notebook, with cred analysis.

# Dependencies

* * *
  

# References

* * *
  

# Contributions

- [https://github.com/sourcecred/sourcecred/pull/1526](https://github.com/sourcecred/sourcecred/pull/1526)
- Debugging session with @wchargin and @decentralion learning how to get live code into Observable (TODO: write documentation)
- Extensive debugging session with @wchargin and @decentralion understanding why the module failed to load in Observable (resolution: recompile with external modules inlined, add global this object)

* * *

---

<div class="post-metadata">

**Author:** ![Beanow](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sourcecred.io/beanow/32/98_2.png) [@Beanow](https://discourse.sourcecred.io/u/Beanow)\
**Post date:** [March 6, 2020, 3:31pm UTC](https://discourse.sourcecred.io/t/enable-cred-analysis-notebooks/573/2 "2020-03-06T15:31:10Z")

</div>

@decentralion, we now have the API file and a fairly hacky way of depending on it. Do you want to flesh this out further or leave it here for a bigger [modularization refactor](https://discourse.sourcecred.io/t/splitting-code-into-modules/265)?

---

<div class="post-metadata">

**Author:** ![decentralion](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sourcecred.io/decentralion/32/7_2.png) [@decentralion](https://discourse.sourcecred.io/u/decentralion)\
**Post date:** [March 6, 2020, 5:42pm UTC](https://discourse.sourcecred.io/t/enable-cred-analysis-notebooks/573/3 "2020-03-06T17:42:01Z")

</div>

I think we should consider this completed once we’ve put a bit more polish in: i.e. publish to npm, put in documentation, and have an example cred notebook that we can publicly reference.
