The Scoop

  • Home
  • Projects
  • About The Scoop
  • Fixing Journalism
  • Departments
    • Apple
    • Asides
    • Broadcast
    • Campaign Finance
    • Car Tools
    • Data
    • DIY
    • django
    • Fed Data
    • FOIA
    • General
    • IRE
    • Journalism
    • Local Data
    • Mapping
    • Miscellany
    • NonGov Data
    • Online
    • Paper Trail
    • Presentations
    • Public Records
    • Python
    • Rails
    • SLA
    • Social Network Analysis
    • Sports
    • State Data
    • Teaching
    • Work
    • XML
  • Subscribe via RSS

Represent and GeoDjango

December 19th, 2008  |  Published in Work, django | Comments (6)

For more details on Represent, see our post on the NYT’s Open blog.

Today (well, technically last night) at work we launched a beta Web application called Represent that helps New York City residents keep tabs on what their elected officials are doing. It’s the product of an idea that my colleague Andrei Scheinkman suggested when we sat down in the late Spring to kick around ideas for the Times’ internal technology challenge. We ended up being a finalist with our entry, which became the app you see today, thanks to design work by Stephan Weitberg and advice from a lot of folks.

Since Andrei and I both liked Python, and the contest asked for a working prototype, we built Represent using GeoDjango, the part of Django that makes spatial work easy enough that even I can manage it. This is my first time really dealing with GIS data, and probably the hardest part was getting all the dependencies installed the first time (after you do it once, the install becomes fairly routine, and on the latest Ubuntu version it’s simple).

So if you’re thinking about going the GeoDjango route, or trying it out, I’d offer these suggestions:

  • Go with Ubuntu Linux as your OS. It’s just easier. You can run GeoDjango on Windows, but I think I hate the Postgres Windows install and configure process more than just about anything I’ve tried to do on Windows.
  • When installing, do what the docs say. These are written by people who have already installed it. Once you start freelancing, your chance of success goes down dramatically.
  • Make sure that when you install Postgres, you test it out via the psql shell.
  • When in doubt, try the #geodjango IRC channel on FreeNode
  • When things just work, do not be surprised or await a message saying they worked.

Once you get GeoDjango installed - and it might take awhile the first time - you’ll be really impressed with how easy it is to use. I’ve written before about the power of LayerMapping, which is a huge gift to people who want to move from using Shapefiles to using GeoDjango. And there are other goodies, too, like the ability to plug into the GeoIP library to place your site visitors on a map (or configure their content based on that information). For Represent, we needed to produce KML files of each district that would display on the results pages. Turns out GeoDjango does that, too. To my eternal shame, I never really got the hang of working with Arc. Now I have a tool that suits me better.

Liz Donovan, News Researcher

December 10th, 2008  |  Published in Journalism, SLA | Comments (2)

Update: The Miami Herald’s obituary for Liz.

Liz Donovan, one of the best news researchers ever, died of lung cancer in Gainesville, Ga. Truly a pioneer among news librarians, she was instrumental in everything from research for Woodward and Bernstein during Watergate to embracing (and leading other researchers to adopt) the use of blogs, wikis and other new technologies in newsrooms. She worked at the Washington Post and Miami Herald before retiring to the mountains of North Carolina where she continued to learn and spread her knowledge (and some beautiful photographs of the area).

Liz and Margot Williams were the first to welcome me to the News Division and to encourage me to participate in conferences, the mailing list and other activities. Liz encouraged me to write about the technological challenges and opportunities faced by newsrooms, and was generous to a fault with her colleagues seeking help. She was a constant innovator, a skilled researcher and a wonderful person. Among the people in journalism, it is rare to find someone about whom no one has a bad thing to say. Liz was one of those people. I’ll miss her friendship, advice and leadership.

Deploying Django with Fabric

December 2nd, 2008  |  Published in django | Comments (2)

Since I started using Ruby and Rails last year, I’ve come to know and like Capistrano, the deployment utility that makes pushing code and databases around a lot easier than it has to be. We use Capistrano for internal and external deploys at the Times, and it’s a pretty robust tool. While working on Fumblerooski and some other projects, I was looking for a Python-based deployment utility (although, to be fair, Capistrano can be used with just about anything), and I came upon Fabric.

If you haven’t heard of Capistrano, it and similar utilities save you the trouble of typing a series of commands to login to remote servers, update your code, bounce Apache, clean up files, etc. You put all that stuff into a single file that just runs those tasks when you need them. If you have an app that you’re regularly updating, it’s a godsend.

If you’ve used Capistrano before, Fabric is pretty similar in terms of its philosophy; there’s a fabfile in your project (like a capfile for Capistrano) that contains the configuration details and your commands for deploying code, restarting servers and the like. What I like about Fabric is that it makes virtually no assumptions about what you want to do. It doesn’t default to Subversion, or git, as a VCS. It doesn’t assume much of anything, which can be a little daunting if you’re used to a bit of code generation.

But that’s actually a good thing, because you end up writing fabfiles that only contain the stuff you need to have and nothing else. There’s a Django app that ties Fabric more tightly to Django’s manage.py utility, but I’m not sure I see the need for it. Without it, you type something like “fab deploy” instead of “python manage.py fab deploy”. But it’s there.

One thing I’d like to see from Fabric is better handling for sudo tasks on remote servers. This has been raised on the mailing list, and hopefully it gets resolved soon. Otherwise I’m really enjoying its simplicity and will use it for my Django apps going forward.

