Return to site

Using CircuitBuilder to keep up with COVID-19

Up-to-date and accurate information has never been more critical

· blockchain,news,apis,circuitbuilder,covid-19

Recently, CoinDesk posted an article, and tweeted about, a project to "disintermediate data" regarding COVID-19, noting that many people are skeptical of the data being released by national governments, including the US federal government.

COVID-19 is at the forefront of everyone's minds, over pretty much the entire globe. Access to up-to-date data is critical, and feeling comfortable that that data is accurate is high on the priority list as well. The current main source of data is being offered to users in a visual map, collected and presented by the Johns Hopkins Coronavirus Resource Center. Most resources that we have found for data ultimately use the same base data as the JH map.

When we read about the disintermediate data on the web site, we got excited. An API making coronavirus data available that speaks to many of us who are skeptical of data being released by large governmental entities. Even better, if you visit that site, you will find this sentence: "Todo is to certify this data on the blockchain."

What a great use case for CircuitBuilder! This is our specialty! We can create a component for this API quickly, and then create a circuit to take that data, hash it, write it to a blockchain, and for shits and giggles, post to Twitter (sssh! We have been working on a Twitter component in the quiet times between releases recently)


Let's look at what's going on in there.

That purplish looking component, "Get Time Series Data by State", is the endpoint exposed by the coronavirusApi web site. In that component, you choose a state- in this case, I've chosen NC. I'm displaying that data on the console, so I can see what is coming out of it.

Then, I am checking whether that data has changed, using the Modified component. The timer on this circuit is set to run every 60 minutes. If the data has changed, the new data is written to a file (this one is appending data).

Next, we are taking that data and creating a hash of it. Then, I'm sending the hash to THREE other components:

  • The debug console
  • A "Store Hashes on the Blockchain" component, which writes the hash to a ChainPoint blockchain for proof-of-existence.  Read more about it here and here.
  • AND INTRODUCING the Twitter component!  So we are also posting to a Twitter account with a custom message.  Here is an example:
Finally, we are also writing the proof data that comes back from the Store Hashes on the Blockchain component to a file as well. The idea is that this data could be verified with the blockchain later, if desired.

HERE IS MY FAVORITE PART OF THIS POST: We decided to act on that new CoronavirusApi data just 5 hours ago. THAT's how long it took us to create a component, then create a circuit with it, and then write a blog post about it!!!

Check out this circuit HERE. **Note that in order to post to Twitter, you will need to enter your own Twitter credentials. And come on into this Telegram chat room to discuss CircuitBuilder!!

All Posts

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!