bcgov / bcdata

An R package for searching & retrieving data from the B.C. Data Catalogue
https://bcgov.github.io/bcdata
Apache License 2.0
81 stars 12 forks source link

`group` is returned as a search facet in bcdc_search_facets() but is not argument in bcdc_search() #317

Closed stephhazlitt closed 1 year ago

stephhazlitt commented 1 year ago

bcdc_search() takes all the catalogue facets except group as valid arguments, with users calling bcdc_search_facets() to find the possible values. Users can leverage bcdc_list_group_records() to retrieve records by group, but it might be confusing for users that the facet group is included in the returned data frame from bcdc_search_facets()?

Possible solutions?

bcdata::bcdc_search_facets()
#>                 facet count
#> 1              sector    50
#> 2              sector    36
#> 3              sector   187
#> 4              sector  1788
#> 5              sector    76
#> 6              sector    97
#> 7              sector   473
#> 8              sector    80
#> 9              sector   332
#> 10         res_format    34
#> 11         res_format    20
#> 12         res_format   613
#> 13         res_format   303
#> 14         res_format     1
#> 15         res_format   865
#> 16         res_format    30
#> 17         res_format   367
#> 18         res_format   165
#> 19         res_format    63
#> 20         res_format   475
#> 21         res_format    10
#> 22         res_format  1114
#> 23         res_format    29
#> 24         res_format   868
#> 25         res_format    37
#> 26         res_format    84
#> 27         res_format    15
#> 28         res_format    17
#> 29         res_format   364
#> 30         res_format   316
#> 31         res_format   536
#> 32         res_format   128
#> 33             groups    11
#> 34             groups     4
#> 35             groups     2
#> 36             groups     9
#> 37             groups    20
#> 38             groups     6
#> 39             groups    14
#> 40             groups    11
#> 41             groups    32
#> 42             groups    46
#> 43             groups     4
#> 44             groups     3
#> 45             groups     1
#> 46             groups    30
#> 47             groups     4
#> 48             groups    10
#> 49             groups    26
#> 50         license_id    66
#> 51         license_id    12
#> 52         license_id    13
#> 53         license_id     5
#> 54         license_id     3
#> 55         license_id    61
#> 56         license_id  1601
#> 57         license_id     2
#> 58         license_id     5
#> 59         license_id     2
#> 60         license_id     1
#> 61         license_id    15
#> 62         license_id  1447
#> 63  download_audience  2277
#> 64  download_audience   227
#> 65  download_audience    51
#> 66  download_audience   174
#> 67  download_audience     8
#> 68  download_audience   496
#> 69       organization     2
#> 70       organization    25
#> 71       organization    25
#> 72       organization    35
#> 73       organization     1
#> 74       organization   423
#> 75       organization     5
#> 76       organization    14
#> 77       organization     1
#> 78       organization     1
#> 79       organization    13
#> 80       organization     1
#> 81       organization     1
#> 82       organization     9
#> 83       organization     4
#> 84       organization     1
#> 85       organization     1
#> 86       organization     5
#> 87       organization     1
#> 88       organization     1
#> 89       organization    22
#> 90       organization    23
#> 91       organization    54
#> 92       organization    19
#> 93       organization    13
#> 94       organization     4
#> 95       organization     3
#> 96       organization    49
#> 97       organization    71
#> 98       organization   122
#> 99       organization    22
#> 100      organization     8
#> 101      organization     6
#> 102      organization    45
#> 103      organization    88
#> 104      organization     3
#> 105      organization    18
#> 106      organization     2
#> 107      organization    17
#> 108      organization     3
#> 109      organization     2
#> 110      organization     3
#> 111      organization    11
#> 112      organization    13
#> 113      organization     1
#> 114      organization    10
#> 115      organization     3
#> 116      organization     1
#> 117      organization     4
#> 118      organization     1
#> 119      organization     1
#> 120      organization    17
#> 121      organization     1
#> 122      organization     9
#> 123      organization     7
#> 124      organization     2
#> 125      organization     1
#> 126      organization     1
#> 127      organization    13
#> 128      organization     1
#> 129      organization     3
#> 130      organization     6
#> 131      organization    24
#> 132      organization     3
#> 133      organization   198
#> 134      organization     3
#> 135      organization     3
#> 136      organization     1
#> 137      organization    45
#> 138      organization     2
#> 139      organization     2
#> 140      organization   107
#> 141      organization     1
#> 142      organization    32
#> 143      organization     6
#> 144      organization     5
#> 145      organization     2
#> 146      organization     2
#> 147      organization     9
#> 148      organization     1
#> 149      organization     4
#> 150      organization     1
#> 151      organization    17
#> 152      organization     8
#> 153      organization     3
#> 154      organization    21
#> 155      organization     7
#> 156      organization    33
#> 157      organization   392
#> 158      organization     4
#> 159      organization    64
#> 160      organization    41
#> 161      organization    17
#> 162      organization    35
#> 163      organization     2
#> 164      organization    55
#> 165      organization    26
#> 166      organization     6
#> 167      organization    39
#> 168      organization     4
#> 169      organization    16
#> 170      organization    57
#> 171      organization    13
#> 172      organization     2
#> 173      organization     2
#> 174      organization     4
#> 175      organization     5
#> 176      organization    21
#> 177      organization    45
#> 178      organization    53
#> 179      organization     1
#> 180      organization     3
#> 181      organization     1
#> 182      organization     1
#> 183      organization    35
#> 184      organization    56
#> 185      organization     3
#> 186      organization    28
#> 187      organization    15
#> 188      organization     8
#> 189      organization     2
#> 190      organization    22
#> 191      organization    10
#> 192      organization     1
#> 193      organization     1
#> 194      organization     1
#> 195      organization     2
#> 196      organization     1
#> 197      organization     1
#> 198      organization    26
#> 199      organization     5
#> 200      organization     1
#> 201      organization     1
#> 202      organization     2
#> 203      organization     2
#> 204      organization     1
#> 205      organization    34
#> 206      organization     6
#> 207      organization    65
#> 208      organization    43
#> 209      organization    46
#> 210      organization     1
#> 211      organization    45
#> 212      organization     1
#> 213      organization     9
#> 214      organization     6
#> 215      organization    15
#> 216      organization    16
#> 217      organization     1
#>                                                            display_name
#> 1                                                        Transportation
#> 2                                                       Social Services
#> 3                                                               Service
#> 4                                                     Natural Resources
#> 5                                                               Justice
#> 6                                                     Health and Safety
#> 7                                                               Finance
#> 8                                                             Education
#> 9                                                               Economy
#> 10                                                                  zip
#> 11                                                                  xml
#> 12                                                                 xlsx
#> 13                                                                  xls
#> 14                                                                 wmts
#> 15                                                                  wms
#> 16                                                                  txt
#> 17                                                                  shp
#> 18                                                                  pdf
#> 19                                                                other
#> 20                                                           oracle_sde
#> 21                                                         openapi-json
#> 22                                                             multiple
#> 23                                                                  kmz
#> 24                                                                  kml
#> 25                                                                 json
#> 26                                                                 html
#> 27                                                                 gpkg
#> 28                                                              geojson
#> 29                                                                 fgdb
#> 30                                                                  e00
#> 31                                                                  csv
#> 32                                                          arcgis_rest
#> 33                                              Wildfire Risk Reduction
#> 34                                        Wildfire - Historical Seasons
#> 35                                            Wildfire - Current Season
#> 36                                        Vegetation Resource Inventory
#> 37                                    Strategic Land and Resource Plans
#> 38                                                         ParcelMap BC
#> 39                            Old Growth Technical Advisory Panel (TAP)
#> 40                                                Housing Needs Reports
#> 41                                           Environmental Reporting BC
#> 42                                              Data Innovation Program
#> 43                          Connectivity in BC - Request to Participate
#> 44                                                   Connectivity in BC
#> 45                       Coastal Resource Information Management System
#> 46                                                      Census Profiles
#> 47                                                             COVID-19
#> 48                                           BC Government API Registry
#> 49                                                         B.C. Tourism
#> 50                                       Statistics Canada Open Licence
#> 51                                  Open Government Licence – TransLink
#> 52             Open Government Licence – Municipality of North Cowichan
#> 53                Open Government Licence – Industry Training Authority
#> 54                             Open Government Licence - Destination BC
#> 55                                     Open Government Licence - Canada
#> 56                           Open Government Licence - British Columbia
#> 57                              Open Government Licence - BC Assessment
#> 58                               Open Data Licence for ICBC Information
#> 59             Open Data Commons - Public Domain Dedication and Licence
#> 60                            King's Printer Licence - British Columbia
#> 61                                       Elections BC Open Data Licence
#> 62                                                          Access Only
#> 63                                                               Public
#> 64                                                     Not downloadable
#> 65                                                          Named users
#> 66                                                                   NA
#> 67                                        Government and Business BCeID
#> 68                                                           Government
#> 69                     Workplace Technology and Application Development
#> 70                                                 Wildlife and Habitat
#> 71                                  Water Protection and Sustainability
#> 72                                                     Water Management
#> 73                                                     Visitor Services
#> 74                                                 Treasury Board Staff
#> 75                                              Transportation Services
#> 76                                                            TransLink
#> 77                                                       Tourism Branch
#> 78                                                Timber Pricing Branch
#> 79                                      Tenure and Resource Stewardship
#> 80                                                Student Certification
#> 81                                                     Strategic Policy
#> 82                                             Species at Risk Recovery
#> 83                           Specialized Intervention and Youth Justice
#> 84                                          Socio-Economic Partnerships
#> 85                                              Small Business Programs
#> 86                                                      SkilledTradesBC
#> 87                         Service Analytics and Standards - Service BC
#> 88                            Sector Partnerships and Emergency Support
#> 89                                                         RoadSafetyBC
#> 90                                                River Forecast Centre
#> 91                                     Resource Planning and Assessment
#> 92                                                Research and Analysis
#> 93                                                      Research Branch
#> 94                                       Rehabilitation and Maintenance
#> 95                      Regional and Inclusive Economic Recovery Branch
#> 96                                     Regional Operations - West Coast
#> 97                              Regional Operations - Thompson Okanagan
#> 98                                    Regional Operations - South Coast
#> 99                                         Regional Operations - Skeena
#> 100                                       Regional Operations - Omineca
#> 101                                     Regional Operations - Northeast
#> 102                             Regional Operations - Kootenay Boundary
#> 103                                       Regional Operations - Cariboo
#> 104                                                 Regional Operations
#> 105                                      Recreation Sites and Trails BC
#> 106                                       Real Estate Business Services
#> 107                                                        Range Branch
#> 108                                  Quality Assurance and Child Safety
#> 109                         Public Sector Employers Council Secretariat
#> 110                                                    Public Libraries
#> 111                                        Public Engagement and Design
#> 112                      Provincial Stewardship Strategies and Planning
#> 113                          Provincial Interface and Partnerships Team
#> 114                                                   Property Taxation
#> 115                                                Procurement Services
#> 116                                    Privacy, Compliance and Training
#> 117                                              Post-Secondary Finance
#> 118                                    Policy and Stakeholder Relations
#> 119                                              Policy and Legislation
#> 120                                               Policing and Security
#> 121                                             Plant and Animal Health
#> 122                                    Planning and Land Use Management
#> 123                                    Pharmaceutical Services Division
#> 124 Permitting / Authorizations and Statutory Decision Making Solutions
#> 125                                            Passenger Transportation
#> 126                                                    Open Information
#> 127                                      Municipality of North Cowichan
#> 128                                                    Multiculturalism
#> 129                                             Mountain Resorts Branch
#> 130                                Mines and Mineral Resources Division
#> 131                                                      Mineral Titles
#> 132               Major Projects and Strategic Consultation Initiatives
#> 133                         Local Government Infrastructure and Finance
#> 134                                      Liquor and Cannabis Regulation
#> 135                                                 Liquor Distribution
#> 136                                  Legislation, Policy and Governance
#> 137                                                        Lands Branch
#> 138         Labour Market Analytics, Forecasting and Information Branch
#> 139                           Laboratory, Diagnostic and Blood Services
#> 140                                                Knowledge Management
#> 141                                                      King's Printer
#> 142                                             International Marketing
#> 143                             Intergovernmental Relations Secretariat
#> 144                           Insurance Corporation of British Columbia
#> 145                       Innovation, Strategy, Policy and Coordination
#> 146                                       Information Management - TRAN
#> 147                                        Information Management - CFD
#> 148                               Information Innovation and Technology
#> 149                                    Implementation and Land Services
#> 150                                               Immigrant Integration
#> 151                                                     Heritage Branch
#> 152                                                        HealthLinkBC
#> 153                                       Health, Safety and Permitting
#> 154                    Health Sector Information Analysis and Reporting
#> 155             Health Authority - Provincial Health Services Authority
#> 156                                            Governance and Structure
#> 157                                                        GeoBC Branch
#> 158                                       Gaming Policy and Enforcement
#> 159                                               Forest Tenures Branch
#> 160                       Forest Science, Planning and Practices Branch
#> 161                   Forest Improvement and Research Management Branch
#> 162                                Forest Analysis and Inventory Branch
#> 163                                          Food Safety and Inspection
#> 164                               Fish, Wildlife and Habitat Management
#> 165                              Fish and Wildlife Compensation Program
#> 166                                            Fish and Aquatic Habitat
#> 167                           Financial Reporting and Advisory Services
#> 168                                      Extension and Support Services
#> 169                                   Environmental Protection Division
#> 170                        Environmental Monitoring and Analysis Branch
#> 171                      Environmental Emergencies and Land Remediation
#> 172                                     Environmental Assessment Office
#> 173                                                  Environment Canada
#> 174                      Employment and Labour Market Services Division
#> 175                                             Emergency Management BC
#> 176                                                        Elections BC
#> 177                                                 Education Analytics
#> 178                                                          Ecosystems
#> 179                                          Economics and Trade Branch
#> 180                                                      Destination BC
#> 181                                            Deputy Minister's Office
#> 182                                                     Debt Management
#> 183                                                      DataBC Program
#> 184                                       Data Innovation Program (DIP)
#> 185                                                    Criminal Justice
#> 186                                                      Court Services
#> 187                                                         Corrections
#> 188                                     Corporate Policy and Priorities
#> 189                                                   Coroner's Service
#> 190                                        Construction and Maintenance
#> 191                                        Connected Communities Branch
#> 192                                          Compliance and Enforcement
#> 193                                    Compensation Policy and Programs
#> 194                                             Community Gaming Grants
#> 195                                     Community Care Support Services
#> 196                           Commercial Vehicle Safety and Enforcement
#> 197                                     Colleges and Skills Development
#> 198                                          Climate Action Secretariat
#> 199                                             Civil Forfeiture Office
#> 200                                    Child Care Programs and Services
#> 201                               Business and Communications Solutions
#> 202                            British Columbia Vital Statistics Agency
#> 203                    British Columbia Container Trucking Commissioner
#> 204                                                  Better Regulations
#> 205                                                 BC Wildfire Service
#> 206                                                    BC Timber Sales 
#> 207                                                            BC Stats
#> 208                                      BC Parks - Provincial Services
#> 209                                           BC Oil and Gas Commission
#> 210                                        BC Hydro and Power Authority
#> 211                                                BC Geological Survey
#> 212                                                  BC Film Commission
#> 213                                             BC Assessment Authority
#> 214                                                     BC Arts Council
#> 215                                                         Archaeology
#> 216                                        Agricultural Land Commission
#> 217                     Access and Directory Management Services (ADMS)
#>                                                                  name
#> 1                                                      Transportation
#> 2                                                     Social Services
#> 3                                                             Service
#> 4                                                   Natural Resources
#> 5                                                             Justice
#> 6                                                   Health and Safety
#> 7                                                             Finance
#> 8                                                           Education
#> 9                                                             Economy
#> 10                                                                zip
#> 11                                                                xml
#> 12                                                               xlsx
#> 13                                                                xls
#> 14                                                               wmts
#> 15                                                                wms
#> 16                                                                txt
#> 17                                                                shp
#> 18                                                                pdf
#> 19                                                              other
#> 20                                                         oracle_sde
#> 21                                                       openapi-json
#> 22                                                           multiple
#> 23                                                                kmz
#> 24                                                                kml
#> 25                                                               json
#> 26                                                               html
#> 27                                                               gpkg
#> 28                                                            geojson
#> 29                                                               fgdb
#> 30                                                                e00
#> 31                                                                csv
#> 32                                                        arcgis_rest
#> 33                                            wildfire-risk-reduction
#> 34                                                wildfire-historical
#> 35                                                   wildfire-current
#> 36                                      vegetation-resource-inventory
#> 37                                                               slrp
#> 38                                                               pmbc
#> 39                                                     old-growth-tap
#> 40                                              housing-needs-reports
#> 41                                         environmental-reporting-bc
#> 42                                            data-innovation-program
#> 43                          connectivity-in-bc-request-to-participate
#> 44                                                 connectivity-in-bc
#> 45                                                              crims
#> 46                                                    census-profiles
#> 47                                                           covid-19
#> 48                                         bc-government-api-registry
#> 49                                                         bc-tourism
#> 50                                                                 21
#> 51                                                                 48
#> 52                                                                 44
#> 53                                                                 50
#> 54                                                                 43
#> 55                                                                 24
#> 56                                                                  2
#> 57                                                                 47
#> 58                                                                 49
#> 59                                                                 45
#> 60                                                                 25
#> 61                                                                 42
#> 62                                                                 22
#> 63                                                             Public
#> 64                                                   Not downloadable
#> 65                                                        Named users
#> 66                                                                 NA
#> 67                                      Government and Business BCeID
#> 68                                                         Government
#> 69                   workplace-technology-and-application-development
#> 70                                               wildlife-and-habitat
#> 71                                water-protection-and-sustainability
#> 72                                                   water-management
#> 73                                                   visitor-services
#> 74                                               treasury-board-staff
#> 75                                            transportation-services
#> 76                                                          translink
#> 77                                                            tourism
#> 78                                                     timber-pricing
#> 79                                    tenure-and-resource-stewardship
#> 80                                              student-certification
#> 81                                                   strategic-policy
#> 82                                           species-at-risk-recovery
#> 83                         specialized-intervention-and-youth-justice
#> 84                                        socio-economic-partnerships
#> 85                                            small-business-programs
#> 86                                                    skilledtradesbc
#> 87                                                         service-bc
#> 88                          sector-partnerships-and-emergency-support
#> 89                                                       roadsafetybc
#> 90                                              river-forecast-centre
#> 91                                   resource-planning-and-assessment
#> 92                                              research-and-analysis
#> 93                                                           research
#> 94                                     rehabilitation-and-maintenance
#> 95                           regional-and-inclusive-economic-recovery
#> 96                                     regional-operations-west-coast
#> 97                              regional-operations-thompson-okanagan
#> 98                                    regional-operations-south-coast
#> 99                                         regional-operations-skeena
#> 100                                       regional-operations-omineca
#> 101                                     regional-operations-northeast
#> 102                             regional-operations-kootenay-boundary
#> 103                                       regional-operations-cariboo
#> 104                                               regional-operations
#> 105                                    recreation-sites-and-trails-bc
#> 106                                     real-estate-business-services
#> 107                                                             range
#> 108                                quality-assurance-and-child-safety
#> 109                       public-sector-employers-council-secretariat
#> 110                                                  public-libraries
#> 111                                                citizen-engagement
#> 112                    provincial-stewardship-strategies-and-planning
#> 113                        provincial-interface-and-partnerships-team
#> 114                                                 property-taxation
#> 115                                              procurement-services
#> 116                                           privacy-and-legislation
#> 117                                            post-secondary-finance
#> 118                                  policy-and-stakeholder-relations
#> 119                                            policy-and-legislation
#> 120                                             policing-and-security
#> 121                                           plant-and-animal-health
#> 122                                  planning-and-land-use-management
#> 123                                  pharmaceutical-services-division
#> 124 permitting-authorizations-and-statutory-decision-making-solutions
#> 125                                          passenger-transportation
#> 126                                                  open-information
#> 127                                                    north-cowichan
#> 128                                                  multiculturalism
#> 129                                                  mountain-resorts
#> 130                              mines-and-mineral-resources-division
#> 131                                                    mineral-titles
#> 132             major-projects-and-strategic-consultation-initiatives
#> 133                       local-government-infrastructure-and-finance
#> 134                                    liquor-and-cannabis-regulation
#> 135                                               liquor-distribution
#> 136                                 legislation-policy-and-governance
#> 137                                                             lands
#> 138        labour-market-analytics-forecasting-and-information-branch
#> 139                          laboratory-diagnostic-and-blood-services
#> 140                                              knowledge-management
#> 141                                                    king-s-printer
#> 142                                           international-marketing
#> 143                           intergovernmental-relations-secretariat
#> 144                         insurance-corporation-of-british-columbia
#> 145                       innovation-strategy-policy-and-coordination
#> 146                                       information-management-tran
#> 147                                        information-management-cfd
#> 148                             information-innovation-and-technology
#> 149                                  implementation-and-land-services
#> 150                                             immigrant-integration
#> 151                                                          heritage
#> 152                                                      healthlinkbc
#> 153                                  health-and-safety-and-permitting
#> 154                  health-sector-information-analysis-and-reporting
#> 155             health-authority-provincial-health-services-authority
#> 156                                          governance-and-structure
#> 157                                                             geobc
#> 158                                     gaming-policy-and-enforcement
#> 159                                                    forest-tenures
#> 160                             forest-science-planning-and-practices
#> 161                        forest-improvement-and-research-management
#> 162                                     forest-analysis-and-inventory
#> 163                                        food-safety-and-inspection
#> 164                              fish-wildlife-and-habitat-management
#> 165                            fish-and-wildlife-compensation-program
#> 166                                          fish-and-aquatic-habitat
#> 167                         financial-reporting-and-advisory-services
#> 168                                    extension-and-support-services
#> 169                                 environmental-protection-division
#> 170                      environmental-monitoring-and-analysis-branch
#> 171                    environmental-emergencies-and-land-remediation
#> 172                                   environmental-assessment-office
#> 173                                                environment-canada
#> 174                    employment-and-labour-market-services-division
#> 175                                           emergency-management-bc
#> 176                                                      elections-bc
#> 177                                               education-analytics
#> 178                                                        ecosystems
#> 179                                                economic-and-trade
#> 180                                                    destination-bc
#> 181                                          deputy-minister-s-office
#> 182                                                   debt-management
#> 183                                                            databc
#> 184                                       data-innovation-program-dip
#> 185                                                  criminal-justice
#> 186                                                    court-services
#> 187                                                       corrections
#> 188                                   corporate-policy-and-priorities
#> 189                                                 coroner-s-service
#> 190                                      construction-and-maintenance
#> 191                                      connected-communities-branch
#> 192                                        compliance-and-enforcement
#> 193                                  compensation-policy-and-programs
#> 194                                           community-gaming-grants
#> 195                                   community-care-support-services
#> 196                         commercial-vehicle-safety-and-enforcement
#> 197                                   colleges-and-skills-development
#> 198                                        climate-action-secretariat
#> 199                                           civil-forfeiture-office
#> 200                                  child-care-programs-and-services
#> 201                             business-and-communications-solutions
#> 202                          british-columbia-vital-statistics-agency
#> 203                  british-columbia-container-trucking-commissioner
#> 204                                                better-regulations
#> 205                                               bc-wildfire-service
#> 206                                                   bc-timber-sales
#> 207                                                          bc-stats
#> 208                                      bc-parks-provincial-services
#> 209                                         bc-oil-and-gas-commission
#> 210                                      bc-hydro-and-power-authority
#> 211                                              bc-geological-survey
#> 212                                                bc-film-commission
#> 213                                           bc-assessment-authority
#> 214                                                   bc-arts-council
#> 215                                                       archaeology
#> 216                                      agricultural-land-commission
#> 217                     access-and-directory-management-services-adms
bcdata::bcdc_list_groups()
#>     facet count                                   display_name
#> 1  groups    11                        Wildfire Risk Reduction
#> 2  groups     4                  Wildfire - Historical Seasons
#> 3  groups     2                      Wildfire - Current Season
#> 4  groups     9                  Vegetation Resource Inventory
#> 5  groups    20              Strategic Land and Resource Plans
#> 6  groups     6                                   ParcelMap BC
#> 7  groups    14      Old Growth Technical Advisory Panel (TAP)
#> 8  groups    11                          Housing Needs Reports
#> 9  groups    32                     Environmental Reporting BC
#> 10 groups    46                        Data Innovation Program
#> 11 groups     4    Connectivity in BC - Request to Participate
#> 12 groups     3                             Connectivity in BC
#> 13 groups     1 Coastal Resource Information Management System
#> 14 groups    30                                Census Profiles
#> 15 groups     4                                       COVID-19
#> 16 groups    10                     BC Government API Registry
#> 17 groups    26                                   B.C. Tourism
#>                                         name
#> 1                    wildfire-risk-reduction
#> 2                        wildfire-historical
#> 3                           wildfire-current
#> 4              vegetation-resource-inventory
#> 5                                       slrp
#> 6                                       pmbc
#> 7                             old-growth-tap
#> 8                      housing-needs-reports
#> 9                 environmental-reporting-bc
#> 10                   data-innovation-program
#> 11 connectivity-in-bc-request-to-participate
#> 12                        connectivity-in-bc
#> 13                                     crims
#> 14                           census-profiles
#> 15                                  covid-19
#> 16                bc-government-api-registry
#> 17                                bc-tourism

Created on 2023-03-05 with reprex v2.0.2

stephhazlitt commented 1 year ago

Also not that bcdc_search() does not warn or error when group is passed as an argument, but instead seems to use the argument as search terms. This feels fragile, as sometimes it can appear to work, as records are returned but they are not strictly from the supplied group.

e.g.

bcdata::bcdc_search(group = "Connectivity in BC")
#> List of B.C. Data Catalogue Records
#> Number of records: 59
#> Showing the top 50 results. You can assign the output of bcdc_search,
#>  to an object and subset with `[` to see other results in the set.
#> 
#> Titles:
#> 1: BC Network Connectivity (multiple, wms, kml)
#>  ID: ee60bfce-e9ce-449b-ba8f-3491553ede35
#>  Name: bc-network-connectivity
#> 2: Internet Connectivity in Relation to B.C. Health Geographies Map
#>  (other)
#>  ID: fe8f959a-6a61-4bda-856f-4c4939150e9c
#>  Name: internet-connectivity-in-relation-to-b-c-health-geographies-map
#> 3: Connectivity Infrastructure Projects (csv)
#>  ID: ee53f7aa-d5dc-4897-b0c6-635dfe2f7e5e
#>  Name: connectivity-infrastructure-projects
#> 4: Elk Connectivity Corridors Merritt TSA (multiple)
#>  ID: 4079f9fc-727e-4837-81d9-8ea2eefbb57d
#>  Name: elk-connectivity-corridors-merritt-tsa
#> 5: BC Highways without Cell Service (kmz, pdf)
#>  ID: ae1470d6-d730-49e5-9fab-16215c0b6e72
#>  Name: bc-highways-without-cell-service
#> 6: Project Zones (kmz)
#>  ID: 8fbfc57f-4381-4a10-a4e8-0f335c6fe39a
#>  Name: project-zones
#> 7: BC Indigenous Business Listings (csv, html, wms, kml, multiple)
#>  ID: bdc81d33-1ab5-4882-9764-8701e8971bb7
#>  Name: bc-indigenous-business-listings
#> 8: BC Hexagonal Grid (wms, kml, multiple)
#>  ID: a3badeec-feed-41d9-b33d-5ae41c19f27d
#>  Name: bc-hexagonal-grid
#> 9: BC Ideas Exchange - Economic Development Success Stories (csv)
#>  ID: e04840a4-77fe-4175-a029-8ae195a32a9a
#>  Name: bc-ideas-exchange-economic-development-success-stories
#> 10: Welcome BC Settlement Service Providers - Interactive Web Map Data
#>  (xls, csv)
#>  ID: 5d544eb3-cb2c-4204-bd8d-452341e52c8b
#>  Name: welcome-bc-settlement-service-providers-interactive-web-map-data
#> 11: Landsat Web Map Service (xml, kml, wms)
#>  ID: ac0a7aa9-f56d-45b1-bd17-8554843de6a5
#>  Name: landsat-web-map-service
#> 12: Imagery Spot 15m Web Map Service (xml, kml, wms)
#>  ID: bcad8f9e-274b-4a29-9e06-d05def3a50c2
#>  Name: imagery-spot-15m-web-map-service
#> 13: Forest Ecosystem Networks for the Chilcotin Forest District
#>  (oracle_sde)
#>  ID: e55ea13e-7503-4109-ae46-9c1a113eaed8
#>  Name: forest-ecosystem-networks-for-the-chilcotin-forest-district
#> 14: Well Directional Survey (multiple, wms, kml)
#>  ID: 22165318-4e70-4702-8888-4a27a19855ff
#>  Name: well-directional-survey
#> 15: Pseudo Households - Underserved (kmz)
#>  ID: f7b14bb2-6c95-448d-81d7-b78003e1e847
#>  Name: pseudo-households-underserved
#> 16: Hexagonal Grid - Underserved Households (kmz)
#>  ID: ea9f2e67-f0e6-4fc4-a5b8-b6507e85d750
#>  Name: hex-underserved-households
#> 17: Community Investment Opportunities Tool (other)
#>  ID: 9b7317c9-4392-4423-a191-999ecd660eee
#>  Name: community-investment-opportunities-tool
#> 18: Community Census Subdivisions (oracle_sde, wms, kml)
#>  ID: fcdb4f20-247f-459e-a3c6-7e286fb622a2
#>  Name: community-census-subdivisions
#> 19: Metadata for Supportive Housing - E01 (json)
#>  ID: 28d17abd-e38f-4a15-bbb5-c10f6908a57e
#>  Name: metadata-for-supportive-housing---e01
#> 20: Historic City of Vancouver Fire Insurance Map (wms)
#>  ID: 1dbc0b94-54c3-4d6b-a55f-340673a5056f
#>  Name: historic-city-of-vancouver-fire-insurance-map
#> 21: Orthophoto Web Map Service (wms)
#>  ID: 3fa96b60-0260-45b7-b231-3ce4610852c0
#>  Name: orthophoto-web-map-service
#> 22: Freshwater Atlas Coastlines (multiple, html, pdf, wms, kml)
#>  ID: 87b1d6a7-d4d1-4c25-a879-233becdbffed
#>  Name: freshwater-atlas-coastlines
#> 23: Freshwater Atlas Stream Network (multiple, html, pdf, wms, kml,
#>  fgdb)
#>  ID: 92344413-8035-4c08-b996-65a9b3f62fca
#>  Name: freshwater-atlas-stream-network
#> 24: Freshwater Atlas Edge Type Codes (multiple, html, pdf)
#>  ID: 509cbf74-7ee7-44d3-a88d-4e088ea67325
#>  Name: freshwater-atlas-edge-type-codes
#> 25: Freshwater Atlas Waterbody Type Codes (multiple, html, pdf)
#>  ID: ade4f36a-1fd4-4583-8253-2b2a1bbe34ff
#>  Name: freshwater-atlas-waterbody-type-codes
#> 26: Freshwater Atlas Watershed Type Codes (multiple, html, pdf)
#>  ID: f7efa3ea-bf1c-4c4f-bb33-ba841aa076c0
#>  Name: freshwater-atlas-watershed-type-codes
#> 27: Freshwater Atlas 20K-50K Stream Cross Reference Table (multiple,
#>  html, pdf)
#>  ID: c819aef2-2cb3-43ee-a41b-77debdecd81e
#>  Name: freshwater-atlas-20k-50k-stream-cross-reference-table
#> 28: Freshwater Atlas 20K-50K Waterbody Cross Reference Table (multiple,
#>  html, pdf)
#>  ID: a5965764-a3d0-48aa-97e7-10f873cb5e78
#>  Name: freshwater-atlas-20k-50k-waterbody-cross-reference-table
#> 29: Freshwater Atlas Watershed Boundaries (multiple, html, pdf, wms,
#>  kml, fgdb)
#>  ID: ab758580-809d-4e11-bb2c-df02ac5465c9
#>  Name: freshwater-atlas-watershed-boundaries
#> 30: Freshwater Atlas Linear Boundaries (multiple, html, pdf, wms, kml,
#>  fgdb)
#>  ID: 2af1388e-d5f7-46dc-a6e2-f85415ddbd1c
#>  Name: freshwater-atlas-linear-boundaries
#> 31: Freshwater Atlas Watersheds (multiple, html, pdf, wms, kml, fgdb)
#>  ID: 3ee497c4-57d7-47f8-b030-2e0c03f8462a
#>  Name: freshwater-atlas-watersheds
#> 32: Freshwater Atlas Watershed Groups (multiple, html, pdf, wms, kml)
#>  ID: 51f20b1a-ab75-42de-809d-bf415a0f9c62
#>  Name: freshwater-atlas-watershed-groups
#> 33: Freshwater Atlas Rivers (multiple, fgdb, pdf, wms, kml)
#>  ID: f7dac054-efbf-402f-ab62-6fc4b32a619e
#>  Name: freshwater-atlas-rivers
#> 34: Freshwater Atlas Stream Directions (multiple, html, pdf, wms, kml)
#>  ID: d7165359-52ef-41d0-b762-c53e3468ff3f
#>  Name: freshwater-atlas-stream-directions
#> 35: Freshwater Atlas Named Watersheds (multiple, html, pdf, wms, kml)
#>  ID: ea63ea04-eab0-4b83-8729-f8a93ac688a1
#>  Name: freshwater-atlas-named-watersheds
#> 36: Freshwater Atlas Glaciers (multiple, html, pdf, wms, kml)
#>  ID: 8f2aee65-9f4c-4f72-b54c-0937dbf3e6f7
#>  Name: freshwater-atlas-glaciers
#> 37: Freshwater Atlas Manmade Waterbodies (multiple, html, pdf, wms,
#>  kml)
#>  ID: 055fd71e-b771-4d47-a863-8a54f91a954c
#>  Name: freshwater-atlas-manmade-waterbodies
#> 38: Freshwater Atlas Obstructions (multiple, html, pdf, wms, kml)
#>  ID: 64797286-3ca5-4202-9064-a7f790321e9e
#>  Name: freshwater-atlas-obstructions
#> 39: Freshwater Atlas Named Point Features (multiple, html, pdf, wms,
#>  kml)
#>  ID: db43a358-273c-4c2e-8a5c-cc28eaaffaa7
#>  Name: freshwater-atlas-named-point-features
#> 40: Freshwater Atlas Wetlands (multiple, html, pdf, wms, kml)
#>  ID: 93b413d8-1840-4770-9629-641d74bd1cc6
#>  Name: freshwater-atlas-wetlands
#> 41: Freshwater Atlas Bays and Channels (multiple, html, pdf, wms, kml)
#>  ID: 60fb779b-e0b0-4026-9ecc-40579d63a724
#>  Name: freshwater-atlas-bays-and-channels
#> 42: Freshwater Atlas Assessment Watersheds (multiple, html, pdf, wms,
#>  kml)
#>  ID: 97d8ef37-b8d2-4c3b-b772-6b25c1db13d0
#>  Name: freshwater-atlas-assessment-watersheds
#> 43: Freshwater Atlas Lakes (multiple, html, pdf, wms, kml)
#>  ID: cb1e3aba-d3fe-4de1-a2d4-b8b6650fb1f6
#>  Name: freshwater-atlas-lakes
#> 44: Freshwater Atlas Islands (multiple, html, pdf, wms, kml)
#>  ID: 4483aeea-df26-4b83-a565-934c769e74de
#>  Name: freshwater-atlas-islands
#> 45: Draft Viewlines with Direction for the Cariboo Region (shp)
#>  ID: e20e8358-d73a-41d5-b417-7a292ae6ce24
#>  Name: draft-viewlines-with-direction-for-the-cariboo-region
#> 46: Customs Ports of Entry (multiple, wms, kml)
#>  ID: 4fac3ad6-8749-4741-ac98-527b23e4b0b2
#>  Name: customs-ports-of-entry
#> 47: Metadata for Child Welfare Program - E05 (json)
#>  ID: f47ca736-4ab3-4a79-9f86-b20cd9afced1
#>  Name: metadata-for-child-welfare-program---e05
#> 48: Streams with Water Allocation Notations (oracle_sde, wms, kml)
#>  ID: 687fdbd1-771d-4624-a28c-7c1ff07309fa
#>  Name: streams-with-water-allocation-notations
#> 49: Streams with Water Allocation Restrictions (multiple)
#>  ID: 961b0fac-0b7e-4fce-9359-7dce3f4cfb4e
#>  Name: streams-with-water-allocation-restrictions
#> 50: TransLink - Major Road Network (geojson, shp, kml)
#>  ID: c157824e-593e-48dd-a34f-ce8ecd534b3f
#>  Name: translink-major-road-network
#> 
#> Access a single record by calling `bcdc_get_record(ID)` with the ID
#>  from the desired record.

Created on 2023-03-05 with reprex v2.0.2

ateucher commented 1 year ago

I feel like the simplest solution would be to add groups to the function as a facet and process it like the rest of the facets?

Also not that bcdc_search() does not warn or error when group is passed as an argument, but instead seems to use the argument as search terms.

This is because it's passed in with the .... To guard against this we could make sure that none of the terms in ... have names?

ateucher commented 1 year ago

E.g.,:

f <- function(...) {
  dots_list <- list(...)
  if (length(names(dots_list)) > 0) {
    stop("search terms passed to ... should not be named")
  }
  dots_list
}

f("foo")
#> [[1]]
#> [1] "foo"
f(group = "foo")
#> Error in f(group = "foo"): search terms passed to ... should not be named

Created on 2023-03-08 with reprex v2.0.2