DEV Community

Fawaz Siddiqi
Fawaz Siddiqi

Posted on

Know your Water Quality using Node Red and API's

Water is an essential resource for all of us, and it is considered to be the most threatened by climate change. Moreover when it comes to various other countries, clean water and its sanitation is a major issue.

Watch this video by charity: water - The Spring - The charity: water story which really explains the issue in-depth and how many people are affected by this.

charitywater

According to WHO (World Health Organization) 2.2B people have no access to safely managed drinking water, 4.2B people do not have safely managed sanitation, and 3B people lack basic hand washing facilities! Which is a big number considering the fact that we are in a pandemic and with such issues, there is a chance of it increasing or even mutating to other variants at the same time, which really increases the problem rather than resolving it and the efforts to resolve it would be diminished as well.

There are some amazing organizations which are looking at the problem of clear water and sanitation, as we mentioned charity: water is one of them, but there's also UN Water which is the United Nations subsidiary actively looking into the water crisis.

Recently, IBM launched Call for Code, it is a global challenge which IBM conducts every year with various themes, this years theme is focusing on three major problem areas and clean water and sanitation is one of them.

Slide8

Recently, Asna Javed (Lead Developer Advocate, IBM Pakistan) and I (Developer Advocate, IBM UAE) conducted a workshop on Building a Water Quality Dashboard with GeoJSON and Node-RED, where we used GeoJSON data provided by USGS NLDI API returns a GeoJSON set of latitude / longitude coordinates and features that can be plotted on a map The NLDI API is provided by the Open Water Data Initiative and is being developed as an open source project.

We also got water toxicity reports and values using the Aquagenuity Developer API. The Aquagenuity GetWaterScore API provides water quality reports for many USA Zip Codes. Sign up for a free Aquagenuity Developer API key. Select the free plan and create an account. You will receive an email welcoming you to the Aquagenuity Developer Access Program. The email will contain your username and password credentials.

Slide11

All both of the API's were pushing information to the Node-Red instance which was running on IBM Cloud and you can also try to Install Node-RED on your system or in IBM Cloud. You can create and deploy these flows and dashboards to IBM Cloud by creating a Node-RED Starter application.

To get started, you can login/sign up for IBM Cloud here

Also, you can find the flow which we imported into the Node-Red instance here https://github.com/IBMDeveloperMEA/CFC-Water-Ridgewood.

As a final output, you will see a dashboard by going to

https://<your node-red url>/ui

and if the payload is sent properly you should see something like this

Slide22

In case you missed the workshop and need the resources and replays, please find them below

Workshop Resources

If you have any suggestions or queries, feel free to reach out to me, cheers!

Stay safe and keep others safe!

Top comments (0)