Christopher Johnson (WMDE) has uploaded a new change for review.
https://gerrit.wikimedia.org/r/239415
Change subject: adds edit delta and info box
......................................................................
adds edit delta and info box
Change-Id: Idf76f6c9ab0bf32323d3613f1a415b5d9bff7781
---
M server.R
M ui.R
2 files changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikidata/analytics/dashboard
refs/changes/15/239415/1
diff --git a/server.R b/server.R
index 459f6db..ab7dcdc 100644
--- a/server.R
+++ b/server.R
@@ -5,6 +5,8 @@
get_datasets <- function(){
wikidata_edits <<- download_set("wikidata-edits.tsv")
+ edits_latest <- cbind("Edits" = safe_tail(wikidata_edits$edits, 2))
+ edits_delta <<- diff(edits_latest)
wikidata_pages <<- download_set("wikidata-pages.tsv")
wikidata_properties <<- download_set("wikidata-properties.tsv")
wikidata_active_users <<- download_set("wikidata-active-users.tsv")
@@ -34,6 +36,13 @@
make_dygraph(wikidata_edits,
"", "Edits", "Wikidata Edits")
})
+ output$editdelta <- renderInfoBox({
+ form_edits <- prettyNum(edits_delta, big.mark=",")
+ infoBox(
+ "Edit Delta from Last Period", paste0(form_edits), icon =
icon("arrow-up"),
+ color = "green"
+ )
+ })
output$wikidata_pages_plot <- renderDygraph({
make_dygraph(wikidata_pages,
"", "Pages", "Wikidata Pages", legend_name = "pages")
diff --git a/ui.R b/ui.R
index d584590..cb5f306 100644
--- a/ui.R
+++ b/ui.R
@@ -38,6 +38,9 @@
body <- dashboardBody(
tabItems(
tabItem(tabName = "wikidata_edits",
+ fluidRow(
+ infoBoxOutput("editdelta")
+ ),
dygraphOutput("wikidata_edits_plot"),
includeMarkdown("./assets/content/wikidata-edits.md")),
tabItem(tabName = "wikidata_pages",
--
To view, visit https://gerrit.wikimedia.org/r/239415
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf76f6c9ab0bf32323d3613f1a415b5d9bff7781
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/analytics/dashboard
Gerrit-Branch: master
Gerrit-Owner: Christopher Johnson (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits