A Programming Challenge: Fringe Scheduling (Updated)

userpic=fringeAs we are entering the season of the Hollywood Fringe Festival (FB) again, meaning over 350 shows and events spread over Hollywood and West Hollywood during the month of June, it is worth reconsidering the problem of how to best schedule the shows you want to see in the time you have within your budget. My current solution has been to build a spreadsheet of shows that I’m interested in with all their times and durations, sort by start day and time, and try to do a best fit by visual methods. Here’s last year’s schedule as an example.

But this is an imprecise method, and truthfully, a royal pain to set up. Two years ago I presented a programming challenge to address the problem. No solutions came out of it. So I’m trying again. Now I’m not an actor, director, producer, or anything connected with the theatre industry, other than an audience member. I am, however, a computer scientist. I’m a software engineer, and I know how to draw up specifications for problems to be solved. Scheduling the Fringe is a solvable problem, although perhaps not NP complete and a bit travelling salesmanish.

Here’s my challenge to you: I’m going to lay out the problem as I see it. Can you develop an app or a web page that can solve the problem in a usable fashion? No pay involved other than the glory of the challenge, but I will pass any good results on to the folks at the Fringe.

Here’s the problem:

  • You have a database of shows and events. Each show has webpage link, a title, a venue, a ticket price, a running time, and some set of performance times.
  • You have a database of venues, each with a street address (which you can likely use a Google interface to get GPS coordinates and walk time).
  • You have a list of shows and events that someone is interested in, together with what we’ll call an interest level: 0 – no interest to 3 – must see.  This could be an added parameter on the current Favorites list (go to the website, create a user, and then you can save favorites), or it might be entered in some other way.
  • You have a list of times for which the person is available, including some times marked a “meal breaks”. For example, I might be available weekends between 11am and 11pm, with a 1 hour dinner break after 5pm. You get to determine the most user friendly way to specify this.  Perhaps this could interface with Google Calendar?
  • You have a desired dollar amount they want to spend on tickets.

Given these inputs, produce a best fit schedule, that includes as many of the highest priority shows as possible, then as many of the next priority tier down, and so on for priorities 1-3. You need to take into account walking time between venues, or if the distance between venues exceeds the walking time by 15 minutes, driving and parking time (parking can take up to 15 minutes if you aren’t lucky). You could build into the schedule transportation between non-walkable venues via Lyft or Uber. You need to take into account meal breaks. Allocate 10 minutes before a show to allow time to check in and get seated. Make sure the total cost does not exceed what the user has indicated.

Ideally, this tool might even connect to the ticketing system (including purchasing Fringe buttons) such that once a schedule is set, it can be ticketed. There might be the need to adjust if a show is sold out of tickets. Ideally, whatever it ticketed could then be saved to Google Calendar or whatever the Mac folks use.

For now, build the databases as you see fit. If you need, I can talk to the Fringe folks and get you information on the JSON/XML API to interface with their site.  Ideally, this should be something usable by folks used to normal websites (i.e., not a complicated interface). Who knows, you might be able to design it as an app.

I think this is a solvable problem, and might actually be a good assignment for a class as an example of a real world problem. Feel free to post questions here, and either I’ll answer them based on my experience, or I’ll pass them to the Fringe for resolution.

OK, Go….


Interesting Visualizations

Visualizations are fascinating things. Taking data and then adjusting a map based on that data can often provide insight that would not be readily apparent otherwise. Here are some examples I’ve seen over the last few weeks that have, at least for me, made me realize something I hadn’t realized before:

  • Segregation in America. We like to think of America as a diverse society, a melting pot of peoples and cultures. But in our day to day reality, is it? Is the mixed neighborhood we see in the media the reality? The answer is, unsurprisingly, no. Here’s a fascinating article from the WaPo that uses maps to highlight segregation in America (if you run into their paywall, use Incognito or Private mode). As the article notes, “…some cities remain deeply segregated — even as the country itself becomes more diverse. To explore these national changes, The Post analyzed census data from 1990, 2000, 2010 and the latest estimates from the 2016 five-year American Community Survey. Using that data, we generated detailed maps of the United States using six race categories: black, white, Hispanic, Asian/Pacific Islander, Native American and multi-race/other for the available years.”  The maps show significant segregation within each city, and for most cities, allow you to enter an address to see how segregated or diverse your local community is.
  • Jews. Here’s a map that purports to show American Jews by county as of 2011. There’s a bit of controversy over it, but for me the main takeaway is how concentrated the pockets of Judaism are, and how empty other areas are. If you were to correlate this to areas where antisemitism is the strongest, my contention is that antisemitism flourishes where Jews are scarce. If people don’t see Jews regularly, they fear the unknown. Now connect this to the first map, and explore the theory of whether the areas of the strongest hatred of the immigrant and the Muslim are precisely those areas that have the fewest immigrants and Muslims. If we don’t see diversity — if we see people only as categories and not people — hatred flourishes. Stereotypes are believed, and fears magnify. These two maps, taken together, show why we have so much work to do in this country.
  • Density. This map (and alas I don’t have anything better than the FB image) shows areas with equal population: first the coasts, and then the major cities of NYC and LA. Again, this visualization explains quite a bit, especially when you think in terms of politics. The politics of population dense areas — and the needs and concerns — tends to be very different than the less dense areas. The nature of crime is different, the diversity is different, the pressing needs of homelessness and economic distribution are different. Is it any wonder there is such a tension between the dominance of heavily populated areas in the popular vote vs. the power of less dense areas in the electoral college? [ETA: Here’s a better source for this mapping, which points to an even better source.]
  • Property Value. A similar interesting visualization comes by looking at property values. A handful of counties in the US account for the bulk of the value of the property in the US (and guess where those counties are — especially in light of the previous three maps). This demonstrates one reason behind some political trends we are seeing (combined with the adage from the musical 1776 about conservatives: most people would like to protect the possibility of being rich than face the reality of being poor). Here’s an example: “New York City’s 305 square miles make up 8/1000ths of 1 percent of the land area of the United States. Yet New York City accounts for 5 percent of the nation’s housing value—more than every single state but four (one of which is, of course, New York state).” The article’s conclusion is also interesting: “Folks who can’t afford to live in those places don’t get to take advantage of those labor markets. The demand to live in these places is soaring, but the desire among incumbents to accommodate newcomers is low. Hence NIMBYism, high housing costs, severe inequality—the whole shebang.”

In terms of non-map visualizations, here are two: