2 Commits

Author SHA1 Message Date
  Petra Lamborn 9f2f7d5d77 Change size of some buttons 3 years ago
  Petra Lamborn 9d994c990e Change some links 3 years ago
2 changed files with 21 additions and 9 deletions
  1. 4
    3
      viz/app.R
  2. 17
    6
      viz/extras.R

+ 4
- 3
viz/app.R View File

@@ -99,7 +99,7 @@ ui <- fillPage(
99 99
                 div(id="loc2"),
100 100
                     htmlOutput("secondarylochtml"))
101 101
                 ),
102
-  absolutePanel(top=10, right=9, id="infobuttoncontainer",
102
+  absolutePanel(top=13, right=13, id="infobuttoncontainer",
103 103
                 title="Toggle (I)nformation",
104 104
     prettyToggle("mapinfobutton", 
105 105
                  label_on = NULL,
@@ -108,15 +108,16 @@ ui <- fillPage(
108 108
                  icon_off = icon("info"),
109 109
                  animation = "pulse",
110 110
                  inline = TRUE,
111
+                 bigger=TRUE,
111 112
                  status_on = "danger",
112 113
                  status_off = "primary",
113 114
                  value = TRUE)
114 115
   ),
115
-  absolutePanel(top = 40, right = 6, id="control2", title="Toggle pane(L)",
116
+  absolutePanel(top = 45, right = 7, id="control2", title="Toggle pane(L)",
116 117
                 prettySwitch("controlswitch", value=TRUE, label = NULL,
117 118
                              slim = FALSE,
118 119
                                inline=TRUE, status="info",
119
-                             fill=FALSE, bigger=FALSE)),
120
+                             fill=TRUE, bigger=FALSE)),
120 121
   absolutePanel(bottom = 26, right = 10, id="loading",
121 122
                 p("Loading...")),
122 123
   absolutePanel(bottom=26, right=10, left=10, top=10, id="infopanel",

+ 17
- 6
viz/extras.R View File

@@ -154,7 +154,7 @@ title="A JS library for interactive maps">Leaflet</a> | <a
154 154
 href="http://datafinder.stats.govt.nz/data/category/census/2018/commuter-view/"
155 155
 title="Source data">
156 156
 StatsNZ</a> | <a href="http://petras.space/" title="Hire me!">
157
-Petra Lamborn</a> (<a href="https://git.petras.space/petra/commute"
157
+Petra Lamborn</a> (<a href="https://github.com/PetraOleum/commute"
158 158
 title="Source code">Source</a>)
159 159
 '
160 160
 
@@ -163,6 +163,7 @@ infotext <- div(class="overflowable", id="infoint", tabindex="2",
163 163
   p("This tool maps the 2018 census",
164 164
   a(href=
165 165
     "https://datafinder.stats.govt.nz/data/category/census/2018/commuter-view/", 
166
+    title="Datafinder link",
166 167
     "commuter data"), 
167 168
   "to help visualise transport ",
168 169
     "connections. It is ", a(href="http://petras.space", title="Hire me!",
@@ -170,7 +171,8 @@ infotext <- div(class="overflowable", id="infoint", tabindex="2",
170 171
     " entry for the ", em("There and Back Again"),
171 172
     a(href=
172 173
 "https://www.stats.govt.nz/2018-census/there-and-back-
173
-again-data-visualisation-competition", "data visualisation competition",
174
+again-data-visualisation-competition", title="June-July 2020",
175
+    "data visualisation competition",
174 176
     .noWS = "after"), 
175 177
     HTML(". The employment portion of the dataset captures employed persons ",
176 178
     "15 years or older who gave an employment address or location ",
@@ -179,28 +181,36 @@ again-data-visualisation-competition", "data visualisation competition",
179 181
     "gave an education location in the 2018 census, ",
180 182
     "including older highschoolers and ",
181 183
     "university students but not e.g. primary school students.")),
184
+  p("The source code for this project can be found on GitHub",
185
+    a(href="https://github.com/PetraOleum/commute", 
186
+      title="Github link",
187
+      "here", .noWS = "after"), "."),
182 188
   h4("The data"),
183 189
   p("The 2018 New Zealand Census of Population and Dwellings",
184 190
     a(href=paste0("https://cdm20045.contentdm.oclc.org/digital/",
185
-      "collection/p20045coll2/id/713/rec/3"), "questionnaire"), 
191
+      "collection/p20045coll2/id/713/rec/3"),
192
+      title="pdf of paper version of the individual questionnaire",
193
+      "questionnaire"), 
186 194
     "asked individuals for primary locations of employment and education ",
187 195
     "and their usual method of transportation. Stats NZ has",
188 196
     a(href=
189 197
 "https://datafinder.stats.govt.nz/data/category/census/2018/commuter-view/",
198
+    title="Datafinder link",
190 199
       "released data"),
191 200
     "aggregated at the level of", 
192 201
     a(href=paste0(
193 202
 "http://archive.stats.govt.nz/methods/classifications-and-standards/",
194 203
 "classification-related-stats-standards/geographic-areas/pg4.aspx#gsc.tab=0"),
195
-   "Statistical Area 2", .noWS = "after"), ".",
196
-    shiny::tags$abbr(title = "Statistical Area 2", "SA2"),
197
-    "boundaries typically enclose areas with a population of a few ",
204
+    title="Definition of statistical areas, 2018",
205
+   "Statistical Area 2"), "(SA2). ",
206
+    "SA2 boundaries typically enclose areas with a population of a few ",
198 207
     "thousand, corresponding approximately to urban suburbs and rural towns. ",
199 208
     "The shapes of these areas have been heavily simplified in this map ",
200 209
     "to reduce bandwidth and memory usage. ",
201 210
     "The original boundaries can be viewed and downloaded",
202 211
     a(href=
203 212
 "https://datafinder.stats.govt.nz/layer/92212-statistical-area-2-2018-generalised/",
213
+    title="Shapefiles avaliable on datafinder",
204 214
     "from the Stats NZ datafinder website", .noWS = "after"), "."),
205 215
   h4("Using this tool"),
206 216
   p("The options avaliable allow ",
@@ -251,6 +261,7 @@ again-data-visualisation-competition", "data visualisation competition",
251 261
     em(a(href=paste0(
252 262
       "http://archive.stats.govt.nz/about_us/legisln-policies-protocols/",
253 263
       "confidentiality-of-info-supplied-to-snz/safeguarding-confidentiality.aspx"),
264
+      title="A method of preserving confidentiality and anonymity",
254 265
          "random rounding", .noWS = "after"), .noWS = "after"), ". ",
255 266
     "This method rounds all values to a multiple of three, but one-third of ",
256 267
     "the time rounds to the second nearest multiple, rather than the closest. ",