, 5 tweets, 2 min read Read on Twitter
So - #rspatial work in insurance! Other than natural perils (which I will talk about at some point) it’s also used to identify the features of individual dwellings that might impact their risk of things like burglary or malicious damage.
For example, I found every house in Australia that’s in a culdesac (Less people going through might reduce theft, but access for fire engines is harder and increases fire risk). Here’s a quick screenshot of visual checks I did using the package leaflet to make sure it was working
I really like doing this kind of stuff in R, because you have to think about things in a very different way than with most other types of analyses.
Coming back to my example, how would you even begin to find every dwelling that’s in a culdesac?
We have every road in Australia as a Spatial Line (a type of spatial data that you can create & deal with using the sp package). Every time lines intersect, a new line starts. So at an intersection, you have 4 line segments coming together in the middle
We can extract the end point of each line & add a smaller buffer to those end points (done using the gBuffer function from rgeos). Now we can test whether each buffered end point intersects with any other end points. If it does - the road continues! If not, it’s a cul-de-sac!
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to We are R-Ladies
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!