3rd iPaaS Puzzle: Who’s Country is improving the most on the UN Sustainable Development Goals?

This is the third in a series of 5 iPaaS Puzzles we are posting in the next couple of weeks. Don’t we all love a little puzzle, even more if it helps us keep our webMethods skills sharp. If the solution is practical and immediately applicable to the benefit of the environment even better!

3rd iPaaS Puzzle: Who’s Country is improving the most on the UN Sustainable Development Goals?

The 2030 Agenda for Sustainable Development, adopted by all United Nations Member States in 2015, provides a shared blueprint for peace and prosperity for people and the planet, now and into the future. At its heart are the 17 Sustainable Development Goals (SDGs), which are an urgent call for action by all countries – developed and developing – in a global partnership.

https://www.youtube.com/watch?v=0XTBYMfZyrM&t=2s

Picture and Video from https://unstats.un.org/UNSDWebsite/

How can iPaaS help in achieving this?

Help Countries look up data, by developing a connector for the UN Sustainability API using webMethods.io Integration Connector Builder

The best connector will be published to webMethods.io Integration and will be made available to all the users of webMethods.io Integration.

Or

Use Custom Connectors to compare and derive statistics on how Countries perform on various goals.

Stretch goal

Create a game or dashboard that compares the development of different countries on one sustainability goal. To make the improvement numbers comparable between two countries, let’s calculate the delta improvement year over year.

One can even create a loop that pairs the winner against the next country until there is an overall winner countra for all 17 UN goals.

Submissions

Please post your solution to the puzzle as replies to this thread.
Use the “blur spoiler” tag to hide your results so that folks must click on your solution to indicate they want to see it!
image

iPaaS Puzzle Show

Every other Friday for the next couple of weeks, we are hosting an iPaaS Puzzle Show.

We will briefly talk about the different solutions for this week’s puzzle, what to learn from them, and introduce next week’s iPaaS Puzzle. Hope you can join us.

We are officially kicking off the 3rd iPaaS Puzzle this Friday the 23rd of September:

APJ/EMEA 11.30am IST / 8am CEST

EMEA/Americas 11am EDT / 8am PDT / 5pm CEST

The 3rd iPaaS Puzzle show will be on Friday the 21st of October 8am CEST! and 5pm CEST! Details to come!

Deadline

Just have your solution posted before the iPaaS Puzzle Show on Friday the 21st of October 8am CEST. If you want to be invited on the show, please post your solution by Thursday the 20th 8am CEST.

Prizes

The winners get fame and glory. We want this to be a friendly competition and we want to highlight great work, without having to crown a weekly winner.

Suggest a Puzzle

If you have another great idea for an iPaaS Puzzle, please suggest it in this form . It should be a little challenge that is doable within a week and has easy access to the source data needed. If your challenge is geared towards improving our lives, then even better!

If your iPaaS Puzzle suggestion does get selected, we’d invite you to personally introduce it in our iPaaS Puzzle Show and you will receive a wooden Tangram game as a token of our appreciation.
image

The actual prize may look differently!

4 Likes

If you are a novice in regards to webMethods. Can you still solve this iPaaS Puzzle?

First you need to understand all about the webMethods connectors.

Let’s go to the free Learning Portal’s webMethods video courses!

Check out the topics that are covered in this course:

Looks like a wonderful resource to me to get the foundation knowledge to create your own connector for the UN Sustainable Developmental goals aka a great step forward to solve this puzzle.

Not to overwhelm this solution thread, I started a new one to track insights I capture while solving our Puzzle here: Using webMethods Learning Portal to Solve the 3rd iPaaS Puzzle UN Sustainable Development Goals

3 Likes

Hi All,
There are multiple ways to solve this puzzle. You can build a Connector using Connector Builder or use a REST Connector. In my solution I am using a FlowService with HTTP Request to compare, Total greenhouse gas emissions without LULUCF for Annex I Parties (Mt CO₂ equivalent) for the last 5 years.

Below is what I found for United States of America Vs Germany.

Total greenhouse gas emissions without LULUCF for Annex I Parties (Mt CO₂ equivalent) in the last 5 years
United States of America:  220.07452000000012
Germany:  -66.21555000000001 
2 Likes

Lovely! Thanks for posting your solution.

