From 9fe901c316241d2c262dbe0285ff30eaf003f3b1 Mon Sep 17 00:00:00 2001 From: Burton-Kelly Date: Wed, 31 Oct 2018 13:52:57 -0500 Subject: [PATCH] Init. --- .gitignore | 4 ++++ bin/gfk-publicstuff.R | 7 +++++++ hack-grand-forks.Rproj | 15 +++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 .gitignore create mode 100644 bin/gfk-publicstuff.R create mode 100644 hack-grand-forks.Rproj diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b6a065 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata diff --git a/bin/gfk-publicstuff.R b/bin/gfk-publicstuff.R new file mode 100644 index 0000000..9c69925 --- /dev/null +++ b/bin/gfk-publicstuff.R @@ -0,0 +1,7 @@ +library(rjson) + +# Grab city view for Grand Forks +gfk <- fromJSON(file="https://www.publicstuff.com/api/2.0/city_view?space_id=15174") + +## Make a data frame of request_type IDs and names +gfk_request_types <- as.data.frame(t(sapply(gfk$response$request_types$request_types, function(x) c(x$request_type$id, x$request_type$name)))) diff --git a/hack-grand-forks.Rproj b/hack-grand-forks.Rproj new file mode 100644 index 0000000..3bdc835 --- /dev/null +++ b/hack-grand-forks.Rproj @@ -0,0 +1,15 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 4 +Encoding: UTF-8 + +RnwWeave: knitr +LaTeX: pdfLaTeX + +StripTrailingWhitespace: Yes