Breaking Out URLs With M

Chris Webb shows the RelativePath and Query parameters of Web.Contents in M:

Generates a call that returns 20 results, rather than the default 10:

https://data.gov.uk/api/3/action/package_search?q=cows&rows=20

Obviously these options make it easier to construct urls and the code is much clearer, but there are also other benefits to using these options which I’ll cover in another blog post soon.

This makes for a more maintainable, dynamic URL generation.  Think about an internal product dashboard, where you might need to make API calls to pull in data by product (or maybe you want to send people to an external link for each product).  This can help you parameterize your URLs quite easily.

Related Posts

Multi-Parameter Website Scraping With Power Query

Callum Green shows how to build up a URL based off of multiple parameters, scraping data from a page for each permutation of parameters: The sections highlighted in red are the parameters and sit in between some of the hard-coded URL text Code Breakdown: –          Text = http://www.boxofficemojo.com/monthly/?page= –          Parameter = [Page] –          Text = &view=calendargross&yr= –          Parameter = [Year] –          Text = &month= –          Parameter […]

Read More

Heat Streams Custom Visual

Devin Knight continues his Power BI custom visuals series: In this module you will learn how to use the Heat Streams Custom Visual.  The Heat Streams visual allows you to visualize and compare a categorical value over time. This looks pretty interesting when comparing a number of elements over time—more elements than a line chart […]

Read More

Categories

August 2016
MTWTFSS
« Jul Sep »
1234567
891011121314
15161718192021
22232425262728
293031