Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
shilohd committed Oct 24, 2023
1 parent 1a2438d commit 9dc21dc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
40 changes: 23 additions & 17 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1651,17 +1651,15 @@
// communication between the widget and direct manipulation events
if (x.selectize) {
var selectizeID = Object.keys(x.selectize)[i];
var options = x.selectize[selectizeID];
var items = x.selectize[selectizeID].items;
var first = [{value: "", label: "(All)"}];
var opts = $.extend({
options: first.concat(options.items),
searchField: "label",
valueField: "value",
labelField: "label",
maxItems: 50
},
options
);
var opts = {
options: first.concat(items),
searchField: "label",
valueField: "value",
labelField: "label",
maxItems: 50
};
var select = $("#" + selectizeID).find("select")[0];
var selectize = $(select).selectize(opts)[0].selectize;
// NOTE: this callback is triggered when *directly* altering
Expand Down Expand Up @@ -2372,7 +2370,7 @@ <h2>Welcome</h2>
department. CARS is our annual survey on the use of code in government
analysis. You can see the 2022 results in our <a href="https://best-practice-and-impact.github.io/CARS/">online
publication</a>.</p>
<p>This year we hope to get over 1,500 responses. So far, we’ve got 353
<p>This year we hope to get over 1,500 responses. So far, we’ve got 376
responses. We’re aiming for at least 20 from as many departments as
possible, which will allow us to create customised reports for those
departments. If you’re interested in seeing this, please promote the
Expand Down Expand Up @@ -2406,7 +2404,7 @@ <h2>Responses by department</h2>
#coding-freq-table {display: none;}
</style>
<div id="coding-freq-chart" role="img" aria-label="Chart. Click the show table button to present the data as a text table instead.">
<div id="htmlwidget-99007678d9bc722454e6" style="width:800px;height:950px;" class="plotly html-widget "></div>
<div id="htmlwidget-1a5b8543790f80f72eaf" style="width:800px;height:1050px;" class="plotly html-widget "></div>
</div>
<div id="coding-freq-table">
<table class="table" style="margin-left: auto; margin-right: auto;">
Expand All @@ -2423,7 +2421,11 @@ <h2>Responses by department</h2>
</tr>
<tr>
<td style="text-align:left;"> Department for Education (excl. agencies) </td>
<td style="text-align:right;"> 7 </td>
<td style="text-align:right;"> 15 </td>
</tr>
<tr>
<td style="text-align:left;"> Department for Energy Security &amp; Net Zero </td>
<td style="text-align:right;"> 5 </td>
</tr>
<tr>
<td style="text-align:left;"> Department for Environment, Food and Rural Affairs (excl. agencies) </td>
Expand Down Expand Up @@ -2451,25 +2453,29 @@ <h2>Responses by department</h2>
</tr>
<tr>
<td style="text-align:left;"> Ministry of Justice (excl. agencies) </td>
<td style="text-align:right;"> 31 </td>
<td style="text-align:right;"> 34 </td>
</tr>
<tr>
<td style="text-align:left;"> Office for National Statistics </td>
<td style="text-align:right;"> 136 </td>
<td style="text-align:right;"> 138 </td>
</tr>
<tr>
<td style="text-align:left;"> Other </td>
<td style="text-align:right;"> 5 </td>
</tr>
<tr>
<td style="text-align:left;"> UK Health Security Agency </td>
<td style="text-align:right;"> 8 </td>
</tr>
</tbody>
<tfoot>
<tr>
<td style="padding: 0; border:0;" colspan="100%"><sup>a</sup> Sample size = 353</td>
<td style="padding: 0; border:0;" colspan="100%"><sup>a</sup> Sample size = 376</td>
</tr>
</tfoot>
</table>
</div>
<script type="application/json" data-for="htmlwidget-99007678d9bc722454e6">{"x":{"visdat":{"2a5c5f3620cc":["function () ","plotlyVisDat"]},"cur_data":"2a5c5f3620cc","attrs":{"2a5c5f3620cc":{"x":[5,136,31,5,21,17,20,42,5,7,6],"y":["Other","Office for National Statistics","Ministry of Justice (excl. agencies)","Ministry of Defence (excl. agencies)","HM Land Registry","Forest Research","Department for Transport (excl. agencies)","Department for Levelling Up, Housing<br>& Communities (excl. agencies)","Department for Environment, Food and<br>Rural Affairs (excl. agencies)","Department for Education (excl. agencies)","Defence Science and Technology Laboratory"],"marker":{"color":"#004556"},"orientation":"h","alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"bar"}},"layout":{"width":800,"height":950,"margin":{"b":100,"l":60,"t":25,"r":10},"xaxis":{"domain":[0,1],"automargin":true,"title":"Number of respondents","tickfont":{"size":14},"titlefont":{"size":16.8}},"yaxis":{"domain":[0,1],"automargin":true,"title":"","tickfont":{"size":14},"titlefont":{"size":16.8},"type":"category","categoryorder":"array","categoryarray":["Other","Office for National Statistics","Ministry of Justice (excl. agencies)","Ministry of Defence (excl. agencies)","HM Land Registry","Forest Research","Department for Transport (excl. agencies)","Department for Levelling Up, Housing<br>& Communities (excl. agencies)","Department for Environment, Food and<br>Rural Affairs (excl. agencies)","Department for Education (excl. agencies)","Defence Science and Technology Laboratory"]},"hoverlabel":{"bgcolor":"white","font":{"size":14}},"annotations":[{"x":1,"y":0,"text":"Sample size = 353","showarrow":false,"xanchor":"right","yanchor":"auto","xshift":0,"yshift":-100,"xref":"paper","yref":"paper","font":{"size":14}},{"text":"Department","y":1,"x":"min","showarrow":false,"yshift":30,"xref":"paper","yref":"paper","font":{"size":16.8}}],"shapes":[{"type":"line","line":{"color":"#ff6900"},"x0":20,"y0":-0.5,"x1":20,"y1":10.5}],"hovermode":"closest","showlegend":false},"source":"A","config":{"modeBarButtonsToAdd":["hoverclosest","hovercompare"],"showSendToCloud":false,"displayModeBar":false},"data":[{"x":[5,136,31,5,21,17,20,42,5,7,6],"y":["Other","Office for National Statistics","Ministry of Justice (excl. agencies)","Ministry of Defence (excl. agencies)","HM Land Registry","Forest Research","Department for Transport (excl. agencies)","Department for Levelling Up, Housing<br>& Communities (excl. agencies)","Department for Environment, Food and<br>Rural Affairs (excl. agencies)","Department for Education (excl. agencies)","Defence Science and Technology Laboratory"],"marker":{"color":"#004556","line":{"color":"rgba(31,119,180,1)"}},"orientation":"h","type":"bar","error_y":{"color":"rgba(31,119,180,1)"},"error_x":{"color":"rgba(31,119,180,1)"},"xaxis":"x","yaxis":"y","frame":null}],"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.2,"selected":{"opacity":1},"debounce":0},"shinyEvents":["plotly_hover","plotly_click","plotly_selected","plotly_relayout","plotly_brushed","plotly_brushing","plotly_clickannotation","plotly_doubleclick","plotly_deselect","plotly_afterplot","plotly_sunburstclick"],"base_url":"https://plot.ly"},"evals":[],"jsHooks":[]}</script>
<script type="application/json" data-for="htmlwidget-1a5b8543790f80f72eaf">{"x":{"visdat":{"144c1ca13ef8":["function () ","plotlyVisDat"]},"cur_data":"144c1ca13ef8","attrs":{"144c1ca13ef8":{"x":[8,5,138,34,5,21,17,20,42,5,5,15,6],"y":["UK Health Security Agency","Other","Office for National Statistics","Ministry of Justice (excl. agencies)","Ministry of Defence (excl. agencies)","HM Land Registry","Forest Research","Department for Transport (excl. agencies)","Department for Levelling Up, Housing<br>& Communities (excl. agencies)","Department for Environment, Food and<br>Rural Affairs (excl. agencies)","Department for Energy Security & Net<br>Zero","Department for Education (excl. agencies)","Defence Science and Technology Laboratory"],"marker":{"color":"#004556"},"orientation":"h","alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"bar"}},"layout":{"width":800,"height":1050,"margin":{"b":100,"l":60,"t":25,"r":10},"xaxis":{"domain":[0,1],"automargin":true,"title":"Number of respondents","tickfont":{"size":14},"titlefont":{"size":16.8}},"yaxis":{"domain":[0,1],"automargin":true,"title":"","tickfont":{"size":14},"titlefont":{"size":16.8},"type":"category","categoryorder":"array","categoryarray":["UK Health Security Agency","Other","Office for National Statistics","Ministry of Justice (excl. agencies)","Ministry of Defence (excl. agencies)","HM Land Registry","Forest Research","Department for Transport (excl. agencies)","Department for Levelling Up, Housing<br>& Communities (excl. agencies)","Department for Environment, Food and<br>Rural Affairs (excl. agencies)","Department for Energy Security & Net<br>Zero","Department for Education (excl. agencies)","Defence Science and Technology Laboratory"]},"hoverlabel":{"bgcolor":"white","font":{"size":14}},"annotations":[{"x":1,"y":0,"text":"Sample size = 376","showarrow":false,"xanchor":"right","yanchor":"auto","xshift":0,"yshift":-100,"xref":"paper","yref":"paper","font":{"size":14}},{"text":"Department","y":1,"x":"min","showarrow":false,"yshift":30,"xref":"paper","yref":"paper","font":{"size":16.8}}],"shapes":[{"type":"line","line":{"color":"#ff6900"},"x0":20,"y0":-0.5,"x1":20,"y1":12.5}],"hovermode":"closest","showlegend":false},"source":"A","config":{"modeBarButtonsToAdd":["hoverclosest","hovercompare"],"showSendToCloud":false,"displayModeBar":false},"data":[{"x":[8,5,138,34,5,21,17,20,42,5,5,15,6],"y":["UK Health Security Agency","Other","Office for National Statistics","Ministry of Justice (excl. agencies)","Ministry of Defence (excl. agencies)","HM Land Registry","Forest Research","Department for Transport (excl. agencies)","Department for Levelling Up, Housing<br>& Communities (excl. agencies)","Department for Environment, Food and<br>Rural Affairs (excl. agencies)","Department for Energy Security & Net<br>Zero","Department for Education (excl. agencies)","Defence Science and Technology Laboratory"],"marker":{"color":"#004556","line":{"color":"rgba(31,119,180,1)"}},"orientation":"h","type":"bar","error_y":{"color":"rgba(31,119,180,1)"},"error_x":{"color":"rgba(31,119,180,1)"},"xaxis":"x","yaxis":"y","frame":null}],"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.2,"selected":{"opacity":1},"debounce":0},"shinyEvents":["plotly_hover","plotly_click","plotly_selected","plotly_relayout","plotly_brushed","plotly_brushing","plotly_clickannotation","plotly_doubleclick","plotly_deselect","plotly_afterplot","plotly_sunburstclick"],"base_url":"https://plot.ly"},"evals":[],"jsHooks":[]}</script>
</div>
<div id="cant-see-your-department" class="section level2">
<h2>Can’t see your department?</h2>
Expand Down
5 changes: 0 additions & 5 deletions main.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,3 @@ source("R/data_cleaning.R")
source("R/plot.R")

rmarkdown::render("rmarkdown/index.rmd", output_file = "../docs/index.html")

gert::git_branch_checkout("main")
gert::git_add("docs/")
gert::git_commit("Latest data", author = "Jacob <[email protected]>")
gert::git_push()

0 comments on commit 9dc21dc

Please sign in to comment.