diff --git a/404.html b/404.html
index afb7f0a..122a368 100644
--- a/404.html
+++ b/404.html
@@ -62,7 +62,14 @@
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="search.json" id="search-input" placeholder="Search for" autocomplete="off">
 </form>
 
-      <ul class="navbar-nav"></ul>
+      <ul class="navbar-nav">
+<li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul>
 </div>
 
     
diff --git a/LICENSE-text.html b/LICENSE-text.html
index 1c77c19..0ae4a35 100644
--- a/LICENSE-text.html
+++ b/LICENSE-text.html
@@ -42,7 +42,13 @@
       </ul><form class="form-inline my-2 my-lg-0" role="search">
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
 
-      <ul class="navbar-nav"></ul></div>
+      <ul class="navbar-nav"><li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul></div>
 
     
   </div>
diff --git a/LICENSE.html b/LICENSE.html
index fe71fef..aeb43e4 100644
--- a/LICENSE.html
+++ b/LICENSE.html
@@ -42,7 +42,13 @@
       </ul><form class="form-inline my-2 my-lg-0" role="search">
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
 
-      <ul class="navbar-nav"></ul></div>
+      <ul class="navbar-nav"><li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul></div>
 
     
   </div>
@@ -50,7 +56,7 @@
 <div class="row">
   <main id="main" class="col-md-9"><div class="page-header">
       <img src="" class="logo" alt=""><h1>MIT License</h1>
-      
+      <small class="dont-index">Source: <a href="https://github.com/JsLth/r311/blob/HEAD/LICENSE.md" class="external-link"><code>LICENSE.md</code></a></small>
     </div>
 
 <div id="mit-license" class="section level1">
diff --git a/articles/index.html b/articles/index.html
index d84456b..ae2e4c3 100644
--- a/articles/index.html
+++ b/articles/index.html
@@ -42,7 +42,13 @@
       </ul><form class="form-inline my-2 my-lg-0" role="search">
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
 
-      <ul class="navbar-nav"></ul></div>
+      <ul class="navbar-nav"><li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul></div>
 
     
   </div>
diff --git a/articles/r311.html b/articles/r311.html
index 9eb5814..ca30c20 100644
--- a/articles/r311.html
+++ b/articles/r311.html
@@ -64,7 +64,14 @@
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off">
 </form>
 
-      <ul class="navbar-nav"></ul>
+      <ul class="navbar-nav">
+<li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul>
 </div>
 
     
@@ -79,7 +86,7 @@
       <img src="" class="logo" alt=""><h1>r311: An R interface to the open311 standard</h1>
             
       
-      
+      <small class="dont-index">Source: <a href="https://github.com/JsLth/r311/blob/HEAD/vignettes/r311.Rmd" class="external-link"><code>vignettes/r311.Rmd</code></a></small>
       <div class="d-none name"><code>r311.Rmd</code></div>
     </div>
 
diff --git a/authors.html b/authors.html
index bff7c76..f965fa4 100644
--- a/authors.html
+++ b/authors.html
@@ -42,7 +42,13 @@
       </ul><form class="form-inline my-2 my-lg-0" role="search">
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
 
-      <ul class="navbar-nav"></ul></div>
+      <ul class="navbar-nav"><li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul></div>
 
     
   </div>
@@ -63,17 +69,18 @@ <h2>Authors</h2>
 
     <div class="section level2 citation">
       <h2 id="citation">Citation</h2>
-      <p></p>
+      <p><small class="dont-index">Source: <a href="https://github.com/JsLth/r311/blob/HEAD/DESCRIPTION" class="external-link"><code>DESCRIPTION</code></a></small></p>
 
       <p>Lieth J (2024).
 <em>r311: R interface to the open311 standard</em>.
-R package version 0.3.1. 
+R package version 0.3.1, https://jslth.github.io/r311/, https://github.com/JsLth/r311, <a href="https://github.com/jslth/r311" class="external-link">https://github.com/jslth/r311</a>. 
 </p>
       <pre>@Manual{,
   title = {r311: R interface to the open311 standard},
   author = {Jonas Lieth},
   year = {2024},
-  note = {R package version 0.3.1},
+  note = {R package version 0.3.1, https://jslth.github.io/r311/, https://github.com/JsLth/r311},
+  url = {https://github.com/jslth/r311},
 }</pre>
     </div>
   </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
diff --git a/index.html b/index.html
index 0f89ff1..35c0f17 100644
--- a/index.html
+++ b/index.html
@@ -64,7 +64,14 @@
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="search.json" id="search-input" placeholder="Search for" autocomplete="off">
 </form>
 
-      <ul class="navbar-nav"></ul>
+      <ul class="navbar-nav">
+<li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul>
 </div>
 
     
@@ -90,7 +97,7 @@ <h2 id="example">Example<a class="anchor" aria-label="anchor" href="#example"></
 </h2>
 <p>The following example loads <code>r311</code>, sets up a jurisdiction and retrieves a small amount of data on service tickets in Cologne, Germany.</p>
 <div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
-<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va">r311</span><span class="op">)</span></span>
+<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/jslth/r311" class="external-link">r311</a></span><span class="op">)</span></span>
 <span></span>
 <span><span class="fu"><a href="reference/o311_api.html">o311_api</a></span><span class="op">(</span><span class="st">"Cologne"</span><span class="op">)</span></span>
 <span><span class="fu"><a href="reference/o311_requests.html">o311_requests</a></span><span class="op">(</span><span class="op">)</span></span>
@@ -119,7 +126,15 @@ <h2 id="example">Example<a class="anchor" aria-label="anchor" href="#example"></
 <span><span class="co">#&gt; #   geometry &lt;POINT [°]&gt;</span></span></code></pre></div>
 </div>
 </div>
-  </main><aside class="col-md-3"><div class="license">
+  </main><aside class="col-md-3"><div class="links">
+<h2 data-toc-skip>Links</h2>
+<ul class="list-unstyled">
+<li><a href="https://github.com/JsLth/r311/" class="external-link">Browse source code</a></li>
+<li><a href="https://github.com/JsLth/r311/issues" class="external-link">Report a bug</a></li>
+</ul>
+</div>
+
+<div class="license">
 <h2 data-toc-skip>License</h2>
 <ul class="list-unstyled">
 <li><a href="LICENSE.html">Full license</a></li>
diff --git a/pkgdown.yml b/pkgdown.yml
index 1253fae..51dfd3d 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -3,7 +3,7 @@ pkgdown: 2.0.9
 pkgdown_sha: ~
 articles:
   r311: r311.html
-last_built: 2024-05-08T16:56Z
+last_built: 2024-05-08T17:17Z
 urls:
   reference: https://jslth.github.io/r311/reference
   article: https://jslth.github.io/r311/articles
diff --git a/reference/index.html b/reference/index.html
index 47cf2a1..33f919f 100644
--- a/reference/index.html
+++ b/reference/index.html
@@ -42,7 +42,13 @@
       </ul><form class="form-inline my-2 my-lg-0" role="search">
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
 
-      <ul class="navbar-nav"></ul></div>
+      <ul class="navbar-nav"><li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul></div>
 
     
   </div>
diff --git a/reference/o311_api.html b/reference/o311_api.html
index bcf03a4..454eff0 100644
--- a/reference/o311_api.html
+++ b/reference/o311_api.html
@@ -54,7 +54,13 @@
       </ul><form class="form-inline my-2 my-lg-0" role="search">
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
 
-      <ul class="navbar-nav"></ul></div>
+      <ul class="navbar-nav"><li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul></div>
 
     
   </div>
@@ -62,7 +68,7 @@
 <div class="row">
   <main id="main" class="col-md-9"><div class="page-header">
       <img src="" class="logo" alt=""><h1>Select an open311 API</h1>
-      
+      <small class="dont-index">Source: <a href="https://github.com/JsLth/r311/blob/HEAD/R/api.R" class="external-link"><code>R/api.R</code></a></small>
       <div class="d-none name"><code>o311_api.Rd</code></div>
     </div>
 
diff --git a/reference/o311_discovery.html b/reference/o311_discovery.html
index aa897a5..6971d5d 100644
--- a/reference/o311_discovery.html
+++ b/reference/o311_discovery.html
@@ -42,7 +42,13 @@
       </ul><form class="form-inline my-2 my-lg-0" role="search">
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
 
-      <ul class="navbar-nav"></ul></div>
+      <ul class="navbar-nav"><li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul></div>
 
     
   </div>
@@ -50,7 +56,7 @@
 <div class="row">
   <main id="main" class="col-md-9"><div class="page-header">
       <img src="" class="logo" alt=""><h1>API discovery</h1>
-      
+      <small class="dont-index">Source: <a href="https://github.com/JsLth/r311/blob/HEAD/R/discovery.R" class="external-link"><code>R/discovery.R</code></a></small>
       <div class="d-none name"><code>o311_discovery.Rd</code></div>
     </div>
 
diff --git a/reference/o311_endpoints.html b/reference/o311_endpoints.html
index 3843814..faedca0 100644
--- a/reference/o311_endpoints.html
+++ b/reference/o311_endpoints.html
@@ -50,7 +50,13 @@
       </ul><form class="form-inline my-2 my-lg-0" role="search">
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
 
-      <ul class="navbar-nav"></ul></div>
+      <ul class="navbar-nav"><li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul></div>
 
     
   </div>
@@ -58,7 +64,7 @@
 <div class="row">
   <main id="main" class="col-md-9"><div class="page-header">
       <img src="" class="logo" alt=""><h1>Endpoints</h1>
-      
+      <small class="dont-index">Source: <a href="https://github.com/JsLth/r311/blob/HEAD/R/endpoints.R" class="external-link"><code>R/endpoints.R</code></a></small>
       <div class="d-none name"><code>o311_endpoints.Rd</code></div>
     </div>
 
diff --git a/reference/o311_ok.html b/reference/o311_ok.html
index 6f16448..09863a1 100644
--- a/reference/o311_ok.html
+++ b/reference/o311_ok.html
@@ -44,7 +44,13 @@
       </ul><form class="form-inline my-2 my-lg-0" role="search">
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
 
-      <ul class="navbar-nav"></ul></div>
+      <ul class="navbar-nav"><li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul></div>
 
     
   </div>
@@ -52,7 +58,7 @@
 <div class="row">
   <main id="main" class="col-md-9"><div class="page-header">
       <img src="" class="logo" alt=""><h1>Is open311 API ok?</h1>
-      
+      <small class="dont-index">Source: <a href="https://github.com/JsLth/r311/blob/HEAD/R/ok.R" class="external-link"><code>R/ok.R</code></a></small>
       <div class="d-none name"><code>o311_ok.Rd</code></div>
     </div>
 
diff --git a/reference/o311_query.html b/reference/o311_query.html
index 0ab40ed..5f200f5 100644
--- a/reference/o311_query.html
+++ b/reference/o311_query.html
@@ -48,7 +48,13 @@
       </ul><form class="form-inline my-2 my-lg-0" role="search">
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
 
-      <ul class="navbar-nav"></ul></div>
+      <ul class="navbar-nav"><li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul></div>
 
     
   </div>
@@ -56,7 +62,7 @@
 <div class="row">
   <main id="main" class="col-md-9"><div class="page-header">
       <img src="" class="logo" alt=""><h1>Query an open311 endpoint</h1>
-      
+      <small class="dont-index">Source: <a href="https://github.com/JsLth/r311/blob/HEAD/R/query.R" class="external-link"><code>R/query.R</code></a></small>
       <div class="d-none name"><code>o311_query.Rd</code></div>
     </div>
 
diff --git a/reference/o311_requests.html b/reference/o311_requests.html
index a7898b3..b424293 100644
--- a/reference/o311_requests.html
+++ b/reference/o311_requests.html
@@ -50,7 +50,13 @@
       </ul><form class="form-inline my-2 my-lg-0" role="search">
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
 
-      <ul class="navbar-nav"></ul></div>
+      <ul class="navbar-nav"><li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul></div>
 
     
   </div>
@@ -58,7 +64,7 @@
 <div class="row">
   <main id="main" class="col-md-9"><div class="page-header">
       <img src="" class="logo" alt=""><h1>Get civic service request data</h1>
-      
+      <small class="dont-index">Source: <a href="https://github.com/JsLth/r311/blob/HEAD/R/requests.R" class="external-link"><code>R/requests.R</code></a></small>
       <div class="d-none name"><code>o311_requests.Rd</code></div>
     </div>
 
diff --git a/reference/o311_services.html b/reference/o311_services.html
index a470ec7..064bbcc 100644
--- a/reference/o311_services.html
+++ b/reference/o311_services.html
@@ -46,7 +46,13 @@
       </ul><form class="form-inline my-2 my-lg-0" role="search">
         <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
 
-      <ul class="navbar-nav"></ul></div>
+      <ul class="navbar-nav"><li class="nav-item">
+  <a class="external-link nav-link" href="https://github.com/JsLth/r311/" aria-label="github">
+    <span class="fab fa fab fa-github fa-lg"></span>
+     
+  </a>
+</li>
+      </ul></div>
 
     
   </div>
@@ -54,7 +60,7 @@
 <div class="row">
   <main id="main" class="col-md-9"><div class="page-header">
       <img src="" class="logo" alt=""><h1>Get service list</h1>
-      
+      <small class="dont-index">Source: <a href="https://github.com/JsLth/r311/blob/HEAD/R/services.R" class="external-link"><code>R/services.R</code></a></small>
       <div class="d-none name"><code>o311_services.Rd</code></div>
     </div>
 
diff --git a/search.json b/search.json
index 0618060..f39753e 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":"https://jslth.github.io/r311/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 r311 authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"r311: An R interface to the open311 standard","text":"open311 international open-access standard civic issue management public service communication. standard allows administrations better manage citizen requests, citizens easily participate administrative work, researchers data scientists access data regarding public service communication. open standard, open311 centralized API, framework implemented various cities (e.g. San Francisco, CA, Chicago, IL, Cologne, DE, Turku, FI, Zurich, CH) services (e.g. SeeClickFix, FixMyStreet). way past golden age open311 APIs much development civic issue tracking shifted less open-access less standardized alternatives. Many former prime examples abandoned severely limited open311 endpoints. Nonetheless, open311 still constitutes valuable source open government data. Many cities services still maintain open311 service. r311 allows seamless management selection endpoints retrieval service request data. supports (depend ) many popular R frameworks tidyverse, sf xml2 response formatting. r311 designed slim, content dependencies. imports two import-less packages used HTTP response handling. functionality limited two main features: Endpoint management Sending requests vignette briefly cover two features.","code":""},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"endpoints","dir":"Articles","previous_headings":"","what":"Endpoints","title":"r311: An R interface to the open311 standard","text":"Since open311 open decentralized standard, one many endpoints one can access. endpoint commonly implemented city administration, can also managed service provider FixMyStreet. endpoint can define multiple jurisdiction IDs, although, practice, endpoints define single jurisdiction. can thus difficult manage multitude endpoints jurisdictions. Efforts made list open311 servers, incomplete outdated. r311 offers updated modifiable endpoint list defines number open311 implementations defined use package. list can read using o311_endpoints. list neither claim comprehensiveness --dateness. arguably provides important easily accessible endpoints 2024. However, r311 also offers ability add new endpoints o311_endpoints using o311_add_endpoint. need provide name (lookup) root URL (URL used send requests). following code adds open311 test server San Francisco. Retrieving endpoints list confirms successfully added new row endpoints dataframe. can now select San Francisco test API session using o311_api. function matches API using endpoint name jurisdiction ID attaches active session. Query functions automatically detect attached API. attaching API, o311_ok confirms selected endpoint able handle request queries. result , can safely start receiving real request data.","code":"o311_endpoints() #> # A tibble: 62 × 9 #>    name            root  docs  jurisdiction key   pagination limit json  dialect #>    <chr>           <chr> <chr> <chr>        <lgl> <lgl>      <int> <lgl> <chr>   #>  1 Annaberg-Buchh… http… http… annberg-buc… FALSE TRUE          50 TRUE  Mark-a… #>  2 Bloomington, IN http… NA    bloomington… FALSE TRUE        1000 TRUE  uReport #>  3 Bonn, DE        http… http… bonn.de      FALSE TRUE         100 TRUE  Mark-a… #>  4 Boston, MA      http… http… boston.gov   FALSE TRUE          50 TRUE  Connec… #>  5 Brookline, MA   http… http… brooklinema… FALSE TRUE          50 TRUE  Connec… #>  6 Austin, TX      http… http… NA           FALSE TRUE          50 TRUE  Connec… #>  7 Chicago, IL     http… http… cityofchica… FALSE TRUE          50 TRUE  Connec… #>  8 Newport News, … http… http… cityofnewpo… FALSE TRUE          50 TRUE  Connec… #>  9 San Diego, CA   http… http… sandiego.gov FALSE TRUE          50 TRUE  Connec… #> 10 Köln / Cologne… http… http… stadt-koeln… FALSE TRUE          50 TRUE  Mark-a… #> # ℹ 52 more rows o311_add_endpoint(   name = \"San Francisco Test\",   root = \"http://mobile311-dev.sfgov.org/open311/v2/\",   jurisdiction = \"sfgov.org\" ) nrow(o311_endpoints()) #> [1] 63 o311_api(\"San Francisco Test\") o311_ok() #> [1] TRUE"},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"making-requests","dir":"Articles","previous_headings":"","what":"Making requests","title":"r311: An R interface to the open311 standard","text":"selecting API attaching session, functions can access . can now make requests.","code":""},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"services","dir":"Articles","previous_headings":"Making requests","what":"Services","title":"r311: An R interface to the open311 standard","text":"get overview available services jurisdiction, can use o311_services, returns list San Francisco’s administrative services.","code":"o311_services() #> # A tibble: 21 × 6 #>    service_code             service_name        description metadata type  group #>    <chr>                    <chr>               <chr>       <lgl>    <chr> <chr> #>  1 6050cd8ce8961bbfa32bcf2c Shared Spaces       Use this o… TRUE     batch Gene… #>  2 55d6cb85df86af51c305616e Noise Issue         NA          TRUE     batch Gene… #>  3 5fe20af6e896f754e2784e99 Holiday Tree Remov… NA          FALSE    batch Stre… #>  4 518d5892601827e3880000c5 Street or Sidewalk… NA          TRUE     batch Stre… #>  5 518d572e601827e388000058 Garbage Containers  Report an … TRUE     batch Stre… #>  6 50fea92c4aa48a4a9e000099 Graffiti            Report bui… TRUE     batch Stre… #>  7 50fea6d54aa48a4a9e00002e Illegal Postings    Report han… TRUE     batch Stre… #>  8 518d564b601827e38800002d Blocked Pedestrian… NA          TRUE     batch Stre… #>  9 55e8409a45ff461f92000006 Encampment          NA          TRUE     batch Stre… #> 10 518d5d52601827e3880001b1 Abandoned Vehicles  Report a v… TRUE     batch Park… #> # ℹ 11 more rows"},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"requests","dir":"Articles","previous_headings":"Making requests","what":"Requests","title":"r311: An R interface to the open311 standard","text":"get data civic issues city area, run o311_requests. Using output o311_services, can narrow output requests. Open311 defines set standard parameters implemented endpoints. Using service_code parameter one previously returned service codes, complaints businesses illegally using shared spaces returned. Similarly, using service_request_id output, can retrieve single service request API.","code":"o311_requests() #> Simple feature collection with 50 features and 10 fields #> Geometry type: POINT #> Dimension:     XY #> Bounding box:  xmin: -122.5111 ymin: 37.74945 xmax: -122.3949 ymax: 37.79207 #> Geodetic CRS:  WGS 84 #> # A tibble: 50 × 11 #>    service_request_id status service_name               service_code description #>  * <chr>              <chr>  <chr>                      <chr>        <chr>       #>  1 1020140726         open   Abandoned Vehicles         518d5d52601… test        #>  2 1020140725         open   Park Requests              518d5cc9601… test        #>  3 1020140302         open   Street or Sidewalk Cleani… 518d5892601… Test - gar… #>  4 1020139578         open   Street or Sidewalk Cleani… 518d5892601… Garbage on… #>  5 1020139514         open   Encampment                 55e8409a45f… NA          #>  6 1020139511         open   Shared Spaces              6050cd8ce89… NA          #>  7 1020139507         open   Tree Maintenance           518d595d601… southbound… #>  8 1020139506         open   Pothole & Street Issues    50fea9c24aa… southbound… #>  9 1020139503         open   Tree Maintenance           518d595d601… southbound… #> 10 1020139502         open   Pothole & Street Issues    50fea9c24aa… southbound… #> # ℹ 40 more rows #> # ℹ 6 more variables: requested_datetime <chr>, updated_datetime <chr>, #> #   address <chr>, media_url <chr>, status_notes <chr>, geometry <POINT [°]> o311_requests(service_code = \"6050cd8ce8961bbfa32bcf2c\") #> Simple feature collection with 50 features and 9 fields #> Geometry type: POINT #> Dimension:     XY #> Bounding box:  xmin: -122.444 ymin: 37.75765 xmax: -122.3931 ymax: 37.79074 #> Geodetic CRS:  WGS 84 #> # A tibble: 50 × 10 #>    service_request_id status service_name  service_code       requested_datetime #>  * <chr>              <chr>  <chr>         <chr>              <chr>              #>  1 1020139511         open   Shared Spaces 6050cd8ce8961bbfa… 2023-12-08T23:54:… #>  2 1020139479         open   Shared Spaces 6050cd8ce8961bbfa… 2023-12-05T22:52:… #>  3 1020139460         open   Shared Spaces 6050cd8ce8961bbfa… 2023-12-01T17:20:… #>  4 1020139449         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-29T23:30:… #>  5 1020139418         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-27T18:53:… #>  6 1020139417         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-27T18:43:… #>  7 1020139414         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-27T18:31:… #>  8 1020139411         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-27T18:23:… #>  9 1020139392         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-17T02:14:… #> 10 1020139391         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-17T02:14:… #> # ℹ 40 more rows #> # ℹ 5 more variables: updated_datetime <chr>, address <chr>, description <chr>, #> #   status_notes <chr>, geometry <POINT [°]> o311_request(\"1020139511\") #> Simple feature collection with 1 feature and 7 fields #> Geometry type: POINT #> Dimension:     XY #> Bounding box:  xmin: -122.4183 ymin: 37.775 xmax: -122.4183 ymax: 37.775 #> Geodetic CRS:  WGS 84 #> # A tibble: 1 × 8 #>   service_request_id status service_name  service_code        requested_datetime #> * <chr>              <chr>  <chr>         <chr>               <chr>              #> 1 1020139511         open   Shared Spaces 6050cd8ce8961bbfa3… 2023-12-08T23:54:… #> # ℹ 3 more variables: updated_datetime <chr>, address <chr>, #> #   geometry <POINT [°]>"},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"bulk-queries","dir":"Articles","previous_headings":"Making requests","what":"Bulk queries","title":"r311: An R interface to the open311 standard","text":"Many endpoints define page limit meaning responses divided pages. query without parameters returns first page. Pagination can controlled page argument. control pagination, o311_request_all function can come handy. automatically iterates pages heuristically decides stop. following example retrieves data first two pages, resulting tibble 100 service requests.","code":"o311_request_all(max_pages = 2) #> Simple feature collection with 100 features and 10 fields #> Geometry type: POINT #> Dimension:     XY #> Bounding box:  xmin: -122.5111 ymin: 37.73277 xmax: -122.3931 ymax: 37.79207 #> Geodetic CRS:  WGS 84 #> # A tibble: 100 × 11 #>    service_request_id status service_name               service_code description #>    <chr>              <chr>  <chr>                      <chr>        <chr>       #>  1 1020140726         open   Abandoned Vehicles         518d5d52601… test        #>  2 1020140725         open   Park Requests              518d5cc9601… test        #>  3 1020140302         open   Street or Sidewalk Cleani… 518d5892601… Test - gar… #>  4 1020139578         open   Street or Sidewalk Cleani… 518d5892601… Garbage on… #>  5 1020139514         open   Encampment                 55e8409a45f… NA          #>  6 1020139511         open   Shared Spaces              6050cd8ce89… NA          #>  7 1020139507         open   Tree Maintenance           518d595d601… southbound… #>  8 1020139506         open   Pothole & Street Issues    50fea9c24aa… southbound… #>  9 1020139503         open   Tree Maintenance           518d595d601… southbound… #> 10 1020139502         open   Pothole & Street Issues    50fea9c24aa… southbound… #> # ℹ 90 more rows #> # ℹ 6 more variables: requested_datetime <chr>, updated_datetime <chr>, #> #   address <chr>, media_url <chr>, status_notes <chr>, geometry <POINT [°]>"},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"non-standard-parameters","dir":"Articles","previous_headings":"Making requests","what":"Non-standard parameters","title":"r311: An R interface to the open311 standard","text":"r311 implicitly supports API extensions introducing custom paths parameters. One API Klarschiff Rostock based CitySDK. Klarschiff CitySDK defines number non-default paths parameters extend filtering abilities open311 requests. Available parameters can usually found respective documentation (e.g. GitHub Klarschiff CitySDK). following query returns last 50 requests tagged “idea” keyword. custom parameters can also alter shape output. following example, query just count total requests using just_count parameter. result 1×1 tibble containing count value. CitySDK extensions also offers additional URL paths can queried using generic o311_query function.","code":"o311_api(\"Rostock\") tickets <- o311_requests(keyword = \"idea\", max_requests = 50) o311_requests(just_count = TRUE) #> # A tibble: 1 × 1 #>   value #>   <int> #> 1  3776 poly <- o311_query(\"areas\") plot(poly$grenze) plot(tickets$geometry, add = TRUE, pch = 16)"},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"cleanup","dir":"Articles","previous_headings":"","what":"Cleanup","title":"r311: An R interface to the open311 standard","text":"Endpoint data stored persistently sessions can create database open311 endpoints. database stored system’s user directory returned tools::R_user_dir(\"r311\"). reset database, run default back endpoints defined r311 remove endpoints manually added o311_add_endpoints.","code":"o311_reset_endpoints()"},{"path":"https://jslth.github.io/r311/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Jonas Lieth. Author, maintainer.","code":""},{"path":"https://jslth.github.io/r311/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lieth J (2024). r311: R interface open311 standard. R package version 0.3.1.","code":"@Manual{,   title = {r311: R interface to the open311 standard},   author = {Jonas Lieth},   year = {2024},   note = {R package version 0.3.1}, }"},{"path":"https://jslth.github.io/r311/index.html","id":"r311","dir":"","previous_headings":"","what":"R interface to the open311 standard","title":"R interface to the open311 standard","text":"r311 R interface international standard open311. Open311 APIs used civic issue management public service communication. standard allows administrations better manage citizen requests, citizens easily submit requests, (hence package) researchers data scientists access data regarding public service communication. r311 supports seamless management supplementation available endpoints, selection appropriate APIs access, retrieval civic service request data. Custom queries extensions (e.g. CitySDK) implicitly supported. r311 designed require minimal amount dependencies, allow easy integration common R frameworks tidyverse, sf xml2.","code":""},{"path":"https://jslth.github.io/r311/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"R interface to the open311 standard","text":"can install development version open311 GitHub :","code":"# install.packages(\"remotes\") remotes::install_github(\"JsLth/r311\")"},{"path":"https://jslth.github.io/r311/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"R interface to the open311 standard","text":"following example loads r311, sets jurisdiction retrieves small amount data service tickets Cologne, Germany.","code":"library(r311)  o311_api(\"Cologne\") o311_requests() #> Simple feature collection with 50 features and 14 fields #> Geometry type: POINT #> Dimension:     XY #> Bounding box:  xmin: 6.833799 ymin: 50.85938 xmax: 7.10085 ymax: 51.0604 #> Geodetic CRS:  WGS 84 #> # A tibble: 50 × 15 #>    service_request_id status service_code service_name               description #>  * <chr>              <chr>  <chr>        <chr>                      <chr>       #>  1 A-173480           open   009          Schrottfahrzeuge/-fahrräd… \"Rondorfer… #>  2 A-173476           open   012          Straßenbaustellen          \"Baustelle… #>  3 A-173472           open   012          Straßenbaustellen          \"Guten Tag… #>  4 A-173470           open   009          Schrottfahrzeuge/-fahrräd… \"Unabgesch… #>  5 A-173455           open   009          Schrottfahrzeuge/-fahrräd… \"Am Rand d… #>  6 A-173438           open   006          Gully verstopft            \"Bachemer … #>  7 A-173430           open   009          Schrottfahrzeuge/-fahrräd… \"Auf der W… #>  8 A-173409           open   009          Schrottfahrzeuge/-fahrräd… \"Räder ste… #>  9 A-173407           open   009          Schrottfahrzeuge/-fahrräd… \"Ohne Kenn… #> 10 A-173390           open   009          Schrottfahrzeuge/-fahrräd… \"Auto steh… #> # ℹ 40 more rows #> # ℹ 10 more variables: agency_responsible <lgl>, service_notice <lgl>, #> #   address_id <lgl>, requested_datetime <chr>, updated_datetime <chr>, #> #   address <chr>, zipcode <lgl>, status_notes <chr>, media_url <chr>, #> #   geometry <POINT [°]>"},{"path":"https://jslth.github.io/r311/reference/o311_api.html","id":null,"dir":"Reference","previous_headings":"","what":"Select an open311 API — o311_api","title":"Select an open311 API — o311_api","text":"Select open311 API attach active session. open311 API implementation open311 standard. consists endpoint name (e.g. city), root URL, jurisdiction ID. unambiguously identify API, can provide endpoint, jurisdiction ID, . input matched o311_endpoints select API. selected API available o311_* functions session terminated overwritten.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_api.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select an open311 API — o311_api","text":"","code":"o311_api(endpoint = NULL, jurisdiction = NULL, format = c(\"json\", \"xml\"))"},{"path":"https://jslth.github.io/r311/reference/o311_api.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select an open311 API — o311_api","text":"endpoint [character] Name endpoint runs open311 API. usually city, can provider open311 API. jurisdiction [character] ID jurisdiction served open311 API. jurisdiction ID usually root URL jurisdiction website, e.g. \"sfgov.org\" San Francisco. format [character] Response format. Must one \"json\" \"xml\". Defaults \"json\" simplification difficult unsafe xml2 objects. advisable use \"json\" whenever possible applicable. Additionally, \"xml\" requires xml2 package queries xmlconvert package simplification.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_api.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select an open311 API — o311_api","text":"list containing important information given jurisdiction, invisibly. list attached session can retrieved calling o311_api() without arguments.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_api.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Select an open311 API — o311_api","text":"theory, several jurisdictions can exist single endpoints, e.g. region serves multiple jurisdictions. Similarly, multiple endpoints can exist single jurisdiction, e.g. provider set production test endpoints jurisdictions. Providing endpoint jurisdiction thus safe way identify API. default, handful endpoints supported. list currently supported endpoints, run o311_endpoints. can add non-default endpoints using o311_add_endpoint.","code":""},{"path":[]},{"path":"https://jslth.github.io/r311/reference/o311_api.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Select an open311 API — o311_api","text":"","code":"# cities are matched using regex o311_api(\"Cologne\")  # passing a jurisdiction is more explicit o311_api(jurisdiction = \"stadt-koeln.de\")  # calls without arguments return the current API o311_api() #> $name #> [1] \"Köln / Cologne, DE\" #>  #> $root #> [1] \"https://sags-uns-archiv.stadt-koeln.de/georeport/v2/\" #>  #> $docs #> [1] \"https://sags-uns-archiv.stadt-koeln.de/seiten/open311\" #>  #> $jurisdiction #> [1] \"stadt-koeln.de\" #>  #> $key #> [1] FALSE #>  #> $pagination #> [1] TRUE #>  #> $limit #> [1] 50 #>  #> $json #> [1] TRUE #>  #> $dialect #> [1] \"Mark-a-Spot\" #>"},{"path":"https://jslth.github.io/r311/reference/o311_discovery.html","id":null,"dir":"Reference","previous_headings":"","what":"API discovery — o311_discovery","title":"API discovery — o311_discovery","text":"Retrieve discovery information mounted endpoint.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_discovery.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"API discovery — o311_discovery","text":"","code":"o311_discovery()"},{"path":"https://jslth.github.io/r311/reference/o311_discovery.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"API discovery — o311_discovery","text":"list containing details given open311 API.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Endpoints — o311_add_endpoint","title":"Endpoints — o311_add_endpoint","text":"Modify examine defined open311 endpoints. o311_endpoints() retrieves list endpoints including additional information. o311_add_endpoint adds list define new endpoint can used queries. o311_reset_endpoints restores initial state endpoints list.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Endpoints — o311_add_endpoint","text":"","code":"o311_add_endpoint(   name,   root,   jurisdiction = NULL,   key = FALSE,   pagination = FALSE,   limit = NULL,   json = TRUE,   dialect = NULL )  o311_reset_endpoints()  o311_endpoints(...)"},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Endpoints — o311_add_endpoint","text":"name [character] Name endpoint / city. name can arbitrary serves identification [o311_api]. root [character] Base URL endpoint sending production-grade requests. root URL commonly points \"georeport/v2/\". jurisdiction [character] Unique identifier jurisdiction. jurisdiction typically defined domain respective city website. optional endpoints serve one jurisdiction. key [logical] API key mandatory? pagination [logical] requests responses paginated? limit [integer] paginated, many requests one page contain? json [logical] JSON responses supported? FALSE, defaults \"XML\" responses. See also o311_api. dialect [character] open311 extension endpoint built . Common dialects include CitySDK, Connected Bits, SeeClickFix Mark--Spot. Currently, argument nothing, used future adjust response handling based dialect. ... List key-value pairs pair filter. key represents column value requested column value. keys must present column names o311_endpoints().","code":""},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Endpoints — o311_add_endpoint","text":"o311_endpoints, dataframe containing relevant information endpoint. o311_add_endpoint, new endpoint, invisibly. o311_reset_endpoints returns NULL invisibly. new endpoint duplicate, NULL returned invisibly.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Endpoints — o311_add_endpoint","text":"o311_endpoints() returns static list defined package installation directory. list contains limited number endpoints proven work time package development. include newer/smaller/less known endpoints test APIs. can manually added using o311_add_endpoint.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Endpoints — o311_add_endpoint","text":"function uses R_user_dir persistently store custom endpoints data sessions. set different directory, may use options(\"o311_user_dir\"). clean , run o311_reset_endpoints() deletes package-specific user directory defaults back system.file(\"endpoints.json\", package = \"r311\").","code":""},{"path":[]},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Endpoints — o311_add_endpoint","text":"","code":"# read default endpoints o311_endpoints() #> # A tibble: 62 × 9 #>    name            root  docs  jurisdiction key   pagination limit json  dialect #>    <chr>           <chr> <chr> <chr>        <lgl> <lgl>      <int> <lgl> <chr>   #>  1 Annaberg-Buchh… http… http… annberg-buc… FALSE TRUE          50 TRUE  Mark-a… #>  2 Bloomington, IN http… NA    bloomington… FALSE TRUE        1000 TRUE  uReport #>  3 Bonn, DE        http… http… bonn.de      FALSE TRUE         100 TRUE  Mark-a… #>  4 Boston, MA      http… http… boston.gov   FALSE TRUE          50 TRUE  Connec… #>  5 Brookline, MA   http… http… brooklinema… FALSE TRUE          50 TRUE  Connec… #>  6 Austin, TX      http… http… NA           FALSE TRUE          50 TRUE  Connec… #>  7 Chicago, IL     http… http… cityofchica… FALSE TRUE          50 TRUE  Connec… #>  8 Newport News, … http… http… cityofnewpo… FALSE TRUE          50 TRUE  Connec… #>  9 San Diego, CA   http… http… sandiego.gov FALSE TRUE          50 TRUE  Connec… #> 10 Köln / Cologne… http… http… stadt-koeln… FALSE TRUE          50 TRUE  Mark-a… #> # ℹ 52 more rows  # get all endpoints powered by Connected Bits o311_endpoints(dialect = \"Connected Bits\") #> # A tibble: 7 × 9 #>   name             root  docs  jurisdiction key   pagination limit json  dialect #>   <chr>            <chr> <chr> <chr>        <lgl> <lgl>      <int> <lgl> <chr>   #> 1 Boston, MA       http… http… boston.gov   FALSE TRUE          50 TRUE  Connec… #> 2 Brookline, MA    http… http… brooklinema… FALSE TRUE          50 TRUE  Connec… #> 3 Austin, TX       http… http… NA           FALSE TRUE          50 TRUE  Connec… #> 4 Chicago, IL      http… http… cityofchica… FALSE TRUE          50 TRUE  Connec… #> 5 Newport News, VA http… http… cityofnewpo… FALSE TRUE          50 TRUE  Connec… #> 6 San Diego, CA    http… http… sandiego.gov FALSE TRUE          50 TRUE  Connec… #> 7 San Francisco, … http… http… sfgov.org    FALSE TRUE          50 TRUE  Connec…  # add a new endpoint o311_add_endpoint(name = \"test\", root = \"test.org/georeport/v2\")  # read new endpoints o311_endpoints() #> # A tibble: 63 × 9 #>    name            root  docs  jurisdiction key   pagination limit json  dialect #>    <chr>           <chr> <chr> <chr>        <lgl> <lgl>      <int> <lgl> <chr>   #>  1 Annaberg-Buchh… http… http… annberg-buc… FALSE TRUE          50 TRUE  Mark-a… #>  2 Bloomington, IN http… NA    bloomington… FALSE TRUE        1000 TRUE  uReport #>  3 Bonn, DE        http… http… bonn.de      FALSE TRUE         100 TRUE  Mark-a… #>  4 Boston, MA      http… http… boston.gov   FALSE TRUE          50 TRUE  Connec… #>  5 Brookline, MA   http… http… brooklinema… FALSE TRUE          50 TRUE  Connec… #>  6 Austin, TX      http… http… NA           FALSE TRUE          50 TRUE  Connec… #>  7 Chicago, IL     http… http… cityofchica… FALSE TRUE          50 TRUE  Connec… #>  8 Newport News, … http… http… cityofnewpo… FALSE TRUE          50 TRUE  Connec… #>  9 San Diego, CA   http… http… sandiego.gov FALSE TRUE          50 TRUE  Connec… #> 10 Köln / Cologne… http… http… stadt-koeln… FALSE TRUE          50 TRUE  Mark-a… #> # ℹ 53 more rows  # reset endpoints back to default o311_reset_endpoints()"},{"path":"https://jslth.github.io/r311/reference/o311_ok.html","id":null,"dir":"Reference","previous_headings":"","what":"Is open311 API ok? — o311_ok","title":"Is open311 API ok? — o311_ok","text":"Checks whether open311 API mounted o311_api reachable returns valid requests response.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_ok.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is open311 API ok? — o311_ok","text":"","code":"o311_ok(error = FALSE)"},{"path":"https://jslth.github.io/r311/reference/o311_ok.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is open311 API ok? — o311_ok","text":"error [logical] Whether return logical error message describing API ok.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_ok.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is open311 API ok? — o311_ok","text":"logical describing whether API reachable . error = TRUE, returns corresponding error object one occurs.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_ok.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is open311 API ok? — o311_ok","text":"","code":"if (FALSE) { # check if Bonn API is reachable o311_api(\"Bonn\") o311_ok()  # check if Helsinki API is reachable - fails o311_add_endpoint(   name = \"Helsinki\",   root = \"asiointi.hel.fi/palautews/rest/v1/\" )  o311_api(\"Helsinki\") o311_ok()  # return error message o311_ok(error = TRUE) }"},{"path":"https://jslth.github.io/r311/reference/o311_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Query an open311 endpoint — o311_query","title":"Query an open311 endpoint — o311_query","text":"Low-level function perform generic request API currently attached o311_api. open311 implementations support unique operations included official documentation. function can used access URL paths.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query an open311 endpoint — o311_query","text":"","code":"o311_query(path, ..., simplify = TRUE)"},{"path":"https://jslth.github.io/r311/reference/o311_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query an open311 endpoint — o311_query","text":"path Path appendix used access endpoint-specific operations. ... Additional query parameters. simplify Whether simplify output using jsonlite::toJSON(..., simplify = TRUE).","code":""},{"path":"https://jslth.github.io/r311/reference/o311_query.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query an open311 endpoint — o311_query","text":"parsed query output, either list dataframe.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_query.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query an open311 endpoint — o311_query","text":"","code":"if (FALSE) { o311_query(\"rostock\")  # manually query discovery o311_query(path = \"discovery\", simplify = FALSE)  # query a custom path defined by the Klarschiff API o311_query(path = \"areas\") }"},{"path":"https://jslth.github.io/r311/reference/o311_requests.html","id":null,"dir":"Reference","previous_headings":"","what":"Get civic service request data — o311_requests","title":"Get civic service request data — o311_requests","text":"Get civic service request data registered open311 endpoint. o311_request queries single service request ID. o311_requests queries single page service requests. o311_request_all tries iterate pages endpoint return complete dataset service requests.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_requests.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get civic service request data — o311_requests","text":"","code":"o311_requests(   service_code = NULL,   start_date = NULL,   end_date = NULL,   status = NULL,   page = NULL,   ... )  o311_request(service_request_id, ...)  o311_request_all(   service_code = NULL,   start_date = NULL,   end_date = NULL,   status = NULL,   ...,   max_pages = Inf,   progress = TRUE )"},{"path":"https://jslth.github.io/r311/reference/o311_requests.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get civic service request data — o311_requests","text":"service_code [character] IDs service types queried. Defaults available codes endpoint. list available service codes can retrieved using o311_services. start_date, end_date [POSIXt] Start date end date query results. Must date-time objects. specified, defaults last 90 days. status [character] Status public service ticket. Can one \"open\" \"closed\". NULL, returns types tickets. page [integer] Page response. endpoints paginate responses way limited number tickets returned query. retrieve data, consider using o311_request_all. ... endpoint-specific parameters documented respective endpoint reference. service_request_id [character] Identifier single service request. Request IDs can usually retrieved o311_requests. max_pages [integer] Number pages search result returned. progress [logical] Whether show waiter indicating current page iteration.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_requests.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get civic service request data — o311_requests","text":"o311_request_all applies number checks determine stop searching. First, many endpoints return error last page exceeded. Thus, last page request failed, break. Second, exceeding pagination limit return error, response compared previous response. identical, response discarded previous responses returned. Finally, page exceeds max_pages, responses point returned. open311 leaves space endpoints implement request parameters. parameters can provided using dot arguments. arguments validated pre-processed. Date-time objects must formatted according w3c standard. common parameters include: q: Perform text search across requests. update_after/updated_before: Limit request according  request update dates. per_page: Specifiy maximum number requests per page. extensions: Adds nested attribute  \"extended_attributes\" response. long/lat/radius: Searches requests fixed radius  around coordinate. dot arguments deviate open311 standard, guaranteed available every endpoint might removed without notice. Refer endpoint docs learn custom parameters (o311_endpoints()$docs).","code":""},{"path":[]},{"path":"https://jslth.github.io/r311/reference/o311_requests.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get civic service request data — o311_requests","text":"","code":"if (FALSE) { o311_api(\"chicago\")  # retrieve requests from the last two days now <- Sys.time() two_days <- 60 * 60 * 24 * 2 o311_requests(end_date = now, start_date = now - two_days)  # retrieve only open tickets tickets <- o311_requests(status = \"open\")  # request the first ticket of the previous response o311_request(tickets$service_request_id[1])  # request all data o311_request_all()  # request data of the first 5 pages o311_request_all(max_pages = 5) }"},{"path":"https://jslth.github.io/r311/reference/o311_services.html","id":null,"dir":"Reference","previous_headings":"","what":"Get service list — o311_services","title":"Get service list — o311_services","text":"Get list available services. Services unique endpoint / city thus require attached jurisdiction using o311_api.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_services.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get service list — o311_services","text":"","code":"o311_services(...)  o311_service(service_code, ...)"},{"path":"https://jslth.github.io/r311/reference/o311_services.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get service list — o311_services","text":"... endpoint-specific parameters documented respective endpoint reference. service_code Identifier single service definition. Service codes can usually retrieved o311_services.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_services.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get service list — o311_services","text":"dataframe list containing information service.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_services.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get service list — o311_services","text":"","code":"if (FALSE) { # set up a jurisdiction o311_add_endpoint(   name = \"helsinki test\",   root = \"https://dev.hel.fi/open311-test/v1/\" ) o311_api(\"helsinki test\")  # get a list of all services services <- o311_services()  # get a service list in finnish # the locale parameter is specific to the Helsinki API o311_services(locale = \"fi_FI\")  # inspect a service code o311_service(services$service_code[1]) }"}]
+[{"path":"https://jslth.github.io/r311/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 r311 authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"r311: An R interface to the open311 standard","text":"open311 international open-access standard civic issue management public service communication. standard allows administrations better manage citizen requests, citizens easily participate administrative work, researchers data scientists access data regarding public service communication. open standard, open311 centralized API, framework implemented various cities (e.g. San Francisco, CA, Chicago, IL, Cologne, DE, Turku, FI, Zurich, CH) services (e.g. SeeClickFix, FixMyStreet). way past golden age open311 APIs much development civic issue tracking shifted less open-access less standardized alternatives. Many former prime examples abandoned severely limited open311 endpoints. Nonetheless, open311 still constitutes valuable source open government data. Many cities services still maintain open311 service. r311 allows seamless management selection endpoints retrieval service request data. supports (depend ) many popular R frameworks tidyverse, sf xml2 response formatting. r311 designed slim, content dependencies. imports two import-less packages used HTTP response handling. functionality limited two main features: Endpoint management Sending requests vignette briefly cover two features.","code":""},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"endpoints","dir":"Articles","previous_headings":"","what":"Endpoints","title":"r311: An R interface to the open311 standard","text":"Since open311 open decentralized standard, one many endpoints one can access. endpoint commonly implemented city administration, can also managed service provider FixMyStreet. endpoint can define multiple jurisdiction IDs, although, practice, endpoints define single jurisdiction. can thus difficult manage multitude endpoints jurisdictions. Efforts made list open311 servers, incomplete outdated. r311 offers updated modifiable endpoint list defines number open311 implementations defined use package. list can read using o311_endpoints. list neither claim comprehensiveness --dateness. arguably provides important easily accessible endpoints 2024. However, r311 also offers ability add new endpoints o311_endpoints using o311_add_endpoint. need provide name (lookup) root URL (URL used send requests). following code adds open311 test server San Francisco. Retrieving endpoints list confirms successfully added new row endpoints dataframe. can now select San Francisco test API session using o311_api. function matches API using endpoint name jurisdiction ID attaches active session. Query functions automatically detect attached API. attaching API, o311_ok confirms selected endpoint able handle request queries. result , can safely start receiving real request data.","code":"o311_endpoints() #> # A tibble: 62 × 9 #>    name            root  docs  jurisdiction key   pagination limit json  dialect #>    <chr>           <chr> <chr> <chr>        <lgl> <lgl>      <int> <lgl> <chr>   #>  1 Annaberg-Buchh… http… http… annberg-buc… FALSE TRUE          50 TRUE  Mark-a… #>  2 Bloomington, IN http… NA    bloomington… FALSE TRUE        1000 TRUE  uReport #>  3 Bonn, DE        http… http… bonn.de      FALSE TRUE         100 TRUE  Mark-a… #>  4 Boston, MA      http… http… boston.gov   FALSE TRUE          50 TRUE  Connec… #>  5 Brookline, MA   http… http… brooklinema… FALSE TRUE          50 TRUE  Connec… #>  6 Austin, TX      http… http… NA           FALSE TRUE          50 TRUE  Connec… #>  7 Chicago, IL     http… http… cityofchica… FALSE TRUE          50 TRUE  Connec… #>  8 Newport News, … http… http… cityofnewpo… FALSE TRUE          50 TRUE  Connec… #>  9 San Diego, CA   http… http… sandiego.gov FALSE TRUE          50 TRUE  Connec… #> 10 Köln / Cologne… http… http… stadt-koeln… FALSE TRUE          50 TRUE  Mark-a… #> # ℹ 52 more rows o311_add_endpoint(   name = \"San Francisco Test\",   root = \"http://mobile311-dev.sfgov.org/open311/v2/\",   jurisdiction = \"sfgov.org\" ) nrow(o311_endpoints()) #> [1] 63 o311_api(\"San Francisco Test\") o311_ok() #> [1] TRUE"},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"making-requests","dir":"Articles","previous_headings":"","what":"Making requests","title":"r311: An R interface to the open311 standard","text":"selecting API attaching session, functions can access . can now make requests.","code":""},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"services","dir":"Articles","previous_headings":"Making requests","what":"Services","title":"r311: An R interface to the open311 standard","text":"get overview available services jurisdiction, can use o311_services, returns list San Francisco’s administrative services.","code":"o311_services() #> # A tibble: 21 × 6 #>    service_code             service_name        description metadata type  group #>    <chr>                    <chr>               <chr>       <lgl>    <chr> <chr> #>  1 6050cd8ce8961bbfa32bcf2c Shared Spaces       Use this o… TRUE     batch Gene… #>  2 55d6cb85df86af51c305616e Noise Issue         NA          TRUE     batch Gene… #>  3 5fe20af6e896f754e2784e99 Holiday Tree Remov… NA          FALSE    batch Stre… #>  4 518d5892601827e3880000c5 Street or Sidewalk… NA          TRUE     batch Stre… #>  5 518d572e601827e388000058 Garbage Containers  Report an … TRUE     batch Stre… #>  6 50fea92c4aa48a4a9e000099 Graffiti            Report bui… TRUE     batch Stre… #>  7 50fea6d54aa48a4a9e00002e Illegal Postings    Report han… TRUE     batch Stre… #>  8 518d564b601827e38800002d Blocked Pedestrian… NA          TRUE     batch Stre… #>  9 55e8409a45ff461f92000006 Encampment          NA          TRUE     batch Stre… #> 10 518d5d52601827e3880001b1 Abandoned Vehicles  Report a v… TRUE     batch Park… #> # ℹ 11 more rows"},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"requests","dir":"Articles","previous_headings":"Making requests","what":"Requests","title":"r311: An R interface to the open311 standard","text":"get data civic issues city area, run o311_requests. Using output o311_services, can narrow output requests. Open311 defines set standard parameters implemented endpoints. Using service_code parameter one previously returned service codes, complaints businesses illegally using shared spaces returned. Similarly, using service_request_id output, can retrieve single service request API.","code":"o311_requests() #> Simple feature collection with 50 features and 10 fields #> Geometry type: POINT #> Dimension:     XY #> Bounding box:  xmin: -122.5111 ymin: 37.74945 xmax: -122.3949 ymax: 37.79207 #> Geodetic CRS:  WGS 84 #> # A tibble: 50 × 11 #>    service_request_id status service_name               service_code description #>  * <chr>              <chr>  <chr>                      <chr>        <chr>       #>  1 1020140726         open   Abandoned Vehicles         518d5d52601… test        #>  2 1020140725         open   Park Requests              518d5cc9601… test        #>  3 1020140302         open   Street or Sidewalk Cleani… 518d5892601… Test - gar… #>  4 1020139578         open   Street or Sidewalk Cleani… 518d5892601… Garbage on… #>  5 1020139514         open   Encampment                 55e8409a45f… NA          #>  6 1020139511         open   Shared Spaces              6050cd8ce89… NA          #>  7 1020139507         open   Tree Maintenance           518d595d601… southbound… #>  8 1020139506         open   Pothole & Street Issues    50fea9c24aa… southbound… #>  9 1020139503         open   Tree Maintenance           518d595d601… southbound… #> 10 1020139502         open   Pothole & Street Issues    50fea9c24aa… southbound… #> # ℹ 40 more rows #> # ℹ 6 more variables: requested_datetime <chr>, updated_datetime <chr>, #> #   address <chr>, media_url <chr>, status_notes <chr>, geometry <POINT [°]> o311_requests(service_code = \"6050cd8ce8961bbfa32bcf2c\") #> Simple feature collection with 50 features and 9 fields #> Geometry type: POINT #> Dimension:     XY #> Bounding box:  xmin: -122.444 ymin: 37.75765 xmax: -122.3931 ymax: 37.79074 #> Geodetic CRS:  WGS 84 #> # A tibble: 50 × 10 #>    service_request_id status service_name  service_code       requested_datetime #>  * <chr>              <chr>  <chr>         <chr>              <chr>              #>  1 1020139511         open   Shared Spaces 6050cd8ce8961bbfa… 2023-12-08T23:54:… #>  2 1020139479         open   Shared Spaces 6050cd8ce8961bbfa… 2023-12-05T22:52:… #>  3 1020139460         open   Shared Spaces 6050cd8ce8961bbfa… 2023-12-01T17:20:… #>  4 1020139449         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-29T23:30:… #>  5 1020139418         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-27T18:53:… #>  6 1020139417         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-27T18:43:… #>  7 1020139414         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-27T18:31:… #>  8 1020139411         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-27T18:23:… #>  9 1020139392         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-17T02:14:… #> 10 1020139391         open   Shared Spaces 6050cd8ce8961bbfa… 2023-11-17T02:14:… #> # ℹ 40 more rows #> # ℹ 5 more variables: updated_datetime <chr>, address <chr>, description <chr>, #> #   status_notes <chr>, geometry <POINT [°]> o311_request(\"1020139511\") #> Simple feature collection with 1 feature and 7 fields #> Geometry type: POINT #> Dimension:     XY #> Bounding box:  xmin: -122.4183 ymin: 37.775 xmax: -122.4183 ymax: 37.775 #> Geodetic CRS:  WGS 84 #> # A tibble: 1 × 8 #>   service_request_id status service_name  service_code        requested_datetime #> * <chr>              <chr>  <chr>         <chr>               <chr>              #> 1 1020139511         open   Shared Spaces 6050cd8ce8961bbfa3… 2023-12-08T23:54:… #> # ℹ 3 more variables: updated_datetime <chr>, address <chr>, #> #   geometry <POINT [°]>"},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"bulk-queries","dir":"Articles","previous_headings":"Making requests","what":"Bulk queries","title":"r311: An R interface to the open311 standard","text":"Many endpoints define page limit meaning responses divided pages. query without parameters returns first page. Pagination can controlled page argument. control pagination, o311_request_all function can come handy. automatically iterates pages heuristically decides stop. following example retrieves data first two pages, resulting tibble 100 service requests.","code":"o311_request_all(max_pages = 2) #> Simple feature collection with 100 features and 10 fields #> Geometry type: POINT #> Dimension:     XY #> Bounding box:  xmin: -122.5111 ymin: 37.73277 xmax: -122.3931 ymax: 37.79207 #> Geodetic CRS:  WGS 84 #> # A tibble: 100 × 11 #>    service_request_id status service_name               service_code description #>    <chr>              <chr>  <chr>                      <chr>        <chr>       #>  1 1020140726         open   Abandoned Vehicles         518d5d52601… test        #>  2 1020140725         open   Park Requests              518d5cc9601… test        #>  3 1020140302         open   Street or Sidewalk Cleani… 518d5892601… Test - gar… #>  4 1020139578         open   Street or Sidewalk Cleani… 518d5892601… Garbage on… #>  5 1020139514         open   Encampment                 55e8409a45f… NA          #>  6 1020139511         open   Shared Spaces              6050cd8ce89… NA          #>  7 1020139507         open   Tree Maintenance           518d595d601… southbound… #>  8 1020139506         open   Pothole & Street Issues    50fea9c24aa… southbound… #>  9 1020139503         open   Tree Maintenance           518d595d601… southbound… #> 10 1020139502         open   Pothole & Street Issues    50fea9c24aa… southbound… #> # ℹ 90 more rows #> # ℹ 6 more variables: requested_datetime <chr>, updated_datetime <chr>, #> #   address <chr>, media_url <chr>, status_notes <chr>, geometry <POINT [°]>"},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"non-standard-parameters","dir":"Articles","previous_headings":"Making requests","what":"Non-standard parameters","title":"r311: An R interface to the open311 standard","text":"r311 implicitly supports API extensions introducing custom paths parameters. One API Klarschiff Rostock based CitySDK. Klarschiff CitySDK defines number non-default paths parameters extend filtering abilities open311 requests. Available parameters can usually found respective documentation (e.g. GitHub Klarschiff CitySDK). following query returns last 50 requests tagged “idea” keyword. custom parameters can also alter shape output. following example, query just count total requests using just_count parameter. result 1×1 tibble containing count value. CitySDK extensions also offers additional URL paths can queried using generic o311_query function.","code":"o311_api(\"Rostock\") tickets <- o311_requests(keyword = \"idea\", max_requests = 50) o311_requests(just_count = TRUE) #> # A tibble: 1 × 1 #>   value #>   <int> #> 1  3776 poly <- o311_query(\"areas\") plot(poly$grenze) plot(tickets$geometry, add = TRUE, pch = 16)"},{"path":"https://jslth.github.io/r311/articles/r311.html","id":"cleanup","dir":"Articles","previous_headings":"","what":"Cleanup","title":"r311: An R interface to the open311 standard","text":"Endpoint data stored persistently sessions can create database open311 endpoints. database stored system’s user directory returned tools::R_user_dir(\"r311\"). reset database, run default back endpoints defined r311 remove endpoints manually added o311_add_endpoints.","code":"o311_reset_endpoints()"},{"path":"https://jslth.github.io/r311/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Jonas Lieth. Author, maintainer.","code":""},{"path":"https://jslth.github.io/r311/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lieth J (2024). r311: R interface open311 standard. R package version 0.3.1, https://jslth.github.io/r311/, https://github.com/JsLth/r311, https://github.com/jslth/r311.","code":"@Manual{,   title = {r311: R interface to the open311 standard},   author = {Jonas Lieth},   year = {2024},   note = {R package version 0.3.1, https://jslth.github.io/r311/, https://github.com/JsLth/r311},   url = {https://github.com/jslth/r311}, }"},{"path":"https://jslth.github.io/r311/index.html","id":"r311","dir":"","previous_headings":"","what":"R interface to the open311 standard","title":"R interface to the open311 standard","text":"r311 R interface international standard open311. Open311 APIs used civic issue management public service communication. standard allows administrations better manage citizen requests, citizens easily submit requests, (hence package) researchers data scientists access data regarding public service communication. r311 supports seamless management supplementation available endpoints, selection appropriate APIs access, retrieval civic service request data. Custom queries extensions (e.g. CitySDK) implicitly supported. r311 designed require minimal amount dependencies, allow easy integration common R frameworks tidyverse, sf xml2.","code":""},{"path":"https://jslth.github.io/r311/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"R interface to the open311 standard","text":"can install development version open311 GitHub :","code":"# install.packages(\"remotes\") remotes::install_github(\"JsLth/r311\")"},{"path":"https://jslth.github.io/r311/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"R interface to the open311 standard","text":"following example loads r311, sets jurisdiction retrieves small amount data service tickets Cologne, Germany.","code":"library(r311)  o311_api(\"Cologne\") o311_requests() #> Simple feature collection with 50 features and 14 fields #> Geometry type: POINT #> Dimension:     XY #> Bounding box:  xmin: 6.833799 ymin: 50.85938 xmax: 7.10085 ymax: 51.0604 #> Geodetic CRS:  WGS 84 #> # A tibble: 50 × 15 #>    service_request_id status service_code service_name               description #>  * <chr>              <chr>  <chr>        <chr>                      <chr>       #>  1 A-173480           open   009          Schrottfahrzeuge/-fahrräd… \"Rondorfer… #>  2 A-173476           open   012          Straßenbaustellen          \"Baustelle… #>  3 A-173472           open   012          Straßenbaustellen          \"Guten Tag… #>  4 A-173470           open   009          Schrottfahrzeuge/-fahrräd… \"Unabgesch… #>  5 A-173455           open   009          Schrottfahrzeuge/-fahrräd… \"Am Rand d… #>  6 A-173438           open   006          Gully verstopft            \"Bachemer … #>  7 A-173430           open   009          Schrottfahrzeuge/-fahrräd… \"Auf der W… #>  8 A-173409           open   009          Schrottfahrzeuge/-fahrräd… \"Räder ste… #>  9 A-173407           open   009          Schrottfahrzeuge/-fahrräd… \"Ohne Kenn… #> 10 A-173390           open   009          Schrottfahrzeuge/-fahrräd… \"Auto steh… #> # ℹ 40 more rows #> # ℹ 10 more variables: agency_responsible <lgl>, service_notice <lgl>, #> #   address_id <lgl>, requested_datetime <chr>, updated_datetime <chr>, #> #   address <chr>, zipcode <lgl>, status_notes <chr>, media_url <chr>, #> #   geometry <POINT [°]>"},{"path":"https://jslth.github.io/r311/reference/o311_api.html","id":null,"dir":"Reference","previous_headings":"","what":"Select an open311 API — o311_api","title":"Select an open311 API — o311_api","text":"Select open311 API attach active session. open311 API implementation open311 standard. consists endpoint name (e.g. city), root URL, jurisdiction ID. unambiguously identify API, can provide endpoint, jurisdiction ID, . input matched o311_endpoints select API. selected API available o311_* functions session terminated overwritten.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_api.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select an open311 API — o311_api","text":"","code":"o311_api(endpoint = NULL, jurisdiction = NULL, format = c(\"json\", \"xml\"))"},{"path":"https://jslth.github.io/r311/reference/o311_api.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select an open311 API — o311_api","text":"endpoint [character] Name endpoint runs open311 API. usually city, can provider open311 API. jurisdiction [character] ID jurisdiction served open311 API. jurisdiction ID usually root URL jurisdiction website, e.g. \"sfgov.org\" San Francisco. format [character] Response format. Must one \"json\" \"xml\". Defaults \"json\" simplification difficult unsafe xml2 objects. advisable use \"json\" whenever possible applicable. Additionally, \"xml\" requires xml2 package queries xmlconvert package simplification.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_api.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select an open311 API — o311_api","text":"list containing important information given jurisdiction, invisibly. list attached session can retrieved calling o311_api() without arguments.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_api.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Select an open311 API — o311_api","text":"theory, several jurisdictions can exist single endpoints, e.g. region serves multiple jurisdictions. Similarly, multiple endpoints can exist single jurisdiction, e.g. provider set production test endpoints jurisdictions. Providing endpoint jurisdiction thus safe way identify API. default, handful endpoints supported. list currently supported endpoints, run o311_endpoints. can add non-default endpoints using o311_add_endpoint.","code":""},{"path":[]},{"path":"https://jslth.github.io/r311/reference/o311_api.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Select an open311 API — o311_api","text":"","code":"# cities are matched using regex o311_api(\"Cologne\")  # passing a jurisdiction is more explicit o311_api(jurisdiction = \"stadt-koeln.de\")  # calls without arguments return the current API o311_api() #> $name #> [1] \"Köln / Cologne, DE\" #>  #> $root #> [1] \"https://sags-uns-archiv.stadt-koeln.de/georeport/v2/\" #>  #> $docs #> [1] \"https://sags-uns-archiv.stadt-koeln.de/seiten/open311\" #>  #> $jurisdiction #> [1] \"stadt-koeln.de\" #>  #> $key #> [1] FALSE #>  #> $pagination #> [1] TRUE #>  #> $limit #> [1] 50 #>  #> $json #> [1] TRUE #>  #> $dialect #> [1] \"Mark-a-Spot\" #>"},{"path":"https://jslth.github.io/r311/reference/o311_discovery.html","id":null,"dir":"Reference","previous_headings":"","what":"API discovery — o311_discovery","title":"API discovery — o311_discovery","text":"Retrieve discovery information mounted endpoint.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_discovery.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"API discovery — o311_discovery","text":"","code":"o311_discovery()"},{"path":"https://jslth.github.io/r311/reference/o311_discovery.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"API discovery — o311_discovery","text":"list containing details given open311 API.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Endpoints — o311_add_endpoint","title":"Endpoints — o311_add_endpoint","text":"Modify examine defined open311 endpoints. o311_endpoints() retrieves list endpoints including additional information. o311_add_endpoint adds list define new endpoint can used queries. o311_reset_endpoints restores initial state endpoints list.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Endpoints — o311_add_endpoint","text":"","code":"o311_add_endpoint(   name,   root,   jurisdiction = NULL,   key = FALSE,   pagination = FALSE,   limit = NULL,   json = TRUE,   dialect = NULL )  o311_reset_endpoints()  o311_endpoints(...)"},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Endpoints — o311_add_endpoint","text":"name [character] Name endpoint / city. name can arbitrary serves identification [o311_api]. root [character] Base URL endpoint sending production-grade requests. root URL commonly points \"georeport/v2/\". jurisdiction [character] Unique identifier jurisdiction. jurisdiction typically defined domain respective city website. optional endpoints serve one jurisdiction. key [logical] API key mandatory? pagination [logical] requests responses paginated? limit [integer] paginated, many requests one page contain? json [logical] JSON responses supported? FALSE, defaults \"XML\" responses. See also o311_api. dialect [character] open311 extension endpoint built . Common dialects include CitySDK, Connected Bits, SeeClickFix Mark--Spot. Currently, argument nothing, used future adjust response handling based dialect. ... List key-value pairs pair filter. key represents column value requested column value. keys must present column names o311_endpoints().","code":""},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Endpoints — o311_add_endpoint","text":"o311_endpoints, dataframe containing relevant information endpoint. o311_add_endpoint, new endpoint, invisibly. o311_reset_endpoints returns NULL invisibly. new endpoint duplicate, NULL returned invisibly.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Endpoints — o311_add_endpoint","text":"o311_endpoints() returns static list defined package installation directory. list contains limited number endpoints proven work time package development. include newer/smaller/less known endpoints test APIs. can manually added using o311_add_endpoint.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Endpoints — o311_add_endpoint","text":"function uses R_user_dir persistently store custom endpoints data sessions. set different directory, may use options(\"o311_user_dir\"). clean , run o311_reset_endpoints() deletes package-specific user directory defaults back system.file(\"endpoints.json\", package = \"r311\").","code":""},{"path":[]},{"path":"https://jslth.github.io/r311/reference/o311_endpoints.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Endpoints — o311_add_endpoint","text":"","code":"# read default endpoints o311_endpoints() #> # A tibble: 62 × 9 #>    name            root  docs  jurisdiction key   pagination limit json  dialect #>    <chr>           <chr> <chr> <chr>        <lgl> <lgl>      <int> <lgl> <chr>   #>  1 Annaberg-Buchh… http… http… annberg-buc… FALSE TRUE          50 TRUE  Mark-a… #>  2 Bloomington, IN http… NA    bloomington… FALSE TRUE        1000 TRUE  uReport #>  3 Bonn, DE        http… http… bonn.de      FALSE TRUE         100 TRUE  Mark-a… #>  4 Boston, MA      http… http… boston.gov   FALSE TRUE          50 TRUE  Connec… #>  5 Brookline, MA   http… http… brooklinema… FALSE TRUE          50 TRUE  Connec… #>  6 Austin, TX      http… http… NA           FALSE TRUE          50 TRUE  Connec… #>  7 Chicago, IL     http… http… cityofchica… FALSE TRUE          50 TRUE  Connec… #>  8 Newport News, … http… http… cityofnewpo… FALSE TRUE          50 TRUE  Connec… #>  9 San Diego, CA   http… http… sandiego.gov FALSE TRUE          50 TRUE  Connec… #> 10 Köln / Cologne… http… http… stadt-koeln… FALSE TRUE          50 TRUE  Mark-a… #> # ℹ 52 more rows  # get all endpoints powered by Connected Bits o311_endpoints(dialect = \"Connected Bits\") #> # A tibble: 7 × 9 #>   name             root  docs  jurisdiction key   pagination limit json  dialect #>   <chr>            <chr> <chr> <chr>        <lgl> <lgl>      <int> <lgl> <chr>   #> 1 Boston, MA       http… http… boston.gov   FALSE TRUE          50 TRUE  Connec… #> 2 Brookline, MA    http… http… brooklinema… FALSE TRUE          50 TRUE  Connec… #> 3 Austin, TX       http… http… NA           FALSE TRUE          50 TRUE  Connec… #> 4 Chicago, IL      http… http… cityofchica… FALSE TRUE          50 TRUE  Connec… #> 5 Newport News, VA http… http… cityofnewpo… FALSE TRUE          50 TRUE  Connec… #> 6 San Diego, CA    http… http… sandiego.gov FALSE TRUE          50 TRUE  Connec… #> 7 San Francisco, … http… http… sfgov.org    FALSE TRUE          50 TRUE  Connec…  # add a new endpoint o311_add_endpoint(name = \"test\", root = \"test.org/georeport/v2\")  # read new endpoints o311_endpoints() #> # A tibble: 63 × 9 #>    name            root  docs  jurisdiction key   pagination limit json  dialect #>    <chr>           <chr> <chr> <chr>        <lgl> <lgl>      <int> <lgl> <chr>   #>  1 Annaberg-Buchh… http… http… annberg-buc… FALSE TRUE          50 TRUE  Mark-a… #>  2 Bloomington, IN http… NA    bloomington… FALSE TRUE        1000 TRUE  uReport #>  3 Bonn, DE        http… http… bonn.de      FALSE TRUE         100 TRUE  Mark-a… #>  4 Boston, MA      http… http… boston.gov   FALSE TRUE          50 TRUE  Connec… #>  5 Brookline, MA   http… http… brooklinema… FALSE TRUE          50 TRUE  Connec… #>  6 Austin, TX      http… http… NA           FALSE TRUE          50 TRUE  Connec… #>  7 Chicago, IL     http… http… cityofchica… FALSE TRUE          50 TRUE  Connec… #>  8 Newport News, … http… http… cityofnewpo… FALSE TRUE          50 TRUE  Connec… #>  9 San Diego, CA   http… http… sandiego.gov FALSE TRUE          50 TRUE  Connec… #> 10 Köln / Cologne… http… http… stadt-koeln… FALSE TRUE          50 TRUE  Mark-a… #> # ℹ 53 more rows  # reset endpoints back to default o311_reset_endpoints()"},{"path":"https://jslth.github.io/r311/reference/o311_ok.html","id":null,"dir":"Reference","previous_headings":"","what":"Is open311 API ok? — o311_ok","title":"Is open311 API ok? — o311_ok","text":"Checks whether open311 API mounted o311_api reachable returns valid requests response.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_ok.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is open311 API ok? — o311_ok","text":"","code":"o311_ok(error = FALSE)"},{"path":"https://jslth.github.io/r311/reference/o311_ok.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is open311 API ok? — o311_ok","text":"error [logical] Whether return logical error message describing API ok.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_ok.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is open311 API ok? — o311_ok","text":"logical describing whether API reachable . error = TRUE, returns corresponding error object one occurs.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_ok.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is open311 API ok? — o311_ok","text":"","code":"if (FALSE) { # check if Bonn API is reachable o311_api(\"Bonn\") o311_ok()  # check if Helsinki API is reachable - fails o311_add_endpoint(   name = \"Helsinki\",   root = \"asiointi.hel.fi/palautews/rest/v1/\" )  o311_api(\"Helsinki\") o311_ok()  # return error message o311_ok(error = TRUE) }"},{"path":"https://jslth.github.io/r311/reference/o311_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Query an open311 endpoint — o311_query","title":"Query an open311 endpoint — o311_query","text":"Low-level function perform generic request API currently attached o311_api. open311 implementations support unique operations included official documentation. function can used access URL paths.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query an open311 endpoint — o311_query","text":"","code":"o311_query(path, ..., simplify = TRUE)"},{"path":"https://jslth.github.io/r311/reference/o311_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query an open311 endpoint — o311_query","text":"path Path appendix used access endpoint-specific operations. ... Additional query parameters. simplify Whether simplify output using jsonlite::toJSON(..., simplify = TRUE).","code":""},{"path":"https://jslth.github.io/r311/reference/o311_query.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query an open311 endpoint — o311_query","text":"parsed query output, either list dataframe.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_query.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query an open311 endpoint — o311_query","text":"","code":"if (FALSE) { o311_query(\"rostock\")  # manually query discovery o311_query(path = \"discovery\", simplify = FALSE)  # query a custom path defined by the Klarschiff API o311_query(path = \"areas\") }"},{"path":"https://jslth.github.io/r311/reference/o311_requests.html","id":null,"dir":"Reference","previous_headings":"","what":"Get civic service request data — o311_requests","title":"Get civic service request data — o311_requests","text":"Get civic service request data registered open311 endpoint. o311_request queries single service request ID. o311_requests queries single page service requests. o311_request_all tries iterate pages endpoint return complete dataset service requests.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_requests.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get civic service request data — o311_requests","text":"","code":"o311_requests(   service_code = NULL,   start_date = NULL,   end_date = NULL,   status = NULL,   page = NULL,   ... )  o311_request(service_request_id, ...)  o311_request_all(   service_code = NULL,   start_date = NULL,   end_date = NULL,   status = NULL,   ...,   max_pages = Inf,   progress = TRUE )"},{"path":"https://jslth.github.io/r311/reference/o311_requests.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get civic service request data — o311_requests","text":"service_code [character] IDs service types queried. Defaults available codes endpoint. list available service codes can retrieved using o311_services. start_date, end_date [POSIXt] Start date end date query results. Must date-time objects. specified, defaults last 90 days. status [character] Status public service ticket. Can one \"open\" \"closed\". NULL, returns types tickets. page [integer] Page response. endpoints paginate responses way limited number tickets returned query. retrieve data, consider using o311_request_all. ... endpoint-specific parameters documented respective endpoint reference. service_request_id [character] Identifier single service request. Request IDs can usually retrieved o311_requests. max_pages [integer] Number pages search result returned. progress [logical] Whether show waiter indicating current page iteration.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_requests.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get civic service request data — o311_requests","text":"o311_request_all applies number checks determine stop searching. First, many endpoints return error last page exceeded. Thus, last page request failed, break. Second, exceeding pagination limit return error, response compared previous response. identical, response discarded previous responses returned. Finally, page exceeds max_pages, responses point returned. open311 leaves space endpoints implement request parameters. parameters can provided using dot arguments. arguments validated pre-processed. Date-time objects must formatted according w3c standard. common parameters include: q: Perform text search across requests. update_after/updated_before: Limit request according  request update dates. per_page: Specifiy maximum number requests per page. extensions: Adds nested attribute  \"extended_attributes\" response. long/lat/radius: Searches requests fixed radius  around coordinate. dot arguments deviate open311 standard, guaranteed available every endpoint might removed without notice. Refer endpoint docs learn custom parameters (o311_endpoints()$docs).","code":""},{"path":[]},{"path":"https://jslth.github.io/r311/reference/o311_requests.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get civic service request data — o311_requests","text":"","code":"if (FALSE) { o311_api(\"chicago\")  # retrieve requests from the last two days now <- Sys.time() two_days <- 60 * 60 * 24 * 2 o311_requests(end_date = now, start_date = now - two_days)  # retrieve only open tickets tickets <- o311_requests(status = \"open\")  # request the first ticket of the previous response o311_request(tickets$service_request_id[1])  # request all data o311_request_all()  # request data of the first 5 pages o311_request_all(max_pages = 5) }"},{"path":"https://jslth.github.io/r311/reference/o311_services.html","id":null,"dir":"Reference","previous_headings":"","what":"Get service list — o311_services","title":"Get service list — o311_services","text":"Get list available services. Services unique endpoint / city thus require attached jurisdiction using o311_api.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_services.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get service list — o311_services","text":"","code":"o311_services(...)  o311_service(service_code, ...)"},{"path":"https://jslth.github.io/r311/reference/o311_services.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get service list — o311_services","text":"... endpoint-specific parameters documented respective endpoint reference. service_code Identifier single service definition. Service codes can usually retrieved o311_services.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_services.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get service list — o311_services","text":"dataframe list containing information service.","code":""},{"path":"https://jslth.github.io/r311/reference/o311_services.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get service list — o311_services","text":"","code":"if (FALSE) { # set up a jurisdiction o311_add_endpoint(   name = \"helsinki test\",   root = \"https://dev.hel.fi/open311-test/v1/\" ) o311_api(\"helsinki test\")  # get a list of all services services <- o311_services()  # get a service list in finnish # the locale parameter is specific to the Helsinki API o311_services(locale = \"fi_FI\")  # inspect a service code o311_service(services$service_code[1]) }"}]