[R] Mapping Geographical Coordinate Data
Graham Leask
gr@h@m_|e@@k @end|ng |rom y@hoo@com
Sat Jul 4 16:34:26 CEST 2020
Dear List,
I have a postcode file containing geographical coordinates but this is not in the
format of a standard shape file. I list the first 5 observations below;
Postcode Postcode_geometry
<chr> <chr>
1 101 [[[[15.066294,54.986481],[15.08849170010846,54.98916685060565]…
2 102 [[[[12.529952999999999,55.631105],[12.525127622017353,55.62519…
3 103 [[[[12.545395,55.684824],[12.564698,55.684824],[12.568558,55.6…
4 104 [[[[12.510651,55.635403],[12.526093,55.635403],[12.52995299999…
5 105 [[[[12.50293,55.641849],[12.511615913774403,55.65205570659488]…
The length of the second variable precludes showing all of each line.
tibble [62 × 2] (S3: tbl_df/tbl/data.frame)
$ Postcode : chr [1:62] "101" "102" "103" "104" ...
..- attr(*, "label")= chr "Brick code"
..- attr(*, "format.stata")= chr "%9s"
$ Postcode_geometry: chr [1:62] "[[[[15.066294,54.986481],[15.08849170010846,54.98916685060565],[15.109724384490239,55.009579959623146],[15.1203"| __truncated__ "[[[[12.529952999999999,55.631105],[12.525127622017353,55.62519635262449],[12.507755425704989,55.61552698519515]"| __truncated__ "[[[[12.545395,55.684824],[12.564698,55.684824],[12.568558,55.689122],[12.552151038503252,55.70792316285329],[12"| __truncated__ "[[[[12.510651,55.635403],[12.526093,55.635403],[12.529952999999999,55.631105],[12.552151038503252,55.6445350874"| __truncated__ …
How can I map this file using R? I’ve tried using the sf package with st_multipolygon and st_multilinestring without success.
Any help as to which package and appropriate commands to successfully map this data using R will be appreciated.
Kind regards
Graham
More information about the R-help
mailing list