If I understand it right, you are just comparing the CO2 emissions of the US and Germany.
These two numbers are tough to compare, as the size of the country and how many folks are living there plays a major role. So one interesting measure could be to devide the result by how many people are living in a country to get a per capita number. You can get that information from this API: REST Countries

Or you grab the year before number as 100% and compare it to this year’s number and calculate the % improvement to last year. Once you have a percentage improvement, you can compare Germany, US, and India.

That is the ranking I would like to see a countries % improvement year over year! :slight_smile:

2 Likes

I found the overall ranking: Sustainable Development Report 2022 (sdgindex.org)

Bildschirmfoto 2022-09-29 um 12.22.52

Strong showing of the Nordic countries is no surprise. Congratulations to Austria being ahead Germany :slight_smile:

Extra shoutout to Estonia cracking the top 10 :slight_smile:

Now I hope that next Friday the 21th of October one of you has solved this week’s iPaaS Puzzle including the stretch goal and we can create a ranking of the countries that have developed the most in the last years!

2 Likes

I have followed the link and developed connector using NodeJS CLI (wmio) for UN SDG API .

[spoiler] For Custom Connector, I have followed the instructions from the link. And imported the REST API Spec provided by UN SDG. UN SDG API spec was giving some error. corrected to to be able to import.

Connected to webMethods.io tenant using wmio login , Imported that API spec using wmio swaggar, which created the actions automatically.

One or 2 Actions, tested by providing mock_input and using wmio test. Then deployed that connector using wmio deploy.

Here is the image for the Custom connector deployed in webMethods.io

image

Then in webMethods.io Workflow created workflows by using that custom connector

GetDataBySeriesCode - which returns the data for specific series.

Get Target Series- get the series for specific Goal and Target. And only return the fields required. So that it is not heavy.

Flow service to find unique series data availabe for specific Goal area and Target.

Then created a small html page with javascript.

  1. In that page user need to select specific Goal
  2. Based on the previous selection, it will load all the target for that goal. Then user need to select specific target.
  3. It will then call webMethods.io integration using webhook to get all series available by passing that goal area and target
    4.Now user need to select specific series name, on which want to compare across geo areas
  4. Once selected it will again call webMethods.io integration using webhook to get that specific series data for all geo areas where data is available. ( I have taken only data for 2021 and having dimension Sex=BothSex and Age = [15+ and 15-64] to avoid large amount of data for now)
  5. Once data returned by webMethods.io , it will plot that data in that same html page using chart.js
  6. On the same page user again can select different goal area, target and Series, then chart will be updated with the new series data if available for 2021, else will show message no data available.

This is the HTML page

First all goal areas will be loaded.

user then need to select one goal area. It will then Start loading Corresponding Targets available by UN.

Now user need to select specific target area. Then it will call webMethods.io integration at backend and get all series available for that specific goal area and Target. Once user select, it will show message " Please wait …Retrieving all series …"

Once call is done, it will show " Data is loaded now …" . User now need to select specific series, on which user want to compare for all GeoAreas, for which this series data is available for year 2021 and having dimensions Sex=“BOTHSEX” and Age =[“15+”,“15-64”]

Now user once select the Series, It will call webMethods.io integration (workflow) using webhook which uses new custom connector. First gets all GeoAreas available and for them get Series data and return.

Then using Javascript, data is plot using bar chart

Now for the above series code data was available for 2021 with those dimension only for Indonesia. Now let me change the Series keeping same goal and target.
Now I selected Series - Employed Population below international poverty line. It has data for 178 countries.

Now chart look like below

If we want to change any other goal, target and series data, can do it again and it will reload the chart.

It can happen for some Goal Area and target , no series data available. It will give message accordingly

It also may be the case, Goal area, Target area and Series is available but no data for 2021 like below.


[/spoiler]
Here is another chart for Goal area - Reduce inequality within and among countries.

Thank you.

4 Likes

Wow, Tarak! This looks like an amazing solution. Will dig deeper into it soon!

What were the errors and how did you get around them?

Thank you for your Query. I imported that API spec (JSON) in https://editor.swagger.io/ . It gives the error in details.

Most of the errors were to add application/x-www-form-urlencoded in consumes property

I have changed here to

Another type of error was like this. - The parameter named “indicatorcode” does not match the case used in the path

It is corrected to match the path

These were the only 2 type of errors.

We can check these errors either in editor.swagger.io or in spotlight.io

Here is the screenshot from spotlight.io of these errors.

Thank you

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.