Inspiration

If you're serious about finding a place to live and work, you can find yourself comparing hundreds of cities on hundreds of different variables. Making matters worse, it's often difficult to rank these variables in order of importance. For example, how can I quantify my preference for a shorter commute over a lower cost of living? Our pairwise ranking-regression system hopes to take some of the guesswork out of this process by asking users simple questions, then using their answers to zero-in on their preferences.

What it does

Our tool prompts users with simple 2-option choices, all of the form "What would you rather have in a city, option A or option B?". When the user clicks "Compute Results", we compute the ranking results of each city from their answers. The more questions the user answers, the more confident our system can be in its results. Below the main page, we print readouts describing the factors the user values most.

The technical part of our system, utilizing a technique called pairwise ranking-regression, goes in three steps:

  • Ask questions, get the user's ranking of hypothetical cities that differ on a single attribute.
  • Run a linear regression on these rankings. The weights from this regression gives us the relative importance of each factor to the user.
  • Get the user's final ranking score for each city by multiplying each variable by its weight, then adding them together.
  • Finally, display the final rankings and any readouts from intermediate steps.

How we built it

Cityscape is a web app built using R Shiny and the ECL programming language. R Shiny provides the user-facing page with questions and charts, while ECL allows us to process the user's choices and compute their final ranking of cities.

Challenges we ran into

R Shiny though fast to learn, seemed to have multiple bugs relating to its local server. This made testing our app difficult, as we often needed to identify whether the problem was caused by a code revision or was inherent to the system.

Accomplishments that we're proud of

We're most proud of learning the ECL language basics without prior experience. It was also nice to experiment with R Shiny, despite our issues with the package!

What we learned

  • When building user interfaces, it's better to use standard tools, though they may be more difficult to learn.
  • Always double-check the server IP address when you're using a remote cluster!

What's next for Cityscape - Find your perfect city!

Despite our issues with R Shiny, we'd love to get this dashboard completely operational, if only for the learning experience.

Built With

Share this project:

Updates