Skip to content
Snippets Groups Projects
Commit 05497fb8 authored by Tom Rushby's avatar Tom Rushby
Browse files

Add table showing data returned

parent ca01c872
Branches
No related tags found
1 merge request!4Create Rmd and html version of ONS-open-geog
...@@ -4,10 +4,6 @@ subtitle: "example of using the API to get feature layer data - boundaries" ...@@ -4,10 +4,6 @@ subtitle: "example of using the API to get feature layer data - boundaries"
author: "Tom Rushby (@tom_rushby)" author: "Tom Rushby (@tom_rushby)"
date: 'Last run at: `r Sys.time()`' date: 'Last run at: `r Sys.time()`'
output: output:
bookdown::pdf_document2:
toc: yes
fig_caption: yes
number_sections: yes
bookdown::html_document2: bookdown::html_document2:
fig_caption: yes fig_caption: yes
code_folding: hide code_folding: hide
...@@ -15,6 +11,10 @@ output: ...@@ -15,6 +11,10 @@ output:
toc: yes toc: yes
toc_depth: 4 toc_depth: 4
toc_float: TRUE toc_float: TRUE
bookdown::pdf_document2:
toc: yes
fig_caption: yes
number_sections: yes
bookdown::word_document2: bookdown::word_document2:
fig_caption: yes fig_caption: yes
number_sections: yes number_sections: yes
...@@ -32,6 +32,7 @@ library(htmltools) ...@@ -32,6 +32,7 @@ library(htmltools)
library(leaflet) library(leaflet)
library(utils) library(utils)
library(dplyr) library(dplyr)
library(knitr)
``` ```
# Introduction # Introduction
...@@ -85,6 +86,15 @@ message("Loading LA geometry from ONS Open Geography API") ...@@ -85,6 +86,15 @@ message("Loading LA geometry from ONS Open Geography API")
sf_data <- st_read(geo_query) 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 ## Checking coordinate reference system
Useful lookup spatial reference for CRS [https://spatialreference.org/](https://spatialreference.org/ref/epsg/27700/). Useful lookup spatial reference for CRS [https://spatialreference.org/](https://spatialreference.org/ref/epsg/27700/).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment