igr: An R package supporting Irish grid references

Digital Nature is pleased to announce the initial release of igr, an open-source R package designed to simplify using Irish grid references in R. The package is now available via CRAN.

Location data can be stored in many different forms and formats, and locations on the island of Ireland have often been recorded using Irish grid references. Based on the Irish Grid coordinate reference system (EPSG:29903), Irish grid references have three components: a letter referring to a particular 100 km square, and an easting and a northing that together refer to an area within that 100 km square. Many GIS (Geographic Information System) tools can handle Irish Grid coordinates, but they do not know how to handle Irish grid references.

igr converts Irish grid references to and from Irish Grid coordinates in R. It also converts Irish grid references to and from sf (simple feature) objects, a popular and powerful format for geospatial data analysis and visualization in R.

The higher the number of digits in the easting and northing components of an Irish grid reference, the higher the precision. igr supports levels of precision from 1 m to 100 km. Datasets with a mix of precision are supported, as are those with or without whitespace between the letter, easting and northing.

When converting from an Irish grid reference to an sf object, the Irish grid references can be converted to point or polygon features. Polygons created by igr are precision-aware: their size depends on the precision of the Irish grid reference.

igr can create precision-aware polygons

igr comes with extensive documentation including a vignette with example code, and has comprehensive unit test coverage. Although there are no known issues with igr at the time of publication, as per best practice with R packages it has been given a low version number for this initial release and so can be considered somewhat experimental. When igr functionality appears to be sufficient and stable it will be released as version 1.0.0.

Feedback on igr is welcome via GitHub Issues.

Enjoy!