Skip to content

Commit 48c3eee

Browse files
committed
R guide edit
1 parent a68513c commit 48c3eee

15 files changed

Lines changed: 1030 additions & 133 deletions

File tree

.DS_Store

6 KB
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hash": "5bc7f0beba5bc8c6b5b2ef8ccd2afa2a",
3+
"result": {
4+
"engine": "knitr",
5+
"markdown": "---\ntitle: \"Translating Felten et al's AI exposure index into UK data\"\nauthor: \"Dan Olner\"\ndate: \"2025-12-09\"\ncategories: [data]\nexecute:\n echo: false\n warning: false\n error: false\n---\n\n\n::: {.cell}\n\n:::\n\n\n\n## Felten UK\n\nI always try to have a fully open data/methods pipeline, so it's possible to replicate what I've done (even it's just -futur-eme doing the replicating). Sometimes, though, you have to go off-piste and do some \"actually typing into a spreadsheet manually\". This is one of those cases.\n\n",
6+
"supporting": [],
7+
"filters": [
8+
"rmarkdown/pagebreak.lua"
9+
],
10+
"includes": {},
11+
"engineDependencies": {},
12+
"preserve": {},
13+
"postProcess": true
14+
}
15+
}

_freeze/posts/setting_up_w_r_online/index/execute-results/html.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 44 additions & 48 deletions
Large diffs are not rendered by default.

docs/index.xml

Lines changed: 44 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,30 @@
99
<link>https://danolner.github.io/</link>
1010
<atom:link href="https://danolner.github.io/index.xml" rel="self" type="application/rss+xml"/>
1111
<description>Dan Olner&#39;s Data Dispatch</description>
12-
<generator>quarto-1.7.33</generator>
13-
<lastBuildDate>Thu, 15 May 2025 23:00:00 GMT</lastBuildDate>
12+
<generator>quarto-1.7.32</generator>
13+
<lastBuildDate>Tue, 09 Dec 2025 00:00:00 GMT</lastBuildDate>
14+
<item>
15+
<title>Translating Felten et al’s AI exposure index into UK data</title>
16+
<dc:creator>Dan Olner</dc:creator>
17+
<link>https://danolner.github.io/posts/Felten_UK/</link>
18+
<description><![CDATA[
19+
20+
21+
22+
23+
24+
<section id="felten-uk" class="level2">
25+
<h2 class="anchored" data-anchor-id="felten-uk">Felten UK</h2>
26+
<p>I always try to have a fully open data/methods pipeline, so it’s possible to replicate what I’ve done (even it’s just -futur-eme doing the replicating). Sometimes, though, you have to go off-piste and do some “actually typing into a spreadsheet manually”. This is one of those cases.</p>
27+
28+
29+
</section>
30+
31+
]]></description>
32+
<category>data</category>
33+
<guid>https://danolner.github.io/posts/Felten_UK/</guid>
34+
<pubDate>Tue, 09 Dec 2025 00:00:00 GMT</pubDate>
35+
</item>
1436
<item>
1537
<title>Getting started with using R and RStudio (in the cloud or on your own computer)</title>
1638
<dc:creator>Dan Olner</dc:creator>
@@ -23,10 +45,10 @@
2345
2446
<section id="using-r-and-rstudio-1-posit.cloud-in-the-browser-or-2-running-on-your-own-computer" class="level2">
2547
<h2 class="anchored" data-anchor-id="using-r-and-rstudio-1-posit.cloud-in-the-browser-or-2-running-on-your-own-computer">Using R and RStudio: (1) posit.cloud in the browser, or (2) running on your own computer</h2>
26-
<p>I’m running an “R + regional economic data” taster session in June. It won’t be necessary to use R during the session to follow along - <strong>but if you want to have a go at running the code I’ll be talking through and don’t yet have R/RStudio, here’s how to get quickly set up</strong>, either online through a browser, or with R and RStudio installed on your own computer<sup>1</sup>.</p>
27-
<p>To do this, you’ll need to do <strong>one</strong> of the following:</p>
48+
<p>This little guide gets you set up with R and RStudio - either online with posit.cloud through a browser, or with R and RStudio installed on your own computer<sup>1</sup> - and talks through opening up a first R script and using it. (If anything doesn’t make sense, do let me know at d dot olner and gmail dot com).</p>
49+
<p>You’ll need to do <strong>one</strong> of the following:</p>
2850
<ol type="1">
29-
<li><p><strong>Use RStudio in your browser with a <a href="https://posit.cloud">posit.cloud account</a></strong>. The <strong>free version</strong> is limited (very small memory, for instance) but <strong>it’s a very quick and easy option to have a play with R</strong> and will be fine for the taster session. <strong>The next section below talks through setting up in posit.cloud.</strong></p></li>
51+
<li><p><strong>Use RStudio in your browser with a <a href="https://posit.cloud">posit.cloud account</a></strong>. The <strong>free version</strong> is limited (small memory, for instance) but <strong>it’s still a great option for non-intensive task and getting to know R with little effort</strong>. The next section below talks through setting up in posit.cloud.</p></li>
3052
<li><p><strong>Install R and RStudio on your own computer</strong>. If you have a machine where you’re able to install your own software <a href="https://cran.rstudio.com/">then go here</a> to download/install the right version of R for your operating system, and <a href="https://posit.co/download/rstudio-desktop/">here to download/install RStudio</a> (again, pick the correct one for your OS). (Though see bullet point 2 below if using a work machine.)</p></li>
3153
</ol>
3254
<ul>
@@ -39,9 +61,17 @@
3961
<h2 class="anchored" data-anchor-id="if-using-rstudio-online-set-up-a-posit.cloud-account-and-create-your-rstudio-project">If using RStudio online: set up a posit.cloud account and create your RStudio project</h2>
4062
<p>Here’s the steps to get up and running through a browser using posit.cloud.</p>
4163
<ul>
42-
<li><a href="https://login.posit.cloud/login">Create an account at posit.cloud</a> using the ‘sign up’ box, and then log in. That’ll take you to your online workspace.</li>
43-
<li>Click the <strong>new project</strong> button, top right</li>
44-
<li>Select ‘<strong>new project from template</strong>’ (as in the pic below) and then “Data Analysis in R with the tidyverse” (if not already selected). This template comes pre-installed with the tidyverse package, which we’ll be using. Select then click OK down at the bottom. <strong>This will open your RStudio project where we’ll do the coding.</strong></li>
64+
<li><a href="https://login.posit.cloud/login">Create an account at posit.cloud</a> - follow that link and use the ‘don’t have an account? Sign up’ box. <strong>It’ll ask you to check your email for a verification link</strong>, so do that before proceeding.</li>
65+
</ul>
66+
<!-- -->
67+
<ul>
68+
<li><p>Once verified, go back to the posit.cloud tab and log in. You should see a message: “You are logged into Posit. Please select your destination”. Choose ‘Posit Cloud’ (<strong>not Posit Connect Cloud</strong>).&nbsp;<strong>That’ll take you to your online workspace.</strong></p></li>
69+
<li><p>Click the&nbsp;<strong>new project</strong>&nbsp;button, top right</p></li>
70+
<li><p>Depending on what you want to do, either:</p>
71+
<ul>
72+
<li><p>If you want the Tidyverse ready to go (but it’s a slightly older R version): select ‘<strong>new project from template</strong>’ (as in the pic below) and then “Data Analysis in R with the tidyverse” (if not already selected). This template comes pre-installed with the tidyverse package, which we’ll be using. Select then click OK down at the bottom. <strong>This will open your RStudio project where we’ll do the coding. NOTE: if I’m posting examples using posit cloud, I’ll let you know if the older R version is a problem. Mostly it’s fine.</strong></p></li>
73+
<li><p>Otherwise, just select ‘new RStudio project’ for an entirely blank instance of R where you’ll need to install all libraries (but it’s the latest R version).</p></li>
74+
</ul></li>
4575
</ul>
4676
<p><img src="https://danolner.github.io/posts/setting_up_w_r_online/newproject.png" class="img-fluid"></p>
4777
</section>
@@ -94,7 +124,7 @@ NOTE: IF USING RSTUDIO ON YOUR OWN COMPUTER…
94124
</div>
95125
</div>
96126
<div class="callout-body-container callout-body">
97-
<p>We will be using the <strong>tidyverse package/library</strong> in the session. If you’re using posit.cloud, this package comes pre-installed in the template we selected. However, <strong>if you’re using RStudio on your own machine, you will need to install the tidyverse package yourself</strong> before we load it as a library.</p>
127+
<p>If you’re using posit.cloud, this package comes pre-installed in the template we selected. However, <strong>if you’re using RStudio on your own machine, you will need to install the tidyverse package yourself</strong> if you want to use it (you probably will).</p>
98128
<p>To do this, just <strong>run the following code in the console</strong> (the same place we just did our ‘2+2’ test, in the bottom left panel in RStudio.)</p>
99129
<div class="cell">
100130
<div class="sourceCode cell-code" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb5-1"><span class="fu" style="color: #4758AB;
@@ -139,18 +169,17 @@ font-style: inherit;">library</span>(tidyverse)</span></code></pre></div>
139169
<div class="cell-output cell-output-stderr">
140170
<pre><code>── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
141171
✔ dplyr 1.1.4 ✔ readr 2.1.5
142-
✔ forcats 1.0.0 ✔ stringr 1.5.1
143-
✔ ggplot2 3.5.0 ✔ tibble 3.2.1
144-
✔ lubridate 1.9.3 ✔ tidyr 1.3.1
145-
✔ purrr 1.0.2
172+
✔ forcats 1.0.1 ✔ stringr 1.5.2
173+
✔ ggplot2 4.0.0 ✔ tibble 3.3.0
174+
✔ lubridate 1.9.4 ✔ tidyr 1.3.1
175+
✔ purrr 1.1.0
146176
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
147-
✖ purrr::%||%() masks base::%||%()
148177
✖ dplyr::filter() masks stats::filter()
149178
✖ dplyr::lag() masks stats::lag()
150179
ℹ Use the conflicted package (&lt;http://conflicted.r-lib.org/&gt;) to force all conflicts to become errors</code></pre>
151180
</div>
152181
</div>
153-
<p><strong>That’s it for now!</strong> That’ll be enough to be set up for the session. Any questions/issues, let me know at d dot older at sheffield dot ac dot uk or <a href="https://www.linkedin.com/in/danolner/">message me on LinkedIn</a>.</p>
182+
<p><strong>That’s it!</strong> Any questions/issues, let me know at d dot olner at gmail dot com or <a href="https://www.linkedin.com/in/danolner/">message me on LinkedIn</a>.</p>
154183
155184
156185
</section>
@@ -298,17 +327,6 @@ font-style: inherit;">library</span>(tidyverse)</span></code></pre></div>
298327
<guid>https://danolner.github.io/posts/outputs_livelist/</guid>
299328
<pubDate>Wed, 12 Feb 2025 00:00:00 GMT</pubDate>
300329
</item>
301-
<item>
302-
<title></title>
303-
<dc:creator>Dan Olner</dc:creator>
304-
<link>https://danolner.github.io/posts/companies_house_geog/</link>
305-
<description><![CDATA[ undefined ]]></description>
306-
<category>code</category>
307-
<category>firms</category>
308-
<category>geo</category>
309-
<guid>https://danolner.github.io/posts/companies_house_geog/</guid>
310-
<pubDate>Wed, 20 Nov 2024 00:00:00 GMT</pubDate>
311-
</item>
312330
<item>
313331
<title>Open data and code used for ONS subnational data conference</title>
314332
<dc:creator>Dan Olner</dc:creator>

docs/listings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
{
33
"listing": "/index.html",
44
"items": [
5+
"/posts/Felten_UK/index.html",
56
"/posts/setting_up_w_r_online/index.html",
67
"/posts/data_stewards_event/index.html",
78
"/posts/outputs_livelist/index.html",
8-
"/posts/companies_house_geog/index.html",
99
"/posts/ons_subnational_data_conf/index.html",
1010
"/posts/business_demography/index.html",
1111
"/posts/welcome/index.html",

0 commit comments

Comments
 (0)