Adventures in programming and data.
-
Diffing Analysis Service Tabular models
One of the problems we often face when diffing Analysis Services Tabular models in a collaborative development environment is that tables, columns, and relationships can often be reordered. This is because Visual Studio caches data to disk, and when the Model.bim is reloaded, the order from disk is used, and any extra items are appended…
-
Data model impact analysis with Power BI
Our current set up with Power BI is to host Analysis Services databases, and point a Power BI report to that. Due to the de-coupling of the data model and the report, there is no current mechanism to identify what fields and tables in Analysis Services are being used by which Power BI reports. I’ve…
-
Using Leaflet in a Power BI Custom Visual
For some of the spatial visualisations I’ve been working with in Power BI, I’ve had to create Custom Visuals as the out-of-the-box and visuals in the AppSource don’t quite hit the mark. I’m quite fond of Leaflet for map rendering. Here’s how I got it working with a Power BI Custom Visual. Create a new…
-
Translink GTFS
I recently became aware that Translink, Queensland’s public transport provider, openly publishes both a GTFS (General Transit Feed Specification) Static dataset and Realtime feed. The GTFS Static dataset provides information on routes, schedules, stops and pathing, while the Realtime feed provides information on current vehicle lat/long coordinates and delay information. I created a web app…
-
Offline web apps
I was doing some work with a mobile web application that had to continue to operate in a disconnected scenario, as users may intermittently go in and out of areas with mobile network reception. Adding offline support was reasonably straightforward in web browsers that support: Online/offline status to determine whether to post content to an…
-
Querying ArcGIS attribute subtypes and domains with SQL
ArcGIS geodatabases have the concept of domains, where an attribute can be restricted to a set of values, similar to a drop down list. Furthermore, geodatabases also allow an attribute to be specified as a subtype where the subtype determines which set of domains that apply to attributes. This can be used when setting up…
-
web.config for React and Node.js on Azure App Service
I’ve been creating a web application using React and Node.js, and decided to host it on Azure App Service. I had a lot of difficulty finding an appropriate web.config rewrite rules that would host static assets, redirect deep React Router links to index.html and send API calls to Node.js via iisnode. I finally came across…
-
WebdriverIO with ChromeDriver headless without Selenium
I was excited to discover that WebdriverIO supports the use of ChromeDriver running in headless mode without the use of Selenium (because ChromeDriver supports the WebDriver protocol). Here’s a starter guide (assuming Node.js is installed): Install Chrome Web Browser Download ChromeDriver Run ChromeDriver Install WebdriverIO by running npm i webdriverio Run the following file (based…
-
Multiple layouts with React Router v4
I was searching for a way to add use multiple layouts with React Router v4. I could only find examples for v3, but was inspired by the Redirects (Auth) example in the docs. I created a simple wrapper component for a Route that allows a layout prop to be passed which renders the component as…
-
Creating a ArcGIS map service raster layer in PyQGIS
It’s relatively straightforward creating layers programatically in QGIS using PyQGIS. However, the documentation isn’t clear on how to use create a raster layer from a ArcGIS map service. The list of raster providers can be found by searching for addRasterProviderDialog in qgsdatasourcemanagerdialog.cpp. There are two mandatory parts to the data source string when specifying the…