Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Turku URL, add Espoo and Oulu endpoints #2

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Conversation

pitkant
Copy link
Member

@pitkant pitkant commented Oct 29, 2024

No description provided.

@JsLth
Copy link
Collaborator

JsLth commented Oct 29, 2024

Thanks for the PR! It's seriously awesome to hear that Turku really does still run their open311 API. I checked out the other APIs you added and noticed that Espoo and Oulu seem to be test servers of some sort. Espoo returns a total of 55 service requests and Oulu only 3 service requests (see below). Can you confirm this or am I missing something important?

> o311_api("espoo")
> o311_request_all()
# Simple feature collection with 55 features and 9 fields (with 40 geometries empty)
# Geometry type: POINT
# Dimension:     XY
# Bounding box:  xmin: 24.61732 ymin: 60.14971 xmax: 24.82384 ymax: 60.23913
# Geodetic CRS:  WGS 84
# # A tibble: 55 × 10
#    service_request_id status status_notes                service_name service_code description requested_datetime
#    <chr>              <chr>  <chr>                       <chr>        <chr>        <chr>       <chr>             
#  1 339023             closed "Hei ja kiitos palautteest… Kulttuuri j… 8b24a5c3-b9… "Palaute l… 2024-09-22T13:35:…
#  2 333016             closed "Hei\r\nKiitos palautteest… Kulttuuri j… 9b42990f-ba… "Hei,\r\nM… 2024-08-03T13:23:…
#  3 336835             closed "Hei!\r\n\r\nKiitos viesti… Varhaiskasv… 56e3c44f-bc… "Espoon Ka… 2024-09-07T07:06:…
#  4 333991             closed "Hei!\r\n\r\nKiitos ilmoit… Kadut ja li… d266f8f3-ee… "Kukkaromä… 2024-08-14T10:52:…
#  5 339666             closed "Hei ja kiitos palautteest… Kulttuuri j… 8b24a5c3-b9… "Hei!\r\nS… 2024-09-29T20:05:…
#  6 337462             closed "AdminAllowsPublish"        Kulttuuri j… 9b42990f-ba… "Otaniemen… 2024-09-15T15:40:…
#  7 335963             closed ""                          Muu liikunta eb15a3d7-ba… "Hei,\r\nT… 2024-08-27T06:59:…
#  8 337358             closed "Hei ja kiitokset hyvästä … Kulttuuri j… 9b42990f-ba… "Ihan maht… 2024-09-13T15:57:…
#  9 339295             closed "Hei, kiitos palautteestas… Kaavoitus, … c97d2998-ee… "olisiko m… 2024-09-25T15:05:…
# 10 334020             closed "Hei,\r\n\r\nkiitos viesti… Kadut ja li… fb4cac25-ef… "Hiukan vo… 2024-08-14T15:09:…
# # ℹ 45 more rows
# # ℹ 3 more variables: updated_datetime <chr>, address <chr>, geometry <POINT [°]>
# # ℹ Use `print(n = ...)` to see more rows

> o311_api("oulu")
> o311_request_all()
# Simple feature collection with 3 features and 8 fields
# Geometry type: POINT
# Dimension:     XY
# Bounding box:  xmin: 25.46871 ymin: 65.00504 xmax: 25.47434 ymax: 65.01323
# Geodetic CRS:  WGS 84
# # A tibble: 3 × 9
#   service_request_id status status_notes                 service_name service_code description requested_datetime
#   <chr>              <chr>  <chr>                        <chr>        <chr>        <chr>       <chr>             
# 1 131629             closed "Kiitos palautteesta.\r\nTa… Kadut ja ti… ded30a8f-56… "Pakkahuon… 2024-09-03T11:06:…
# 2 131979             closed "Kiitos palautteesta.\r\nPo… Kadut ja ti… ded30a8f-56… "lasia tie… 2024-09-10T16:53:…
# 3 132487             closed "Kiitos palautteesta.\r\nLi… Kadut ja ti… ded30a8f-56… "Oikokadun… 2024-09-21T10:54:…
# # ℹ 2 more variables: updated_datetime <chr>, geometry <POINT [°]>

I am also still a bit hesitant regarding Turku as it seems that incoming service requests suddenly stopped on October 22. This might be the result of a moderation system that withholds new service requests until they are approved, especially since the latest updated_datetime was today, but I think it is still sensible to wait and see how this develops.

> library(dplyr)
> o311_api("turku")
> o311_request_all() |>
+     mutate(requested_datetime = as.POSIXct(requested_datetime, format = "%Y-%m-%dT%H:%M:%S.%OSZ")) |>
+     arrange(desc(requested_datetime)) |>
+     select(requested_datetime)
# Simple feature collection with 3287 features and 1 field (with 1423 geometries empty)
# Geometry type: POINT
# Dimension:     XY
# Bounding box:  xmin: 21.94247 ymin: 60.34739 xmax: 22.69818 ymax: 60.68916
# Geodetic CRS:  WGS 84
# # A tibble: 3,287 × 2
#    requested_datetime             geometry
#    <dttm>                      <POINT [°]>
#  1 2024-10-22 19:38:53               EMPTY
#  2 2024-10-22 19:19:03  (22.2338 60.46946)
#  3 2024-10-22 18:44:34               EMPTY
#  4 2024-10-22 18:30:06               EMPTY
#  5 2024-10-22 17:41:31               EMPTY
#  6 2024-10-22 17:31:38 (22.23533 60.46943)
#  7 2024-10-22 17:31:08  (22.26883 60.4513)
#  8 2024-10-22 17:03:15               EMPTY
#  9 2024-10-22 16:41:59 (22.24392 60.43447)
# 10 2024-10-22 16:30:09               EMPTY
# # ℹ 3,277 more rows
# # ℹ Use `print(n = ...)` to see more rows

Nonetheless, thanks a lot! This has the potential to put Finland back on the open311 map! 😊 May I ask how you found out about these endpoints?

@pitkant
Copy link
Member Author

pitkant commented Oct 30, 2024

6 biggest cities in Finland participated in 6Aika project between 2014-2020 (2022) where they e.g. developed these types of open data products and APIs. Most Finnish open data resources are listed on avoindata.fi -website:

Yes, I looked at these more closely and both Espoo and Oulu seem to be used for testing purposes only, those are probably not real user submitted feedback. So they should definitely be marked as questionable, maybe even remove them altogether, although I have now contacted both cities and asked them about the status of these APIs.

As for Turku, I would say that it is very much in use. Maybe there indeed is a moderation period as at the time of writing the most recent submitted feedbacks are from 23rd of October.

@JsLth JsLth merged commit 26e949e into rOpenGov:main Nov 7, 2024
7 checks passed
@JsLth
Copy link
Collaborator

JsLth commented Nov 7, 2024

I took a look at Espoo again and it seems that the data updates from time to time. According to the website you linked, they update once a day and from what I can see they actually do. Perhaps they don't advertise the service very well? I'll stay tuned with regards to Espoo and Helsinki. Again, thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants