Where most traffic tickets are written in Dallas

Wondering where most traffic ticket are written in Dallas? The below heatmap is from a dataset that includes Dallas (city) tickets 2004-2012 and Dallas County tickets 2006-2012. (Beginning and end years are partial.)

I am assembling this dataset for my in-progress doctorate. (I am a doctoral candidate.)

Heat map of traffic tickets written in Dallas

A couple of notes to help interpretation:

  • This is for all officer-written traffic tickets: speeding, red light running, paperwork violations, equipment violations, etc.
  • Does not include:
    • Tickets unrelated to traffic, like disturbing the peace or drug possession.
    • Parking tickets.
    • A modest % of tickets that I could not geocode due to no address, bad address data, or limitations of my geocoder.
    • Portions of Dallas outside Dallas County.
    • Tickets written by other jursdictions. I left out Texas Department of Public Safety because they have hardly any activity in Dallas County except for NTTA freeways. Dallas heavily patrols the NTTA-owned Mountain Creek Lake Bridge, however!
    • Tickets sent directly to county courts instead of municipal or JP courts, like DUI.
    • Automated ticketing machines like Dallas’s red light cameras.
  • This may modestly understate Dallas County sheriff and constable tickets because I have about 2 more years of Dallas city tickets in here.

I find it surprising that the most significant traffic enforcement activities are generally not along major roadways, but rather are in areas of town commonly perceived as dangerous.

Two huge peaks are at the Five Points area (Park Ln. east of US 75) and Ferguson/Buckner. Other obvious areas of emphasis:

  • Downtown
  • Maple and Wycliff
  • Just north of Bachman Lake
  • Pleasant Grove
  • Oak Cliff
  • Fair Park
  • North Skillman
  • Red Bird area

It’s as if traffic enforcement is largely being used as a pretext for arrests and searches that might otherwise be difficult to pass constitutional muster. That may be interesting as commentary, but it is not a focus for my research. I’m really focucing on the safety effect of enforcement.

There is an apparent focus on intersections, although it’s possible that this is an artifact of officers writing in the nearest intersection for the ticket’s address.

Which lanes get the most speeding tickets

Sometimes my doctoral research turns up interesting data. Last time it was Texas’s worst speed traps.

This time, I found that a small portion of Dallas County Sheriff and Constable* traffic tickets indicated which lane a speeding citation came from. I teased out that data and got this:

Note that this is mainly for freeways.

Lesson learned? Stay out of the left lane to avoid speeding tickets.

*Constable traffic patrols were disbanded a few years ago, but my dataset includes their activity.

Show all Sitecore Active Directory users

I manage a Sitecore installation that’s integrated with an enterprise Active Directory.

We have over 11,000 accounts in our Active Directory. I needed a list of the Sitecore users, who are only a small percentage of the 11,000.

We have nothing in Active Directory that sets them apart, like group membership.

We architected our solution so that users are never assigned directly to items; users are members of Sitecore roles, and we assign Sitecore roles to items. All I have to do is rifle through all my Sitecore roles.

So how do I find my users? It took a little C#. Here’s the core code:

var roles = Sitecore.Security.Domains.Domain.GetDomain("sitecore").GetRoles();
foreach (var role in roles)
{
    foreach(var roleMember in Sitecore.Security.Accounts.RolesInRolesManager.GetRoleMembers(role, false))
    {
        if (roleMember.AccountType == AccountType.User)
        {
            var userObject = Sitecore.Security.Accounts.User.FromName(roleMember.Name, false);
 
            // only adding SMU domain users
            if (userObject.Domain.Name == "myActiveDirectoryDomain")
                AddUserToList(userObject);
        }
    }
}

This gets all Sitecore domain groups and extracts all users who are a member of my corporate domain. Of course, you’ll replace myActiveDirectoryDomain with your own domain name.

I created a separate AddUserToList method to handle adding these items to a Dictionary:

private void AddUserToList(User user)
{
    if (!_users.ContainsKey(user.Name))
    {
        _users.Add(user.Name,user);
    }
}

After the core code runs, you’ll need to code your own stuff to spit out what’s in the dictionary.

Here’s what I used:

