#6 Lesson — Part 1 | Learn to Code with Microsoft M-Language: Real World Project — Pull & Clean up Data from Meetup.com via API

For me personally, APIs had always that intimidating touch of: “Oh, you have to be a fully fledged developer to use them.” Qute the contrary. It’s pretty easy to pull data via API into Excel and then clean it up with help of M-Language. But let’s first start off with a brief explanation: What are APIs?

“Application Programming Interface. In general terms, it is a set of clearly defined methods of communication between various software components.” Wikipedia

If this still sounds to cryptic to you, let me explain in layman’s terms. We are going to pull huge amonts of data from Meetup.com on various venues through their API. On Meetup.com, you can find loads of events covering a broad range of topics, ranging from knitting pullovers to data science, and you can do in-depth analysis on any subject that is of interest for you utilizing their APIs (please sign up at Meetup.com — it’s free of charge — you can only utilize their APIs if you have an account).

Obviously, you can browse their website if you want to do research on different venues. But let’s assume you are using Meetup.com professionally. Let’s say, your company wants to host meetups, and you are tasked with analyzing Meetup.com for similar venues around the globe. That’s what I did for a customer of mine.

I pulled information on 1,600 venues through Meetup.com API, I cleaned up that data using M-Language, and I then loaded the results into multiple Excel Sheets — a nice and neat collection of venues from Amsterdam to Tokyo.

If I had no knowledge of M-Language and APIs, I would have tried to pull that data manually, which would have taken me days. I personally hate to do mundane, repetitive tasks, and I guess my customer wouldn’t be happy to pay me for just … copying and pasting data, day in day out. Instead, it was a matter of hours to put together that report, which my customer found very helpful to make an informed decision about his planned venues on Meetup.com

My research consisted of 27 queries. That might sound very tedious at first glance, but I actually had to do only one query manually (highlighted in the screenshot below).

I then converted that query into a function (highlighted in the screenshot below). That way, I was able to create the remaining 25 queries with only one click each.

This is what the M-Language code looks like.

I learned about Meetup.com APIs through a great e-book written by Reza Rad, a Microsoft MVP (Most Valuable Professional — you can read about the MVP program here). It’s titled “Power BI from Rookie to Rockstar”, you can download Reza’s book for free here.

You can find the chapter “Meetup Data Source for Power BI” in Reza’s book on page 158, or on his blog. Although Reza’s book is focusing on Power BI, I was able to complete most of the tasks in Excel, as M-Language works interchangeably in Excel and Power BI most of the time. Based on what I learned from Reza’s book, I was able to dive deeper into Meetup.com APIs and perform the forementioned analysis. I highly recommend Reza’s write-up on Meetup.com, as he takes a different approach to this subject than I do in my course — he also covers some cool & important topics (which I don’t) such as converting timestamps into a digestible time & date format.

This is what I will teach you in the following parts of this lesson:

  • How to use Meetup.com APIs
  • How to extract data from Meetup.com, transform it with M-Language and load the cleaned up results into an Excel Sheet

With that, you will be able to start exploring Meetup.com APIs on your own, play around with their data in Excel and hopefully come up with ways to utilize & monetize your newly learned skills (just as I did).

Let’s move on!

This is my entire course