British Columbia

How much Halloween candy to buy solved by Trick-or-Treat Onslaught map

Census-driven data visualization tool shows how many kids could come knocking at your door.

Census-driven data visualization tool shows how many kids could come knocking at your door

A Vancouver software developer has created an interactive map that shows how many potential trick-or-treaters are in your neighbourhood. (Jens von Bergmann)

A Vancouver software developer is helping to solve an age-old question: how much Halloween candy should you have stocked up on when you swing by the store tonight?

Jens von Bergmann had been working on a census-mapping software tool with a colleague when an idea struck him.

"We were thinking, wouldn't it be nice to make a map using census data to show where all these trick-or-treaters live and … how many of those will maybe show up at my door?"

The Trick-or-Treat Onslaught map breaks down the number of children aged five to 14 by geographical area.

"There are very clear areas that show up quite clearly on this map, and those are the prime trick or treating areas," he said. 

So if you live in south Surrey, you'd better stop reading this and get to the supermarket now — with a shovel. But if you live in Kitsilano, throw another log on the fire and put your feet up. 

How accurate?

The data used to put the maps together came from the 2011 census, but von Bergmann is satisfied that it will still serve its purpose for most Metro Vancouverites.

"The age distribution doesn't change that much over time, so it's still going to give fairly accurate information," he said.

Where there might be trouble is in new neighbourhoods like Olympic Village, which have filled out in the past few years. 

There is one important aspect about trick or treating that von Bergmann was not able to map out, however.

"If you're looking for good candy, I don't think I can really help out," he said. 

And for those who like to scarf back extra inventory, it's always a safe bet to stock up — just in case. 

'Haunted houses'

Helping people to hoard candy wasn't von Bergmann's original intent when he built the census data mapping software. 

What he's really hoping to get at are ways for Vancouverites to better understand issues like housing affordability.

That's why another Hallloween map he created is of "haunted houses": dwellings defined by Statistics Canada as "not occupied by usual residents."

In other words, empty homes in a city full of people looking for cheaper housing. 

"I hope that by making this census data more accessible, it will allow people in Vancouver to have a more fact-based discussion on the issues," he said.