foreach(var user in _users)
{
    var row = new TableRow();
    OutputTable.Rows.Add(row);
 
    row.Cells.Add(new TableCell { Text = user.Value.Profile.UserName });
    row.Cells.Add(new TableCell { Text = user.Value.Profile.FullName });
    row.Cells.Add(new TableCell { Text = user.Value.Profile.Email });
 
    if (user.Value.Profile.FullName.Length == 0)
    {
        row.CssClass = "alert";
    }
 
    var rolesCell = new TableCell();
 
    foreach (var role in RolesInRolesManager.GetRolesForUser(user.Value, false))
    {
        if (role.Domain.Name == "sitecore")
        {
            rolesCell.Text += "
 " + role.Name;
        }
    }
 
    rolesCell.Text = rolesCell.Text.Substring(7);
    row.Cells.Add(rolesCell);
}

Note that I already had a Table named OutputTable on my ASPX page.

Tadaa! The result is a list of all my domain members who are Sitecore users.

Absolve Chick-fil-A guilt with Gay Credits!

Carbon credits are sold as a way to buy indulgences offset carbon emissions.

I propose Gay Credits to absolve Chick-fil-A guilt. They’re cheap, only one penny per $10 of Chick-fil-A spending!

Here’s why:

Chick-fil-A donated $5 million to anti-gay groups over 8 years (2003-2010). Over this time, Chick-fil-a’s total sales were $18.8 billion.

What percentage of that $18.8 billion went to anti-gay groups? $5 million ÷ $18.8 billion = 0.027%. That is, 27 thousandths of a percent. In other words, for every $10 you spent at Chick-fil-A, about a quarter of a penny ($0.0027) went to an anti-gay group.

If this guilts you, you can have four times the impact of Chick-fil-A on the culture war if you donate only 1 penny to a pro-gay group for every $10 you spend at Chick-fil-A. Yes, just one penny!

Each penny is a Gay Credit, and each Gay Credit absolves $40 of Chick-fil-A purchases!

Now how do I make a market for this…

A message from the author

The point here is that one’s contribution to an anti-gay group through buying at Chick-fil-A is smaller than a rounding error, and you can 4X Chick-fil-A’s impact for almost nothing.

All this aside, public sentiment is clearly going against the anti-gay groups. Chick-fil-A’s donations aren’t affecting the long-term trend, which is clearly favoring equal rights for gays.

Appendix

Chick-fil-A’s annual sales numbers:

Upgrading hardened Sitecore content delivery environments

How do you upgrade hardened content delivery (CD) environments? Ours are so hardened that you can’t even get to /sitecore/admin/UpdateInstallationWizard.aspx.

Here’s how. It can be tedious, but these make it easier:

  1. CDs are mostly stripped-down instances of full Sitecore environments.
  2. Any needed database changes are handled when upgrading the content mastering (authoring) environment.

You only need to do 3 things on CDs.

But first, two notes:

  1. If you upgrade the CDs before you’ve upgraded the content mastering (CM) environment, you may have unstable CDs until the CM upgrade is done.
  2. Sitecore’s .update files are really Zip files. Just open it with your favorite Zip program, like 7-Zip, and it works like any other Zip file.

For each update file, do the following three steps. You must perform them in the release order of the update files, starting with the oldest release.

1. Add new or changed files

Extract everything in the addedfiles and changedfiles directories of the update file. You’ll extract them over the web root. Tell your Zip program to overwrite existing files.

2. Delete files no longer needed

This is the hardest part. Inspect the update package’s deletedfiles and deletedfolders directories of the update file. Every file (not folder) under each corresponds to a file or folder under your web root that needs to be trashed.

Note the wording: “every file“. For example, in Sitecore 6.5.0 rev.110602_fromv640rev101012_2.update, there is a file named AuthoringFeedback under deletedfolders\sitecore\shell\Applications\Analytics. That means you would delete the directory at sitecore/shell/Applications/Analytics/AuthoringFeedback under the web root.

You may have to dig deeply and thoroughly to find all files and directories.

3. Edit .config files.

Do all .config file changes that correspond to the update package you just handled. A list of .config file changes are at http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/webConfig.aspx.

Wrapping up

If you’re going through multiple upgrades, it’s tempting to do all them at once–do all the file additions at once, then all the file deletions, and then do all the .config changes. This might work as long as you work through the update files in their release order, starting with the oldest release, and if Sitecore didn’t delete something and add it back or vice versa.

For example, suppose you were doing four updates at once. In update #2, a file named x.png was deleted, but then it was added back in update #4. If you do all your file additions first, then do all deletions 2nd, your final state will have no x.png.

As long as you’ve been careful and did the CM environment upgrade first, the CDs should “just work” when done.