@@ -213,7 +213,11 @@ API](http://api.hel.fi/servicemap/v2/), that contains data from the
213213search_puisto <- get_servicemap(query = " search" , q = " puisto" )
214214# Study results: 47 variables in the data frame
215215str(search_puisto , max.level = 1 )
216- # > NULL
216+ # > List of 4
217+ # > $ count : int 4758
218+ # > $ next : chr "http://api.hel.fi/servicemap/v2/search/?page=2&q=puisto"
219+ # > $ previous: NULL
220+ # > $ results :'data.frame': 20 obs. of 33 variables:
217221```
218222
219223We can see that this search returns a large number of results, over
@@ -224,11 +228,62 @@ from the first page of search results.
224228``` r
225229# Get names for the first 20 results
226230search_puisto $ results $ name.fi
227- # > NULL
231+ # > [1] "Puistopolun peruskoulu"
232+ # > [2] "Kankarepuiston peruskoulu"
233+ # > [3] "Puistolan peruskoulu"
234+ # > [4] "Pihkapuiston ala-asteen koulu"
235+ # > [5] "Kaupunkiympäristön asiakaspalvelu"
236+ # > [6] "Puistolanraitin ala-asteen koulu"
237+ # > [7] "Puistolan kirjasto"
238+ # > [8] "Juvanpuiston nuorisotila"
239+ # > [9] "Kilonpuiston koulu"
240+ # > [10] "Kytöpuiston koulu"
241+ # > [11] "Pirkkolan liikuntapuisto / Uimahalli"
242+ # > [12] "Juvanpuiston koulu"
243+ # > [13] "Jalavapuiston koulu"
244+ # > [14] "Tapiolan asukaspuisto"
245+ # > [15] "Mankkaan asukaspuisto"
246+ # > [16] "Karakallion asukaspuisto"
247+ # > [17] "Leppävaaran asukaspuisto"
248+ # > [18] "Perkkaan asukaspuisto"
249+ # > [19] "Kivenlahden asukaspuisto"
250+ # > [20] "Pisan asukaspuisto"
228251
229252# See what kind of data is given for services
230253names(search_puisto $ results )
231- # > NULL
254+ # > [1] "id"
255+ # > [2] "object_type"
256+ # > [3] "municipality"
257+ # > [4] "name.fi"
258+ # > [5] "name.sv"
259+ # > [6] "name.en"
260+ # > [7] "street_address.fi"
261+ # > [8] "street_address.sv"
262+ # > [9] "street_address.en"
263+ # > [10] "accessibility_shortcoming_count.rollator"
264+ # > [11] "accessibility_shortcoming_count.wheelchair"
265+ # > [12] "accessibility_shortcoming_count.hearing_aid"
266+ # > [13] "accessibility_shortcoming_count.reduced_mobility"
267+ # > [14] "accessibility_shortcoming_count.visually_impaired"
268+ # > [15] "accessibility_shortcoming_count.stroller"
269+ # > [16] "contract_type.id"
270+ # > [17] "contract_type.description.fi"
271+ # > [18] "contract_type.description.sv"
272+ # > [19] "contract_type.description.en"
273+ # > [20] "department.id"
274+ # > [21] "department.municipality"
275+ # > [22] "department.name.fi"
276+ # > [23] "department.name.en"
277+ # > [24] "department.name.sv"
278+ # > [25] "department.street_address.fi"
279+ # > [26] "department.street_address.sv"
280+ # > [27] "department.street_address.en"
281+ # > [28] "root_department.id"
282+ # > [29] "root_department.name.fi"
283+ # > [30] "root_department.name.sv"
284+ # > [31] "root_department.name.en"
285+ # > [32] "location.type"
286+ # > [33] "location.coordinates"
232287```
233288
234289More results could be retrieved and viewed by giving additional ` search `
0 commit comments