WAMS Containerstandorte in Innsbruck

Der Verein WAMS ist ein Sozialbetrieb mit dem Ziel Arbeitsplätze für Menschen zu schaffen, die aufgrund ihrer besonderen Lebenssituationen im konventionellen Arbeitsmarkt benachteiligt werden. Ein besonderes Augenmerk des Vereins liegt auch auf dem Recyclinggedanken und der Wiederverwertung von Ressourcen. Aus diesem Grund betreut und betreibt der Verein auch Altkleidersammelstellen und verwertet das gespendete Gewand. Eine Liste der Standorte dieser gelben Container befindet sich im Flyer von WAMS, der auf der Vereinshomepage bezogen werden kann. Für all jene, denen die Innsbrucker Straßennamen noch nicht allzu viel sagen oder deren geographisches Gedächtnis lückenhaft ist, habe ich die Standorte auf einer Karte eingetragen.

Der Sourcecode ist auf Github verfügbar und hier beschrieben.

Continue reading

Calling Back: An Example for Google’s Geocoder Service and Custom Markers

I recently moved and naturally there was a lot of clothes which I do not need (read: do not fit in) any more. Throwing them away would be a waste and luckily, there is a social business called WAMS which (besides a lot of other nice projects) supports reuse and recycling. WAMS provides and maintains containers for collecting clothes on many locations in Tirol. Unfortunately, there is not yet a map available to find them easily. I took this as an opportunity for a little side project in Javascript. I am not affiliated with WAMS, but of course the code and data is open sourced here.


The idea was quite simple. I used some of the container addresses I found in the flyer and created a custom Google Map showing the locations of the containers. The final result looks like this and a live demo can be found at the Github page.


Retrieve Geolocation Information

The Google API allows to retrieve latitude and longitude data from any given address. If the address was found in Google’s database, the Server returns a GeocoderResult object containing the geometry information about the found object. This GeocoderGeometry contains the latitude and longitude data of the address. The first step retrieves the data from Google’s API by using the Geocoder class. To do so, the following JSON structure is iterated and the addresses are being fed to the Geocoding service.

The Javascript code for obtaining the data is shown in the following listing:

As the calls to the Google Services asynchronously, we need to use callbacks which are called when the function before has finished. Callbacks can be tricky and are a bit of a challenge to understand the first time. Especially the Google Geocoder methods require to work with several callbacks, which is often referred to as callback hell. The code above does the following things:

  1. Iterate over the JSON structure process each container individually -> function processContainers()
  2. For each container, call Google’s Geocoder and resolve the address to a location -> geocodeAddress(container, processContainerLocationCallback)
  3. After the result has been obtained, process the result. -> processContainerLocationCallback(container,lat,long)
  4. Update the JSON object by looping over all records and search for the correct id. Once the id was found, update latitude and longitude information. -> updateJSON(container,lat,long,printJSONCallback)
  5. Write the result to the Web page -> printJSONCallback()

The missing latitude and longitude values are retrieved and the JSON gets updated. The final result looks like this:

Now that we have the data ready, we can proceed with the second step.

Placing the Markers

I artistically created a custom marker image which we will use to indicate the location of a clothes container from WAMS.

wamsThis image replaces the Google standard marker. Now all that is left is that we iterate over the updated JSON object, which now contains also the latitude and longitude data and place a marker for each container. Note that hovering over the image displays the address of the container on the Map.

Hosting the Result

Github offers a great feature for hosting simple static Web pages. All is needed is a new orphan branch of your project, which is named gh-pages, as described here. This branch serves as the Web directory for all your files and allows to host Web pages for public projects for free. You can see the result of the project above here.


Continue reading

Cardinal Blues: St. Louis, Missouri

Recently there have been a lot of activities in order to get our RDA Recommendations for Data Citation implemented. This included a trip to St. Louis where I have been invited to discuss details about the data infrastructure at the center of biomedical informatics (CBMI) at the Washington University of St. Louis. Besides having a very productive workshop, I also got the opportunity to see a little bit of St. Louis. The city may not be within the top ten cities to visit for Europeans, but it has a lot to offer and see. Please find a few impressions below.

General Tips

The Lambert-Saint Louis International Airport (STL) is pretty easy to reach and not far away from the city. There is a local light railway connecting the airport with the city. The 2 hours ticket for the MetroLink only costs 4$ and this should be sufficient for reaching your hotel. The ticket also includes the bus. As probably in many cities in the US, public transport is not that well. It is enough to do some sight seeing, but as you will see most of the locals have and use cars. Also I was advised that public transport is not that safe after dark (as are some areas in St. Louis in general).

The bus system is quite difficult to use if you so not have a data plan for your cell phone. I would advice to buy a prepaid SIM card for the US, which I failed to do in advance. I couldn’t easily find anything suitable to buy locally, so I had to rely on my Osmand+ offline map. There is not one center in st. Louis, but rather different neighbourhoods. I found Uber to be a great alternative to the public transport in terms of convenience and safety. Not having a data plan, I had to use available Wifis to book the car. You do not need any additional data exchange, as you also receive the details via text message (e.g. number plate) and the driver would shout your name if he can’t see you immediately.

Delmar Loop and Central West End

The Delmar Loop and Central West End are both areas with a lot of restaurants and bars. An interesting place is the Blueberry Hill, where Chuck Berry played and is still playing his famous guitar riffs.

Gateway to the West

The Gateway Arch is the  landmark of St. Louis and truly impressive. I used my jetlag to be there early, which I would recommend. You can buy the tickets in advance on the Gateway Arch web site. You can go to the top of the bow with a tram, which is quite an experience. The train trolleys are pretty small but (as everywhere) there is good air condition. The view is breathtaking and you can stay at the platform a long a you want. You can also book a boat cruise on the Mississippi, but this is not really impressive. The paddle steamers are actually fake and there is not much to see besides the (still impressive) Arch and the sky line.

Close to the Arch is the Old Court House which hosts an exhibition on the dark times of slavery, where St. Louis played a central role. The visit is free. Nearby is the ball park which is also worth a visit, if you are into baseball.

Forest Park, Zoo and Museums

The Forest Park is one of the largest city parks in the world and with its area of more than 5.55 km2 even larger than the Central Park in NY (haven’t been there myself yet, but sure sounds great! :-)). The park is beautiful, but also not all areas are designed for pedestrians. The park also provides a Zoo which you can enter free of charge (and there are not even queues). The zoo is really nice and exhibits a lot of (more or less exotic) animals. There is also the Missouri History Museum and the Saint Louis Art Museum, both of which are very nice. I accidentally paid an entrance fee at the Art Museum, which adds the amazing carpets exhibition (if you are into carpets, which I am not).

City Museum and City Park

The city museum is not really a museum but rather a playground for children and adults. It is one of the more crazier sights and great fun, especially if you like to climb around. It could be quite challenge estimate if you fit through the tunnels and climbing obstacles. At some point I was afraid that I could probably make it through the local newspaper as getting stuck was very likely. Wear sport equipment.

Even more impressive is the City Garden, which features a lot of statues and sculptures from famous artists. It is an oasis in the city and a nice place to recover from the City Museum.

Botanical Garden

St. Louis also provides a very nice botanical garden, which is definitely one of the top sights. The entrance fee was just 8$ and totally worth it. Everything is very well maintained, but the blue fountain does not seem to be organic.

Continue reading