Showing posts with label Zürich. Show all posts
Showing posts with label Zürich. Show all posts

Thursday, 12 December 2013

Tweaks to CrowdPee: a better tweet and nicer results

I've just made a couple of tweaks to CrowdPee:

  • The tweet sent to request information from Twitter users has changed. It now says: Hi! Could you answer three quick questions about the toilets at (location)? (url) Thanks! Hopefully this will be less confusing.
  • Results are now available to download in CSV and JSON format, as well as a slightly prettier HTML table.

Friday, 29 November 2013

Updates on CrowdPee

As I mentioned in the previous post, the Zürich Open Data Hacknights were a good opportunity to get started on gathering data on the available toilets in Zürich. Together, David Stark and I built a website that hosts a questionnaire for each of our locations, and a Twitter bot to ask people to fill it out.

NearbySources, the website we made, is a system for crowdsourcing information about places from people who are there. Get in touch if you're interested in using it for a project of your own.

We presented our progress so far at the final Hacknight, using the slides below. Amazingly, when the projects were voted for at the end of the night, we came in second place! It felt great to see that so many people were interested in getting this useful information out there.



From conversations at the event and later, we've come up with the following to-do items:

  • Make nearbysources.com questionnaire searchable to add data - done!
  • Add a 'more info' text to the questionnaire, and link to it from the location-questionnaire pages - done!
  • Enable tweeting at the bot to receive a questionnaire
  • Improve the results display and export function
  • Include the coordinates of each location in the results

@CrowdPee has seen several retweets and favourites on Twitter (and, most importantly, some data on toilets!). Unfortunately, it's also been suspended once on suspicion of spamming. This can happen to even helpful bots, as this article on the @FeelBetterBot shows. (Thanks to Suzy Hamilton for that link.)

Here are the changes we've made, which will hopefully make the bot more helpful for everyone:
  • When it detects a geotagged tweet from within 10km of a location of interest, it will ask to follow the user who posted it. They are near enough to Zürich that they might visit one day.
  • When it detects a geotagged tweet from within 100m of a location of interest, it checks whether it already follows that user. If so, it will send it the link to the questionnaire about that location.
  • If a user follows the bot, it will send them a questionnaire for any other location they tweet from. If not, it only ever sends one tweet.

I hope that by only tweeting at people it follows, after they've had a chance to block it, the bot will look less spammy.

Some improvements to identifying nearby locations:
  • We originally filtered the public Twitter stream by location, to get only tweets from the area around Zürich:
    • stream.filter(locations=[8.41, 47.31, 8.62, 47.48])
  • Unfortunately, this filtering didn't always work, for reasons only Twitter knows. The bot followed a lot of people in the Czech Republic and France before we realised this! This is why it now double-checks that a tweet is within 10km of a location of interest.
  • The bot also seemed to be fixated on only a few locations. This was because we were asking for the origin of the bounding box of the 'place' of the tweet:
    • lng, lat = status.place.bounding_box.origin()
  • It now asks for the actual coordinates of the tweet, and the problem is solved.
    • lng, lat = status.coordinates['coordinates']

The next improvements will be to the results. They should be exportable in at least CSV and JSON format, and displayable on a map. I will also upload them to the safe2pee.org database.
Any comments or suggestions for CrowdPee are very welcome!

Friday, 25 October 2013

CrowdPee

David Stark, Vincent van der Lubbe and I are taking part in the Zürich Open Data Hacknights 2013, a four-week-long challenge using the open geographic data provided by the city of Zürich. The goal is to help people make location-based decisions intuitively.

Naturally, we are working on the problem of gender-neutral toilets! Our project wiki page is here: CrowdPee.

As mentioned before, the official public toilets in Zürich are non-gendered (apart from urinals), but we want to get lots more information. One dataset that caught our eye was the list of licensed premises. We're going to use that list as a starter set and collect data on their toilets in two ways:


  1. Using crawlers to find contact details for these establishments, and emailing them to ask.
  2. Using Twitter / Flickr / etc. bots to find geotagged updates from their locations, and asking people to fill out a quick questionnaire about their toilets.

CrowdPee data collection diagram

Since the locations we're targeting are places that sell alcohol, we will probably mostly be approaching people who are out enjoying themselves. Vincent proposed that the questionnaire should be as short and as fun to fill out as possible, with pictures rather than radio buttons (he hates radio buttons!) and easy to complete on a phone. It could also be useful to give something back to the user when they complete a questionnaire ... a picture / video / joke / voucher / something else? What's more, since we are anticipating that people will be answering our questions on smartphones, why not have them upload a photo of the toilets at the same time? David pointed out that the photo and questionnaire would have to be sent separately, since a webpage cannot communicate with a smartphone camera. Something to think about.

We will also need to make a database to store the returned information, and of course, the more questionnaires that are filled out for a venue, the more reliable the data will be. To keep things simple for the responders, we agreed to limit ourselves to the following questions:

  1. Are the toilets unisex, or gendered?
    • Safe2pee.org distinguishes between 'genderfree' and 'single stall or locking'. Maybe we should too?
  2. Are they accessible for people using wheelchairs?
    • Accessibility can be much more nuanced than this, of course. Is this too simplified?
  3. Are there baby-changing tables, and are they in the men's toilets too?
    • David suggested this question, an important consideration.

We have started work on the Twitter bot, using Tweepy and with Will Thompson's fewerror bot as a handy base. Our code is here. So far, we can identify tweets within about 500 metres of a known restaurant in Zürich. The next step will be making a questionnaire for them to visit. We might need help with the design, as none of us are artists!