Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MansMeg committed Jan 27, 2024
1 parent d247535 commit 52fd866
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
Binary file modified vignettes/pxd_example.rda
Binary file not shown.
Binary file modified vignettes/pxfp_example.rda
Binary file not shown.
9 changes: 8 additions & 1 deletion vignettes/pxweb.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ pxfp <- pxweb_get(
)
save(pxfp, file = "vignettes/pxfp_example.rda")
pxweb_cite_example <- capture.output(pxweb_cite(pxd))
```


Expand Down Expand Up @@ -379,10 +381,15 @@ as.data.frame(pxdc)

Finally, if we use the data, we can easily create a citation for a `pxweb_data` object using the `pxweb_cite()` function. For full reproducibility, please also cite the package.

```{r, message=FALSE, eval=TRUE}
```{r, message=FALSE, eval=FALSE}
pxweb_cite(pxd)
```

```{r, message=FALSE, eval=TRUE, echo=FALSE}
load("pxweb_cite_example.rda")
cat(pxweb_cite_example, sep = "\n")
```


## Known issues and troubleshooting

Expand Down
8 changes: 4 additions & 4 deletions vignettes/pxweb.html
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ <h3>Downloading data</h3>
<span id="cb29-4"><a href="#cb29-4" tabindex="-1"></a> pxq</span>
<span id="cb29-5"><a href="#cb29-5" tabindex="-1"></a>)</span>
<span id="cb29-6"><a href="#cb29-6" tabindex="-1"></a>pxfp</span></code></pre></div>
<pre><code>## [1] &quot;/var/folders/x9/dsgck_4s5mx2nrzzs8zd64rc0000gq/T//RtmpFdmiD7/34f86608f98d03b3cca3f1771a5081c3d3846465.px&quot;</code></pre>
<pre><code>## [1] &quot;/var/folders/x9/dsgck_4s5mx2nrzzs8zd64rc0000gq/T//RtmpFdmiD7/50026bd2b2d8df2e3f190ca568b3b587d8207465.px&quot;</code></pre>
<p>If the queries are large (contain more values than the PXWEB API
maximum allowed values), the query is chunked into optimal chunks and is
then downloaded sequentially. PXWEB data objects are then combined into
Expand Down Expand Up @@ -894,8 +894,8 @@ <h2>Citation</h2>
<code>pxweb_data</code> object using the <code>pxweb_cite()</code>
function. For full reproducibility, please also cite the package.</p>
<div class="sourceCode" id="cb40"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb40-1"><a href="#cb40-1" tabindex="-1"></a><span class="fu">pxweb_cite</span>(pxd)</span></code></pre></div>
<pre><code>## Statistics Sweden (2024). &quot;Population by region, marital status, age,
## sex, observations and year.&quot; [Data accessed 2024-01-27 16:08:12.926294
<pre><code>## Statistics Sweden (2024). Population by region, marital status, age,
## sex, observations and year. [Data accessed 2024-01-27 16:19:42.712139
## using pxweb R package 0.16.3],
## &lt;https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy&gt;.
##
Expand All @@ -908,7 +908,7 @@ <h2>Citation</h2>
## address = {Stockholm, Sweden},
## year = {2024},
## url = {https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy},
## note = {[Data accessed 2024-01-27 16:08:12.926294 using pxweb R package 0.16.3]},
## note = {[Data accessed 2024-01-27 16:19:42.712139 using pxweb R package 0.16.3]},
## }
## Kindly cite the pxweb R package as follows:
##
Expand Down
Binary file added vignettes/pxweb_cite_example.rda
Binary file not shown.

0 comments on commit 52fd866

Please sign in to comment.