Aktuellt

2011

juni

tavlor
Ett sätt att presentera vad stan erbjuder är i text, en annan att visa upp var de faktiskt finns.
Nu kan du som vill veta var alla anslagstavlor i stan finns hitta dem på karta. Genom att skriva ut kartan får du även med platsbeskrivningen för varje kartpunkt så att det blir lättare att hitta tavlorna du vill använda.
På samma sätt använder vi också kartan för att visa t.ex. områden med alkoholförbud och stadens hundrastgårdar.
Visa alla anslagstavlor
Visa alla hundrastgårdar
Visa platser med alkoholförbud

Den kartfunktion som finns i Jämför service kan också användas för att visa upp information på, t.ex. alla badplatser, eller motionsspår:
Visa alla motionsspår
Visa alla badplatser

Det finns mer att hitta i Jämför service.

This post will briefly describe how developers can get information from the City of Stockholm’s Open API.
Introduction
All City Services is presented on the City of Stockholm’s website in an e-service called Compare Services.
Here you can find pre-schools, schools, home-services, nursing homes and such.
Each service unit has the following information:

  • Presentation
  • Contact person
  • Phone number
  • E-mail
  • Street Address
  • Geographical area
  • Coordinates (map/gps)
  • Pictures
  • Results from User Surveys (annually)
  • Type specific data (different for all types of service, for example: number of kids at the pre-school, the rent at the nursery home)

Presentation page on www.stockholm.se for a pre-school.
servicetuype-1
You can also retrieve data on public places in the City of Stockholm in a similar way.
The addresses for the API’s are:
http://api.stockholm.se/ServiceGuideService/?apikey
http://api.stockholm.se/PlaceService/?apikey
How to use the API

  1. Data is retrieved via HTTP / GET and the format is XML or JSON.
  2. To retrieve data the API requires an API key. Create your key on http://api.stockholm.se
  3. Api-key / authentication
    For every HTTP / GET request use the parameter ’apikey’ plus value.An “endpoint” is the last directory name before the last and final ”/”.Example:
    / Service Guide Service /
    Anything after the ”endpoint” is regarded as an ”identifier”.Examples with parameter:
    http://api.stockholm.se/ServiceGuideService/?apikey=yournotsosecretkeyvalue1234
  4. Listing / Segmentation
    Data can be accessed in different ways. Based on the results you can see how to further segment the results.
    The following method lists all possible liststings (aka ”starting endpoint”):
    http://api.stockholm.se/ServiceGuideService/?apikey=yournotsosecretkeyvalue1234
    This provides (among other things):
    <Lists>
    <List uri=”ServiceUnits”/>
    <List uri=”ServiceUnitTypes”/>
    <List uri=”ServiceUnitTypeGroups”/>
    <List uri=”GeographicalAreas”/>
    <List uri=”Files”/>
    </Lists>http://api.stockholm.se/ServiceGuideService/ServiceUnitTypes?apikey=yournotsosecretkeyvalue1234
    The url above will render the following result:
    <ServiceUnitTypeInfos>
    <ServiceUnitTypeInfo id=”9911eb71-854b-4033-9f90-00ab2a72d739″singularName=”Personlig assistans”/>
    <ServiceUnitTypeInfo id=”a4116a6a-af53-4672-b492-01d7adeae987″singularName=”Motionssp?r”/>
    <ServiceUnitTypeInfo id=”fd27590d-11ad-4811-9327-13e5a9fe9794″singularName=”Konsthall”/>
    <ServiceUnitTypeInfo id=”3a8dadd5-e10c-415c-8b37-1a25729afffa”singularName=”Familjedaghem”/>
    <ServiceUnitTypeInfosingularName=”Kolonitr?dg?rd”/>
    <ServiceUnitTypeInfo id=”930b3308-43e9-471f-b8f4-2bf4f135e30d”singularName=”Ledsagning”/>
    <ServiceUnitTypeInfo id=”c72b4fcc-3f50-4dc4-aac3-303c6797d430″singularName=”Hemtj?nst”/>
    <ServiceUnitTypeInfo id=”f1f37ab7-8f65-40fe-97cb-31676d1bab34″singularName=”Servicebostad”/>
    <ServiceUnitTypeInfo id=”4effe8e3-ef54-4f43-8d50-372a4495d435″singularName=”Servicehus”/>
    <ServiceUnitTypeInfosingularName=”Simhall”/>
    <!– more rows –>
    <ServiceUnitTypeInfo id=”fcc0db7f-065e-43f9-94f0-fb7c4467ffde”singularName=”Vinterfotbollsplan”/>
    <ServiceUnitTypeInfo id=”ac4854fb-fba3-4d01-83ce-ff7992310846″singularName=”?tervinningscentral”/>
    </ServiceUnitTypeInfos>
    Further information on types of services
    The service type ”Swimming” where the id attribute is used as identifier in the endpoint /Service unit types / ’.
    http://api.stockholm.se/ServiceGuideService/ServiceUnitTypes/10031f76-001a-4a00-9e2a-3b1a166ebf6f?apikey=yournotsosecretkeyvalue1234
    <ServiceUnitTypesingularName=”Simhall”pluralName=”Simhallar”definitiveName=”Simhallen”timeCreated=”2009-01-07T10:23:38.217″timeUpdated=”2009-01-07T10:23:38.217″>
    <ServiceUnitTypeGroupInfo name=”Idrott/Motion”/>
    <Lists>
    <List uri=”ServiceUnits”/>
    </Lists>
    </ServiceUnitType>
    With the example above you can scroll through the entire database.
  5. Searching
    Method aka ”endpoint” using QueryString ”name” is ”ServiceUnits”
    and can be used to search among services.
    Example:
    http://api.stockholm.se/ServiceGuideService.svc/ServiceUnits?name=akalla&apikey=yournotsosecretkeyvalue1234
  6. Format
    The default format is XML. JSON is supplied by adding the ”json” as a further identifier.
    Example:
    http://api.stockholm.se/ServiceGuideService/ServiceUnitTypes/10031f76-001a-4a00-9e2a-3b1a166ebf6f/json?apikey=yournotsosecretkeyvalue1234