-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rhistory
38 lines (38 loc) · 1.89 KB
/
.Rhistory
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
29
30
31
32
33
34
35
36
37
38
install.packages(pkgs = "devtools", dependencies = TRUE)
install.packages(pkgs = "httr", dependencies = TRUE)
install.packages(pkgs = "jsonlite", dependencies = TRUE)
install.packages(pkgs = "mime", dependencies = TRUE)
install.packages(pkgs = "curl", dependencies = TRUE)
library(httr)
library(jsonlite)
library(mime)
library(curl)
companies_house_call <- GET("https://api.companieshouse.gov.uk/search/companies?q=church&start_index=1", authenticate("gC9Nl3kWM0BJNkyGiQl9hqBg9r20v8F4z_3d6sO_", ""))
companies_house_df <- fromJSON(companies_house_call)
companies_house_df <- fromJSON("companies_house_call")
companies_house_call <- GET("https://api.companieshouse.gov.uk/search/companies?q=church&start_index=1", authenticate("gC9Nl3kWM0BJNkyGiQl9hqBg9r20v8F4z_3d6sO_"))
companies_house_df <- fromJSON(companies_house_call)
companies_house_json <- toJSON(companies_house_call)
companies_house_call <- GET("https://api.companieshouse.gov.uk/search/companies?q=church", authenticate("gC9Nl3kWM0BJNkyGiQl9hqBg9r20v8F4z_3d6sO_", ""))
json_data <- fromJSON(paste(readLines(companies_house_call), collapse=""))
json_data <- fromJSON(file=companies_house_call)
fromJSON("companies_house_call", flatten=TRUE)
companies_house_call <- fromJSON(GET("https://api.companieshouse.gov.uk/search/companies?q=church", authenticate("gC9Nl3kWM0BJNkyGiQl9hqBg9r20v8F4z_3d6sO_", "")))
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, fig.path='figures/', warning=FALSE, echo=FALSE, message=FALSE)
{r load_packages, include=FALSE}
require(sp)
require(rgdal)
require(GISTools)
require(ggplot2)
library(rgeos)
require(ggmap)
require(maptools)
require(RCurl)
require(dplyr)
require(pander)
require(scales)
install.packages("bookdown", lib="/Library/Frameworks/R.framework/Versions/3.3/Resources/library")
require(bookdown) # required for bookdown (duh)
setwd("~/gits/data_ethics-law_course")
bookdown::render_book("index.Rmd", "bookdown::gitbook")