Articles by HighlandR

Enter SadMan

February 2, 2018 | HighlandR

Yet more Metalliplots I’m just going to tidy up some issues from my last post where I did some tidytext analysis on the legendary rockers - Metallica. It was a fun way to pass some time and keep my hand in with text mining, something I st...
[Read more...]

Hardwired..for tidy text

January 29, 2018 | HighlandR

Song lyric and sentiment analysis for all So - a while back I did a tidy text analysis on Faith No More lyrics. I had thought about doing this with Metallica album lyrics, as they have had a long career, spanning thier late teens/twenties to...
[Read more...]

Data Driven DIY

January 19, 2018 | HighlandR

Statisfix - Which fixing should I buy? I have a bathroom cabinet to put up. It needs to go onto a tiled plasterboard (drywall) wall. Because of the tiles, I can’t use the fixings I normally use to keep heavy objects fixed to the wall. A...
[Read more...]

Data Driven DIY

January 19, 2018 | HighlandR

Statisfix - Which fixing should I buy? I have a bathroom cabinet to put up. It needs to go onto a tiled plasterboard (drywall) wall. Because of the tiles, I can’t use the fixings I normally use to keep heavy objects fixed to the wall. A...
[Read more...]

Time To Shine

December 29, 2017 | HighlandR

Blogging and social media for introverts - How to spot an introvert You may have seen David Robinson’s recent post encouraging R users to start blogging. Some folk will willingly act on this advice, and others won’t. For those that won... [Read more...]

Time To Shine

December 29, 2017 | HighlandR

Blogging and social media for introverts - How to spot an introvert You may have seen David Robinson’s recent post encouraging R users to start blogging. Some folk will willingly act on this advice, and others won’t. For those that won...
[Read more...]

Time To Shine

December 29, 2017 | HighlandR

Blogging and social media for introverts - How to spot an introvert You may have seen David Robinson’s recent post encouraging R users to start blogging. Some folk will willingly act on this advice, and others won’t. For those that won...
[Read more...]

Let it flow, let it flow, let it flow……

December 20, 2017 | HighlandR

Animating dot plots to demonstrate patient flow - Dots.. This is not the blog post I’d originally intended to write. But I’m glad - because this one is so much better. Some background. I’m one of the few Scotland based members of Ap...
[Read more...]

Let it flow, let it flow, let it flow……

December 20, 2017 | HighlandR

Animating dot plots to demonstrate patient flow - Dots.. This is not the blog post I’d originally intended to write. But I’m glad - because this one is so much better. Some background. I’m one of the few Scotland based members of Ap... [Read more...]

Let it flow, let it flow, let it flow……

December 20, 2017 | HighlandR

Animating dot plots to demonstrate patient flow - Dots.. This is not the blog post I’d originally intended to write. But I’m glad - because this one is so much better. Some background. I’m one of the few Scotland based members of Ap...
[Read more...]

A teeny tiny Twitter tale

November 5, 2017 | HighlandR

Use of social media within the NHS to raise awareness of dangerous conditions - We had an event at work today, bringing together clinicians and QI staff across a range of disciplines and services to provide some education and raise awareness ... [Read more...]

A teeny tiny Twitter tale

November 5, 2017 | HighlandR

Use of social media within the NHS to raise awareness of dangerous conditions - We had an event at work today, bringing together clinicians and QI staff across a range of disciplines and services to provide some education and raise awareness ...
[Read more...]

A teeny tiny Twitter tale

November 5, 2017 | HighlandR

Use of social media within the NHS to raise awareness of dangerous conditions - We had an event at work today, bringing together clinicians and QI staff across a range of disciplines and services to provide some education and raise awareness ...
[Read more...]

Mapping to a ‘t'(map)

August 31, 2017 | HighlandR

tmap More maps of the Highlands? Yep, same as last time, but no need to install dev versions of anything, we can get awesome maps courtesy of the tmap package. Get the shapefile from the last post
<span class="n">library</span><span class="p">(</span><span class="n">tmap</span><span class="p">)</span>
<span class="n">library</span><span class="p">(</span><span class="n">tmaptools</span><span class="p">)</span>
<span class="n">library</span><span class="p">(</span><span class="n">viridis</span><span class="p">)</span>

<span class="n">scot</span> <span class="o"><-</span> <span class="n">read_shape</span><span class="p">(</span><span class="s2">"SG_SIMD_2016.shp"</span><span class="p">,</span> <span class="n">as.sf</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">)</span>
<span class="n">highland</span> <span class="o"><-</span> <span class="p">(</span><span class="n">scot</span><span class="p">[</span><span class="n">scot</span><span class="o">$</span><span class="n">LAName</span><span class="o">==</span><span class="s2">"Highland"</span><span class="p">,</span> <span class="p">])</span>


<span class="c1">#replicate plot from previous blog post:
</span>
<span class="n">quint</span> <span class="o"><-</span> <span class="n">tm_shape</span><span class="p">(</span><span class="n">highland</span><span class="p">)</span> <span class="o">+</span>
  <span class="n">tm_fill</span><span class="p">(</span><span class="n">col</span> <span class="o">=</span> <span class="s2">"Quintile"</span><span class="p">,</span>
          <span class="n">palette</span> <span class="o">=</span> <span class="n">viridis</span><span class="p">(</span><span class="n">n</span><span class="o">=</span><span class="m">5</span><span class="p">,</span> <span class="n">direction</span> <span class="o">=</span> <span class="m">-1</span><span class="p">,</span><span class="n">option</span> <span class="o">=</span> <span class="s2">"C"</span><span class="p">),</span>
          <span class="n">fill.title</span> <span class="o">=</span> <span class="s2">"Quintile"</span><span class="p">,</span>
          <span class="n">title</span> <span class="o">=</span> <span class="s2">"SIMD 2016 - Highland Council Area by Quintile"</span><span class="p">)</span>

<span class="n">quint</span> <span class="c1"># plot
</span>
<span class="n">ttm</span><span class="p">()</span> <span class="c1">#switch between static and interactive - this will use interactive
</span><span class="n">quint</span> <span class="c1"># or use last_map()
# in R Studio you will find leaflet map in your Viewer tab
</span>
<span class="n">ttm</span><span class="p">()</span> <span class="c1"># return to plotting
</span>
The results: One really nice thing is that because the polygons don’... [Read more...]

Mapping to a ‘t'(map)

August 31, 2017 | HighlandR

tmap More maps of the Highlands? Yep, same as last time, but no need to install dev versions of anything, we can get awesome maps courtesy of the tmap package. Get the shapefile from the last post
<span class="w">
</span><span class="n">library</span><span class="p">(</span><span class="n">tmap</span><span class="p">)</span><span class="w">
</span><span class="n">library</span><span class="p">(</span><span class="n">tmaptools</span><span class="p">)</span><span class="w">
</span><span class="n">library</span><span class="p">(</span><span class="n">viridis</span><span class="p">)</span><span class="w">

</span><span class="n">scot</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">read_shape</span><span class="p">(</span><span class="s2">"SG_SIMD_2016.shp"</span><span class="p">,</span><span class="w"> </span><span class="n">as.sf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">
</span><span class="n">highland</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="p">(</span><span class="n">scot</span><span class="p">[</span><span class="n">scot</span><span class="o">$</span><span class="n">LAName</span><span class="o">==</span><span class="s2">"Highland"</span><span class="p">,</span><span class="w"> </span><span class="p">])</span><span class="w">


</span><span class="c1">#replicate plot from previous blog post:</span><span class="w">

</span><span class="n">quint</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">tm_shape</span><span class="p">(</span><span class="n">highland</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w">
  </span><span class="n">tm_fill</span><span class="p">(</span><span class="n">col</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Quintile"</span><span class="p">,</span><span class="w">
          </span><span class="n">palette</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">viridis</span><span class="p">(</span><span class="n">n</span><span class="o">=</span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="n">direction</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">-1</span><span class="p">,</span><span class="n">option</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"C"</span><span class="p">),</span><span class="w">
          </span><span class="n">fill.title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Quintile"</span><span class="p">,</span><span class="w">
          </span><span class="n">title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"SIMD 2016 - Highland Council Area by Quintile"</span><span class="p">)</span><span class="w">

</span><span class="n">quint</span><span class="w"> </span><span class="c1"># plot</span><span class="w">

</span><span class="n">ttm</span><span class="p">()</span><span class="w"> </span><span class="c1">#switch between static and interactive - this will use interactive</span><span class="w">
</span><span class="n">quint</span><span class="w"> </span><span class="c1"># or use last_map()</span><span class="w">
</span><span class="c1"># in R Studio you will find leaflet map in your Viewer tab</span><span class="w">

</span><span class="n">ttm</span><span class="p">()</span><span class="w"> </span><span class="c1"># return to plotting</span><span class="w">

</span>
The results: One really nice thing is that because the polygons don’...
[Read more...]

Simply Mapping

August 21, 2017 | HighlandR

Give me fuel, give me fire, reduced deprivation's my desire - First attempts with simple features The latest edition of the Scottish Index of Multiple Deprivation (SIMD) was released last year, and has been getting a bit more promotion recen... [Read more...]

Simply Mapping

August 21, 2017 | HighlandR

Easy mapping with Simple Features - First attempts with simple features The latest edition of the Scottish Index of Multiple Deprivation (SIMD) was released last year, and has been getting a bit more promotion recently as part of Scotland’...
[Read more...]
1 3 4 5 6

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)