Monday, February 26, 2024

Benford's Law in M for Power BI



On first glance, this seems a little raw, with several steps that are wholly unnecessary.  However, it works.  Hopefully, I can revisit this and clean it up a little.

Begin in Power BI, transforming the data.  Do not rename columns, until specified.
  1. Add Column -> First Characters
    1. Extract the first digit of the numbers to be analyzed.
  2. Sort Lowest to Highest
  3. Click Column Title for First Characters Column
    1. Add as New Query, which will appear as a list.
    2. Convert List to Table [COLUMN1]
  4. Sort [COLUMN1] Lowest to Highest
  5. Group By (no change to default screen)
  6. Sort [COLUMN1] again, if needed to order
  7. Create Index Column beginning with 1
  8. Create Custom Column [COLUMN]
    1. List.Sum(List.Range(#"Added Index"[Count],0,[Index]))
  9. Create Custom Column [COLUMN.1]
    1. [Count]/List.Sum(#"Added Custom"[Count])
  10. Change [COLUMN.1] to %
  11. Add Column from Examples for Benford’s Law [COLUMN.2]
    1. 0.301
    2. 0.176
    3. 0.125
    4. 0.097
    5. 0.079
    6. 0.067
    7. 0.058
    8. 0.051
    9. 0.046
  12. Change [COLUMN.2] to %
  13. Rename
    1. [COLUMN.1] = Actual %
    2. [COLUMN.2] = Benford %
  14. Graph

Friday, February 23, 2024

Yellow Signs of Spring


Stumbled upon these yellow Crocus poking up out of the leaves the other day.  Spring is here very early again this year.  If it is coming now, the summer will undoubtedly be another scorcher.

Sunday, February 18, 2024

Sunday Trail with the Parkville Girls


Out on the trail again, these guys really like to roam about this location.  Getting to the waterfall is only half the fun.  The other half belongs to hopping across the old water shoot at the foot of it.  Not this time though.  Things were a little slicker than usual in that area.

Sunday, February 11, 2024

New Discovery in the Maple Woods


While out hiking this afternoon, a typical diversion from the trail to check out the "Witch's House" led to the discovery of an old farming implement rusting away beneath the trees.  

I am not sure why we never noticed it before.  Perhaps, it is just perfect time of year for such a discovery.  All the leaves have fallen away, and the winds have swept a good portion of them to other locations.

Either it is an original combo of some sort, or there are a couple of different objects clumped together.  Parts of it appear to be an antique hay rake.  Another part looks like that of a loader, while yet another portion looks like that of a sickle mower.


Thursday, February 8, 2024

Competition versus Collaboration

 Rulers encourage competition in order to discourage collaboration.

- Todd Comer




Popular Variations