From 05497fb820b6647aaffd83e3a1b3b07896c7b5cc Mon Sep 17 00:00:00 2001 From: Thomas Rushby <t.w.rushby@soton.ac.uk> Date: Fri, 16 Jul 2021 16:32:46 +0100 Subject: [PATCH] Add table showing data returned --- ONS-open-geography.Rmd | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ONS-open-geography.Rmd b/ONS-open-geography.Rmd index e530a8a..447db54 100644 --- a/ONS-open-geography.Rmd +++ b/ONS-open-geography.Rmd @@ -4,10 +4,6 @@ subtitle: "example of using the API to get feature layer data - boundaries" author: "Tom Rushby (@tom_rushby)" date: 'Last run at: `r Sys.time()`' output: - bookdown::pdf_document2: - toc: yes - fig_caption: yes - number_sections: yes bookdown::html_document2: fig_caption: yes code_folding: hide @@ -15,6 +11,10 @@ output: toc: yes toc_depth: 4 toc_float: TRUE + bookdown::pdf_document2: + toc: yes + fig_caption: yes + number_sections: yes bookdown::word_document2: fig_caption: yes number_sections: yes @@ -32,6 +32,7 @@ library(htmltools) library(leaflet) library(utils) library(dplyr) +library(knitr) ``` # Introduction @@ -85,6 +86,15 @@ message("Loading LA geometry from ONS Open Geography API") sf_data <- st_read(geo_query) ``` +## Data returned + +So what did the API query return? Table \@ref(tab:geoTable) shows selected columns from the data. The data.frame contains a row for each local authority district, with the `geometry` column containing the geography; in this case the polygon data relating to the boundary of each local authority. + +```{r geoTable} +kable(sf_data[c(2:3,7:9)], caption = "Selected columns of data by API query") +``` + + ## Checking coordinate reference system Useful lookup spatial reference for CRS [https://spatialreference.org/](https://spatialreference.org/ref/epsg/27700/). -- GitLab