Gathering census data is essential to understanding how a population connects to a particular geographical space. The U.S. requires thousands of agents to complete one census every 10 years.

In 2012, however, one young Swedish man took it upon himself to complete a thorough census of the entire earth — well, Middle-earth.

Thanks to Emil Johansson, creator of LotrProject, we now know that the life expectancy of a hobbit is 96.24 years. Bilbo Baggins lived until age 131, making him the second oldest halfling of all time (behind Sméagol). But his cousin, Lotho Sackville-Baggins, had the shortest hobbit life, dying at a mere 55 years young.

And can you believe that women comprise less than 20% of Middle-earth's population? Even the most dapper dwarf must have a hard time getting a date under those circumstances.

Essentially, the site is a series of detailed data visualizations that explain the people and history of J.R.R. Tolkien's famous fantasy realm, Middle-earth. What started as a huge genealogy expanded into a series of well-conceived charts, graphs, timelines and commentary.

The interactive chart below shows the death ages of Middle-earth inhabitants, sorted by race. Elves are not included because they are generally immortal. You can zoom in on a certain part of the chart by highlighting it.

While it might sound like incredibly nerdy whim, in many ways LotrProject represents everything that is great about the Internet. It's a place where nerds are rockstars and vice versa; data and detail shine; and crowdfunding makes previously impossible feats happen on a daily basis. Basically, the Internet provides resources and a venue for any motivated, passionate, talented and creative person to share his or her ideas with others.

Starting out as boyish fancy and evolving into a nerdish hobby, LotrProject has quickly gained popularity. Johansson has received numerous glowing reviews for his work. He was invited to speak at TEDxGöteborg in October, and to appear at Hobbit Con in January 2013.

Here's the story of how a 21-year-old chemical engineering student took his place among the stars of cyber space.

Starting the Project

For LotrProject, Johansson surveyed 923 characters mentioned in Tolkien's classic books — The Hobbit, The Lord of the Rings and The Silmarillion. While he launched the website in January and expanded upon it throughout the year, Johansson has actually been working on the project as a hobby for much longer.

As you might imagine, Johansson has become very familiar with Tolkien's literature. He has lost count of exactly how many times he has read the books, but he estimates having read The Lord of the Rings at least once annually since 2001.

About seven years ago, Johansson started sketching out a comprehensive genealogy to help keep all the characters straight while reading The Silmarillion, the arcane prequel to Tolkien's better-known works. Eventually, he categorized just about every single character mentioned by the author.

SEE ALSO: 'The Hobbit' Theme Cover by Cello and Piano [VIDEO]

Though he always dreamed of publishing this work on the Internet, he had very little experience in programming, so he never moved forward with the idea.

The project didn't come to fruition until several years later, after Johansson had enrolled at the Chalmers University of Technology in Gothenburg, Sweden. Perhaps buoyed by the aura of being a university student or maybe just for a distraction from his work, he decided to revisit his dream of publishing his genealogy.

"It was very spontaneous," Johansson tells Mashable. "Studying any subject of engineering, you kind of learn to deal with problems and things that you don't know anything about, and I didn't know much about developing genealogies on the web. I just wanted to have that challenge."

Starting out, Johansson only had a cursory knowledge of programming, but a was "an experienced Google user." He taught himself PHP and JavaScript and eventually realized his longtime dream of publishing the genealogy.

"I published it and put it out there and didn't think that I would receive any feedback, at all, but I did," he says. "That kind of just struck me as amazing, that someone appreciated this."

Johansson decided to expand upon the initial genealogy by adding interactive charts and tables, as well as a geospatial timeline of events cataloguing the entire history of Middle-earth.

Eventually, LotrProject's popularity necessitated a better hosting solution. Since the site doesn't generate revenue, however, Johansson decided to attempt to crowdfund via Indiegogo. His campaign met its goal of $600 within two days.

Johansson then decided to build an Android app, which has already been downloaded 1,000 times. He says he hopes to program an iPhone app as well, but that requires a Mac computer which, as a full-time student, is currently out of his price range. Don't despair iPhone fans — Johansson plans to borrow a computer and could have the LotrProject on iOS in early 2013.

Connecting to Middle-Earth

Gandalf tells Frodo near the outset of his journey, "All we have to decide is what to do with the time that is given us." Johansson says he decided to invest much of his own time in the LotrProject because he has always felt a sort of connection to Middle-earth.

"It's such a detailed world," he says. "Tolkien created this amazing world and put a lot of effort in it, so you can almost experience it in the same way as you experience the real world, especially the languages, which are very well thought through, and, of course, the character histories."

Johansson conceptualized the project as an "attempt at organizing this vast world into something structured." As for the main characters, Johansson says he does not identify with one in particular, but rather, certain aspects of most of them. If all this sounds a bit geeky, it is.

"You shouldn't be afraid of calling yourself a geek because every person on this planet has some interest that [he or she] is obsessed with," Johansson says. "It could be fashion, it could be cars, it could be Tolkien, it can be chemistry. I'm quite obsessed by chemistry, as well."

Connecting to Earth — the Real One

In addition to the feedback he has received from fans of fantasy fiction, Johansson also hears from educators who say they use LotrProject in the classroom. As a result, he would like to someday apply the same concepts to create educational tools that visualize real-world historical events.

"If I can move beyond fantasy worlds, I think that would be a huge step," he says.

In addition to real-world data visualizations, he also wants to create a wiki to visualize George R.R. Martin's fantasy world from the A Song of Ice and Fire series.

Though he has no plans to do any of this in the short term, that doesn't mean it won't happen. Johansson says he rarely makes plans. His creativity comes in bursts. He will conceptualize an idea and execute it within a short period of time, usually a week or two. For instance, he recently posted this nifty cheat sheet to help people remember the various dwarfs in the film version of The Hobbit.

Speaking of The Hobbit, Johansson just recovered from a cold he caught while standing on a line for three hours during a chilly December morning. Naturally, the line led to tickets for the film's debut, which was earlier Wednesday. (Sweden is one of nine countries to enjoy an early release date.)

In the U.S., we have to wait until Dec. 14 for the movie. On the bright side, that gives us plenty of time to check out LotrProject and learn all the details about the characters we'll watch during the film. For instance, when you see the dwarf Glóin, son of Groin, you might be interested to know that he is the father of Gimli, the heroic and somewhat comedic member of The Fellowship of the Ring.

"I've been very fortunate to have some kind of success, if you would call it that, with this project," Johansson says. "I now look at ideas in a different way. Who would think that the idea of making a Middle-earth genealogy would be this successful or would lead to anything at all? But it has."

For more on Johansson and LotrProject, check out the video below which shows his talk at TEDxGöteborg in October.

Image courtesy of Flickr, XRacZ