README_data.md 754 Bytes
Newer Older
Barry Rowlingson's avatar
Barry Rowlingson committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Data Description
================

Geopackages here contain:

* Tables called `level_N` where `N` is the Uber H3 Hex resolution. These
are geopackage polygon layers.

These can be read with `sf::st_read`:

```
u1 = st_read("./hexes/inst/data/uk_hex_1_6.gpkg","level_1")
```

* Tables called `adjlevel_N` where `N` is the Uber H3 Hex resolution. These
have two columns, `i` and `j`, showing adjacency between row `i` and
row `j` in the corresponding `level_N` table. There are no self-adjacencies
in this table, and hexes that have no neighbours do not appear.

These can be read with the `DBI` and `RSQLite` packages:

```
> con = dbConnect(SQLite(), "./hexes/inst/data/uk_hex_1_6.gpkg")
> adj1 = dbReadTable(con,"adjlevel_1")
> dim(adj1)
[1] 14  2
```