Should I Wear Pants Today: Main photo
Should I Wear Pants Today: Landing

Should I Wear Pants Today

A website that, based on your zip code, predicts whether or not you should wear pants today depending on the temperature, wind speed, and humidity.

Details

  • Role: Concept, design and development
  • Languages: HTML, CSS3, JavaScript, PHP, MySql
  • Features: JSON feed manipulation, database design, email script
  • Client: Side project.
  • Site: Pants Today

Idea

The concept for this site started as an inside joke amongst a few friends. We would joke about how we are "anti-pants" and even made a "No Pants" Myspace page (anyone remember those?)

I was looking for a side project where I could manipulate JSON feeds and create interesting content with the results. The "Umbrella Today" site was an inspiration and I wanted to make something that also provided a daily forecast, of sorts. Thus came the idea for this site to predict whether or not you should wear pants today based on the temperature (is it just TOO hot for pants?), the wind speed (it'd be advisable to wear pants in San Francisco on most days), and humidity (this one is still tricky as some people prefer to wear pants on rainy days).

Prediction

Through some magical logic (you can view the source code and check it out), the site will let you know whether or not pants are suitable for today (although the answers skew to NO). Based on the results, the site changes its background color (orange for hot, blue for cool), rain drops appear if it's raining, and wind gusts appear if it's a windy day. You also have the option to sign up for daily emails [Hello, cron jobs and HTML emails!]. I personally find these emails incredibly useful since these 3 parameters are very indicative of what the day will be like.

Why 3 parameters (temperature, wind speed, humidity)?

I could've used the presets provided by Weather Online but I wanted to make my own predictions. I think there are 3 important factors for your pants wearing:

  • is it too hot/cold?
  • is it too windy?
  • is it raining?

As a fun aside, a random quote involving pants appears after every prediction. Future feature: Pants/trousers related songs to engage the audience a little longer.

Tech

The main site is built in CSS/HTML/JS with a sprinkling of PHP. The mailing list is based on the LAMP stack. All weather data comes from the World Weather Online API.

Press

One day, I noticed a major spike in the site traffic. As it turns out, Cafe Mom and some other blogs had discovered my new site and wrote up some articles: