-
Notifications
You must be signed in to change notification settings - Fork 13
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
Update catalogue #343
Merged
Merged
Update catalogue #343
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ateucher
reviewed
Jul 9, 2024
So... this is passing now with a couple of (rather big) caveats:
|
@ateucher I'll chat with the catalogue team next week re: best path for the API key. |
Currently failing with search facets. A simplified example: Current catalogue (returns populated License ID facets): httr::GET("https://catalogue.data.gov.bc.ca/api/3/action/package_search?facet.field=%5B%22license_id%22%5D&rows=0") |>
httr::content(as = "text")
#> [1] "{\"help\": \"https://catalogue.data.gov.bc.ca/api/3/action/help_show?name=package_search\", \"success\": true, \"result\": {\"count\": 3252, \"sort\": \"score desc, metadata_modified desc\", \"facets\": {\"license_id\": {\"24\": 61, \"25\": 1, \"21\": 70, \"22\": 1420, \"49\": 5, \"47\": 2, \"44\": 13, \"45\": 2, \"42\": 18, \"50\": 5, \"53\": 2, \"43\": 3, \"2\": 1637, \"48\": 12, \"52\": 1}}, \"results\": [], \"search_facets\": {\"license_id\": {\"items\": [{\"count\": 70, \"display_name\": \"Statistics Canada Open Licence\", \"name\": \"21\"}, {\"count\": 2, \"display_name\": \"Open Licence - University of Northern British Columbia\", \"name\": \"53\"}, {\"count\": 12, \"display_name\": \"Open Government Licence \\u2013 TransLink\", \"name\": \"48\"}, {\"count\": 13, \"display_name\": \"Open Government Licence \\u2013 Municipality of North Cowichan\", \"name\": \"44\"}, {\"count\": 5, \"display_name\": \"Open Government Licence - SkilledTradesBC\", \"name\": \"50\"}, {\"count\": 3, \"display_name\": \"Open Government Licence - Destination BC\", \"name\": \"43\"}, {\"count\": 61, \"display_name\": \"Open Government Licence - Canada\", \"name\": \"24\"}, {\"count\": 1637, \"display_name\": \"Open Government Licence - British Columbia\", \"name\": \"2\"}, {\"count\": 2, \"display_name\": \"Open Government Licence - BC Assessment\", \"name\": \"47\"}, {\"count\": 5, \"display_name\": \"Open Data Licence for ICBC Information\", \"name\": \"49\"}, {\"count\": 1, \"display_name\": \"Open Data Licence - Office of the Registrar of Lobbyists for British Columbia\", \"name\": \"52\"}, {\"count\": 2, \"display_name\": \"Open Data Commons - Public Domain Dedication and Licence\", \"name\": \"45\"}, {\"count\": 1, \"display_name\": \"King's Printer Licence - British Columbia\", \"name\": \"25\"}, {\"count\": 18, \"display_name\": \"Elections BC Open Data Licence\", \"name\": \"42\"}, {\"count\": 1420, \"display_name\": \"Access Only\", \"name\": \"22\"}], \"title\": \"license_id\"}}}}" "toyger" test catalogue: (returns empty) httr::GET("https://toyger.data.gov.bc.ca/api/3/action/package_search?facet.field=%5B%22license_id%22%5D&rows=0") |>
httr::content(as = "text")
#> [1] "{\"help\": \"https://toyger.data.gov.bc.ca/api/3/action/help_show?name=package_search\", \"success\": true, \"result\": {\"count\": 0, \"facets\": {\"license_id\": {}}, \"results\": [], \"sort\": \"score desc, metadata_modified desc\", \"search_facets\": {\"license_id\": {\"title\": \"license_id\", \"items\": []}}}}" Created on 2024-12-04 with reprex v2.1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Testing #342