Getting summary data from graphite - graphite

I have created a dashboard using the data published from my application using statsd with a graphite backend. This has worked great for building nice data visualizations. (Kudos to etsy and others!)
Now I need to make a summary dashboard that will display a grid, more-or-less, that shows each stat with a count. (No graphs on this page but clicking on the stat name will take you to the graph.)
So, for example, I am collecting statistics for how many messages each node in our cluster recieves, processes successfully, fails to process. What I need is something like the following:
| Node Name | Messages Recieved | Successful | Failed |
| ------------- |:-----------------:| -----------:| ---------:|
| Node1 | 1126 | 1120 | 6 |
| Node2 | 1155 | 1100 | 55 |
| Node3 | 1124 | 1119 | 5 |
| Node4 | 1204 | 1198 | 6 |
I have a timespan selector on the toolbar and based on that selection these numbers should be updated to reflect the selected timespan. I'm having a hard time getting numbers that seem to aligne with what I expect. And in some scenarios with the summarize function I am getting decimal values back which does not seem to make sense to me.
Any help or guidance would be greatly appreciated.

Related

Providing summary on data by Month in R

I have a dataset that contains information on incidents reported (either Fraud or Error). Information includes the unique ID number, date of the incident, the type of incident, the size, and whether the case is open or closed and, if closed, the closed date.
I am looking to create a script of code that will produce a new table that groups the data by month so that for each month we can see how many new incidents there have been, as well as the average size.
Additionally I would like to be able to see how many cases are open still in that month and Ideally break this down by the type of incident.
It is the counting both the new cases and the open cases that I am having the most issue with
any help would be appreciated
| Erro Type| Date of Error | ID | Size | Open/closed| Date Closed
| Fraud | 12/05/2021 | 233 | 5,000 | Open | -
| Fraud | 19/07/2020 | 194 | 23,000 | Closed | 24/01/22
| Error | 23/05/2021 | 241 | 9,000 | Open | -

R shiny leaflet bubble map by Count

I'm trying to make a Shiny app that uses some Geographical data I have stored in MySQL. The data currently contains a list of Longitudes and Latitudes (of client location), client age, client gender, and other various demographics. For example:
+--------+-------+--------+---------+
| Member | Long | Lat | Gender |
+--------+-------+--------+---------+
| A | 34 | -118 | M |
| B | 34 | -118 | F |
| C | 41 | -74 | M |
| D | 39 | -77 | M |
+--------+-------+--------+---------+
I want to use leaflet to create a bubble map for the locations - a bigger bubble at a location means that more clients are present at that area. It seems like the function addCircles does this pretty well, but the problem is that I don't have a count of the number of clients at each location to assign to the radius parameter- each row in my table represents information for a particular client, not a location. Is there a way to obtain that info?
My best guess is to create a new table where each row represents counts for a different longitude and latitude and then use a count column to count the number of times that location appears among clients, but I'm not sure if this is the best way since it involves creating a new table, and I would have to create additional columns like "number of males" and "number of females" for every factor I want to account for. And what if I wanted to adjust my map for females who are in the age range of 40-50? The number of columns I would have to create would easily exceed 100..

Power Bi graph like pivot graph

I'm new to Power Bi, followed most of the tutorial on MS but haven't figured yet how creat a graph that resembles this graphic I did with Excel - Pivot Graph, using as source the same data table.
What I need to recreate in Power Bi is a column graph with the most requested (pre-orders requests % of total sum) products in different price ranges.
Pivot Graph
Table ie.
| Date | Product | 3 to 5 Eur | 5 to 8 Eur | 8 to 11 Eur |
----------------------------------------------------------
| mar17| Coffe | 12 | 7 | 2 |
| mar17| Milk | 15 | 3 | 1 |
| mar17| Honey | 17 | 0 | 5 |
| mar17| Sugar | 20 | 9 | 8 |
Thank in advance for the help.
Bests,
Alberto
Edit - Thanks to Mike Honey for pointing out the original request was for % of grand total. I have added an additional step to accomplish this and cleaned up some existing steps.
When I imported your sample data into Power BI, I got this (looking at the data in the Query Editor window).
From there, Select the Data and Product columns and then click on Transform -> Unpivot Columns -> Unpivot Other Columns...
... which results in this.
Just to clean this up, I renamed the Attribute and Value columns and changed the data type of the Value column. In the end, it looks like this.
Then just click on Home -> Close & Apply to get back in the Report Editor window, where you can create a graph and configure it as shown such:
Axis:
Price Range
Product
Value:
Quantity
Then click of the forked, drill-down arrow in the top left corner of the graph to show Price Range and Product.
Which looks like this.
Next, while not necessary I feel that it is very nice, with the graph selected, click on the paint roller icon and expand the X-Axis category. In there, turn off Concatenate labels.
Finally, to get the bars to be % grand total, simply right click on Quantity in the Value section of the graph's fields and then select Show value as -> Percent of grand total.
To get the final results that look like this.

Selenium IDE, identify row in table based on 3 columns

I am trying to find a row in a table which contains specific values on three columns.
I have tried methods in #paul trmbrth's answer to find XPath to identify cell in table based on other column. Worked fine for 2 columns, but didn't worked with 3. I didn't find any example for cases with more than 2 values.
VEHICLE CATEGORY | CATEGORY | SUBCATEGORY
A | Exteriors | Badges
A | Exteriors | Badges
A | Exteriors | Mirrors
A | Interiors | Wheels
A | Interiors | Rears
Want cell with the combination that contains:
A | Exteriors | Mirrors
I have tried but no success:
//tr[contains(td[1], 'A')]/td[2][contains(., 'Exterior')] td[3][contains(., 'Mirror')]
//tr[contains(td[1], 'A')]/td[2][contains(., 'Exterior')] /td[3][contains(., 'Mirror')]
css=tr([td:contains('A')][td:contains('Exterior')][td:contains('Mirror')])
css=tr([td:contains('A')][td:contains('Exterior')][td:contains('Mirror')])
Can anyone help?
I think you have a couple of typos:
//tr[contains(td[1], '1') and contains(td[2], 'Eve') and contains(td[3], 'Jackson')]
But I'm not 100% this is most efficient, but it will work.

how to acces output of CrossTable

I have the following output from CrossTable
| predict
actual | bad | good | Row Total |
-------------|-----------|-----------|-----------|
bad | 412 | 188 | 600 |
-------------|-----------|-----------|-----------|
good | 149 | 451 | 600 |
-------------|-----------|-----------|-----------|
Column Total | 561 | 639 | 1200 |
-------------|-----------|-----------|-----------|
and I need to assign output to indivial variable like
a1<-412
a2<-451 and so on how can I do it ?
CrossTable produces that screen output as a "service" for users of SAS and SPSS who are used to it. The table function is what "real useRs" would use and it delivers a table object that can be assessed via standard indexing:
with( dfrm, table(actual, predict)[1,1] ) # should be "a1" = 412
Assuming this is gmodels::CrossTable the help page tells you that the value returned is a list for which the t node is a similar matrix so this should succeed:
with( dfrm, CrossTable(actual, predict)$t[1,1]) # should be "a1" = 412
The proportions tables have different names. Read the Value section of ?CrossTable. Looking at the help page for descr::CrossTable it appears, it has done things a bit differently but has retained that structure and names in the value returned.

Resources