Press "Enter" to skip to content

Day: November 21, 2023

Quadratic Regression in R

Steven Sanderson needs more than a line:

In the realm of data analysis, quadratic regression emerges as a powerful tool for uncovering the hidden patterns within datasets that exhibit non-linear relationships. Unlike its linear counterpart, quadratic regression ventures beyond straight lines, gracefully capturing curved relationships between variables. This makes it an essential technique for understanding a wide range of phenomena, from predicting stock prices to modeling population growth.

Embark on a journey into the world of quadratic regression using the versatile R programming language. We’ll explore the steps involved in fitting a quadratic model, interpreting its parameters, and visualizing the results. Along the way, you’ll gain hands-on experience with this valuable technique, enabling you to tackle your own data analysis challenges with confidence.

Read on to see how you can model a quadratic relationship between one independent variable (or multiple independent variables) and the dependent variable in lm().

Comments closed

Fixing a Double Donut Chart

Amy Esselman drags a donut chart:

Here we have not one, but two donuts! It takes a while to figure out what this data represents. Based on the title, it appears that we’re meant to compare the categories of the donuts across the two charts. With the sections in different places, this is rather challenging. 

One may argue that the colors and donut form make the data more visually interesting; however, this often hinders our ability to understand the data. Let’s look at some strategies to make this information easier to comprehend.

Read on for advice around converting two donut charts into something humans can more easily interpret.

Comments closed

Getting Started with Microsoft Fabric

Eugene Meidinger is ready to be at the intersection of Dunning-Kreuger and Imposter Syndrome:

I’ve written before about struggling to learn Azure Synapse, and I’ve struggled as well with getting excited about Microsoft Fabric. I think the pitch and the potential of Microsoft Fabric is real. The issue is that it solves problems I don’t have. In my work, I don’t deal with data so big that Power BI can’t handle it. I don’t deal with data so unstructured that Power Query can’t handle it.

But I know I need to learn Fabric. Power BI is a part of Fabric, the integrations are only going to continue to improve. If nothing else, I need to be able to tell customers if they should look into using Fabric or not. So what do you do when there is a technology you aren’t excited about, but have to learn?

Read on for Eugene’s scenario, which is certainly more interesting than Adventure Works.

Comments closed

Strategies for Filtering on Bit Columns

Aaron Bertrand answers a question:

Recently someone posted a question where they couldn’t quite figure out how to construct a predicate based on a bit parameter. They tried to write a procedure like this, which wouldn’t parse, of course:

At first, I thought Aaron meant querying integer bitmasks in T-SQL, in which case, the best strategy is “don’t.” But this is a different and much more useful scenario.

Comments closed

The State of Microsoft Fabric

Reitse Eskens shares some advice:

Last week the big announcement came at Microsoft Ignite, Fabric is GA.

Very cool, a lot of noise again for this shiny toolbox, but do we need to abandon everything and focus solely on the new toys?

Before I’ll answer that question, let’s look at a few moving parts of Fabric.

I think it’s still 1-2 years out from being fully baked. My hope is that there are (or will be) enough pieces in place to make it useful for enough scenarios that people don’t notice the gaps too much. There’s a lot of potential here and I don’t want Fabric to end up with a reputation of “too much stuff is missing to use it” because that reputation is hard to shake.

Comments closed

Displaying End-User-Defined Characters (EUDC) in SSMS

James Ferebee notes a problem:

A customer opened an interesting case stating SQL Server Management Studio (SSMS) would not display EUDC (End-User-Defined Characters) properly. More information on EUDC can be found here: End-User-Defined and Private Use Area Characters. 

After testing, it was identified by default, both SQL Server Management Studio and Visual Studio encountered this problem. In contrast, Notepad.exe displayed the desired character as intended. A shared aspect of SSMS and VS is the use of Windows Presentation Foundation (WPF).

Read on to see an example of how to create an EUDC and the workaround. I’d never even heard of EUDCs before, and the steps involved to get it to work probably explains why.

Comments closed

Lakehouse Management in Fabric via mssparkutils

Sandeep Pawar scripts out some lakehouse work:

At MS Ignite, Microsoft unveiled a variety of new APIs designed for working with Fabric items, such as workspaces, Spark jobs, lakehouses, warehouses, ML items, and more. You can find detailed information about these APIs here. These APIs will be critical in the automation and CI/CD of Fabric workloads.

With the release of these APIs, a new method has been added to the mssparkutils library to simplify working with lakehouses. In this blog, I will explore the available options and provide examples. Please note that at the time of writing this blog, the information has not been published on the official documentation page, so keep an eye on the documentation for changes.

This looks to be quite useful for CI/CD work.

Comments closed

Setting a Fixed Size for Transaction Log VLFs

Paul White was assured that there would be no math:

This is all very familiar, of course, but it is also dumb. Why on earth should we have to worry about internal formulas? It seems ridiculous to have to provision or grow a transaction log in pieces just to get a reasonable VLF outcome.

Wouldn’t it be better to be able to specify a fixed size for VLFs instead?

Starting with SQL Server 2022, there is now a way though it is undocumented and unsupported for the time being at least.

Read on to see what that option is, how it works, and what the limitations are. Looking at the side effects, I’d say this is probably not something you want to jump on right now.

Comments closed