Even More Fumblerooski

November 24th, 2008  |  Published in Sports, django | Comments (3)

Until I finish setting up a blog on Fumblerooski, here’s another update on the site’s development:

I’ve added team and player statistics for games in 2006, 2007 and 2008 (example), and will build out individual game stats back to 2001 (example). I’ve fixed several outstanding data issues, including bowl games, overtime games and at the suggestion of Chris McComas, moved conference affiliation from the College model to the CollegeYear model. I’ve added an ever-diminishing list of unbeaten teams.

There is, of course, so much more to do. I’ve got a list of feature ideas a mile long, plus an urgent need for some graphics (using the Google Chart API), team rankings and poll data. But now that the elections are over, I can spend some time working on the site. My long-term goal is to have Fumblerooski be a resource for people seeking to identify that one stat, to study a trend (either on the site or via APIs) or just to lose themselves in college football data. What would you like to see?

White House Beat Feature Request

September 23rd, 2008  |  Published in Journalism | Comments (0)

Ok, I love the fact that CBS Radio’s Mark Knoller keeps such good tabs on presidential travel, but can somebody please come up with a backup plan in case, heaven forbid, Knoller gets hit by a bus or something? Is this too much to ask of WH reporters? This is the kind of thing where somebody out there is going to do a better job of gathering and displaying this data on the Web. And it should be us, cause it’s our job.

Previously


Dec 10, 2008
Liz Donovan, News Researcher

by Derek | Read | 2 Comments

Update: The Miami Herald’s obituary for Liz.
Liz Donovan, one of the best news researchers ever, died of lung cancer in Gainesville, Ga. Truly a pioneer among news librarians, she was instrumental in everything from research for Woodward and Bernstein during Watergate to embracing (and leading other researchers to adopt) the use of blogs, wikis and [...]


Dec 2, 2008
Deploying Django with Fabric

by Derek | Read | 2 Comments

Since I started using Ruby and Rails last year, I’ve come to know and like Capistrano, the deployment utility that makes pushing code and databases around a lot easier than it has to be. We use Capistrano for internal and external deploys at the Times, and it’s a pretty robust tool. While working on Fumblerooski [...]


Nov 24, 2008
Even More Fumblerooski

by Derek | Read | 3 Comments

Until I finish setting up a blog on Fumblerooski, here’s another update on the site’s development:
I’ve added team and player statistics for games in 2006, 2007 and 2008 (example), and will build out individual game stats back to 2001 (example). I’ve fixed several outstanding data issues, including bowl games, overtime games and at the suggestion [...]


Sep 23, 2008
White House Beat Feature Request

by Derek | Read | No Comments

Ok, I love the fact that CBS Radio’s Mark Knoller keeps such good tabs on presidential travel, but can somebody please come up with a backup plan in case, heaven forbid, Knoller gets hit by a bus or something? Is this too much to ask of WH reporters? This is the kind of thing where [...]


Sep 21, 2008
The Difference

by Derek | Read | No Comments

One of the things I try to stress to students in my computer-assisted reporting class at GW each spring is the difference between a story based largely on anecdotes or temporal observation and the same story with the addition of a definitive analysis of data. The LIRR story in today’s Times by Walt Bogdanich, Andy [...]


Sep 11, 2008
Fumblerooski Update

by Derek | Read | 3 Comments

Some additions to Fumblerooski, as work continues:

Yearly rosters for teams (example). Thanks to the NCAA for this stuff, which goes back to 2000.
Player pages (example). These are a little odd in that they represent a player on a team for a single year, so they have links to other seasons for that player. Again, back [...]

About The Scoop

Derek Willis’ weblog on investigative and computer-assisted reporting.

Recent Comments

  • First step in bringing change: find the believers |  on Six Reasons To Look Past Caspio
  • Ed on Joyce Meyer Ministry Compensation
  • Tim on Represent and GeoDjango
  • Tim on Represent and GeoDjango
  • Strange Attractor » Blog Archive » links for 2008-12-23 on Represent and GeoDjango

Recent Posts

  • Represent and GeoDjango
  • Liz Donovan, News Researcher
  • Deploying Django with Fabric
  • Even More Fumblerooski
  • White House Beat Feature Request

Contributors

  • Derek
  • Matt

Popular

  • Methadone Overdose Deaths
  • The Times
  • On Bomb-Throwing
  • Outsourcing Database Development, or the Caspio Issue
  • Joyce Meyer Ministry Compensation
  • Trial By Caspio
  • The Original (and Future?) Facebook
  • Six Reasons To Look Past Caspio
  • Django, iCal and vObject
  • Teaching Data on the Web
  • Around the Site

    • Home
    • About
    • Projects
    • Fixing Journalism
    • Database of CAR Stories
  • Methods

    • Fanueil Media
    • Open
    • Institute for Analytic Journalism
    • CAR in Canada
    • IRE
    • MacDevCenter
    • ONLamp.com
    • Planet MySQL
    • Poynter
    • Resource Shelf
  • People

    • Mark Schaver
    • Jeremy Zawodny
    • Liz Donovan
    • Shannan Bowen
    • Matt Wynn
    • Chase Davis
    • Adrian Holovaty
    • Joe Adams
    • Matt Waite
    • Mike Hillyer
    • Mark Hamilton
    • William P. Hartnett


  • ©2009 The Scoop
    Powered by WordPress using the Gridline Lite theme by Graph Paper Press.