I have a website linking map in a csv file. it is represented by 2 column, one for Origin URL and one for Target URL
I would like to draw a chart that represent the relationship between all pages. I'm looking for a logic to implement that make me draw the chart using 3DJS
I used the collapsed force layout of 3DJS https://bl.ocks.org/mbostock/1062288
As you can see, the JS parse a JSON file that represent the relationship between nodes.
here is what my mapping looks like https://imgur.com/uzh1lnR
Currently, I have my data stored in a database. I can parse it and create a JSON/CSV file. I'm looking for an appropriate format for that JSON file
any help ?
Related
In Amazon Quicksight, I have a dataset with a bunch of data items which are imported into SPICE from JSON in S3. For simplicity, assume that data items look like this:
{url: "/us/page1.html", errors: 6, Responsetime: "2021-03-21T10:00:01"}
There are many data items for the same URL, run on different test dates (the Responsetime).
I can create a graph, a "visual", of total errors over time for all urls by making a line chart with value sum(errors) and X dimension of Responsetime, and that works fine.
I can create the same visual showing total errors over time but only for URLs matching /us/ by creating a custom filter for url matching contains /us/ and applying this filter to the visual, and this also works fine and looks like this:
I can create the same visual showing total errors over time but only for URLs matching /blog/ by creating a custom filter for contains /blog/ identically to the above but with a diferent filter, and this also works fine and looks like this:
What I want to do is display those last two graphs as two lines on the same graph. So I have one linechart with two values on it, where one value is field errors filtered by url contains /us/, and the second value is field errors filtered by url contains /blog/. That is, something like this:
How do I do this?
I know how to plot two different values on the same linechart, but not how to plot the same value but filtered in two different ways.
you can create a calculated field like url_type and pass the formula to know what type of url is it
ifelse(locate({url}, "/us/") > 0, "us",locate({url}, "/blog/") > 0, "blog", "other")
and add this calculated field to the color of the line chart. This will divide the same dataset into two parts.
The url_type field will have "other" value as well, you can add a filter if that's not needed.
I am building a generic CSV output module with a variable number of columns. The DataFormat in BW (5.14) lets you define repeating item and thus offers a list of items that I could use to map data to in the RenderCSV step.
But when I run this with data for >> 1 column (and loopings) only one column is generated.
Is the feature broken or do I use it wrongly?
Alternatively I defined "enough" optional columns in the data format and map each field separately - no really generic solution.
Looks like In BW 5, when using Data Format and Parse Data to parse text, repeating elements isn’t supported.
Please see https://support.tibco.com/s/article/Tibco-KnowledgeArticle-Article-27133
The workaround is to use Data Format resource, Parse Data and Mapper
activities together. First use Data Format and Parse Data to parse the
text into the xml where every element represents one line of the text.
Then use Mapper activity and tib:tokenize-allow-empty XSLT function to
tokenize every line and get sub-elements for each field in the lines.
The link has also attached workaround implementation
How do I get the search/filter to work per column?
I am making small steps in building, and constantly adding to my data table, which is pretty dynamic at this stage. It basically builds a datatable based on the dat that is fed into it. I have now added the footer to act as a search/filter, but unfortunately this is where I have become stuck. I cannot get the filer part to work. Advice greatly appreciated.
here is my sample data tables that I am working on http://live.datatables.net/qociwesi/2/edit
It basically has dTableControl object that builds by table.
To build my table I need to call loadDataFromSocket which does the following:
//then I have this function for loading my data and creating my tables
//file is an array of objects
//formatFunc is a function that formats the data in the data table, and is stored in options for passing to the dTableControl for formatting the datatable - not using this in this example
//ch gets the keys from file[0] which will be the channel headers
//then I add the headers
//then I add the footers
//then I create the table
//then i build the rows using the correct values from file
//then I draw and this then draws all the row that were built
//now the tricky part of applying the search to each columns
So i have got this far but the search per column is not working. How do I get the search/filter to wrok per column?
Note this is a very basic working example that I have been working off: http://jsfiddle.net/HattrickNZ/t12w3a65/
You should use t1.oTable to access DataTables API, see updated example for demonstration.
Please compare your code with jsFiddle in your question, notice its simplicity and consider rewriting your code.
I have a Tableau dashboard with various visualizations created from 3 data sources (i.e. A,B, C).
Each data source has a relationship (join) with the same secondary data source (i.e. D), and the secondary data sources provides information to create a filter for each data source. In other words, there is the following relationship for my data sources:
A - D
B - D
C - D
I would like to create a global filter on a dashboard I have created. I would like one filter card from "D" to show up and be applied to "A," "B," and "C" at once rather than having a separate filter card show up for each data source.
I tried to create a global filter via a parameter and calculated field, but the parameter requires layers of connections because data sources "A,B, and C" only have "D" in common.
Thoughts?
Its not completely clear from your question, but it sounds like you are using Tableau data blending on your worksheets to include data from multiple data sources, rather than a join to create a data source based on multiple tables. If all your tables are on the same database server or spreadsheet, then traditional joins are usually more efficient than data blending.
The following approach often works well.
Instead of using Tableau's quick filter feature, create a worksheet based solely on D that shows the values you wish to use for filtering. It can be a simple list of names, or a bubble chart or anything you like. Use that worksheet as your filter by creating actions where it is the source and all the other worksheets on your dashboard are the target. Typically, you would want to specify the field names explicitly.
Data blending is useful but can be complex. Depending on details, you may need to make D the primary data source on your other worksheets. Experiment.
The parameter and calculated field you mentioned can be even simpler and faster than using actions, but users are restricted to selecting a single value for a parameter unlike the filter action approach. (Of course, one parameter value can represent multiple values in your target data source field depending entirely on how your calculated field interprets the parameter).
I can't tell why that didn't work for you or what you mean by "layers of connections". You might consider clarifying that part of your question.
One of my favorite aspects of d3 is that it groups collections of data that can be accessed easily at any point in the process of creating and drawing a visualization.
I picked up Dimple to build some prettier graphs, implementing the following example:
http://dimplejs.org/advanced_examples_viewer.html?id=advanced_dynamic_line_color
I'd like to access an ID attribute of my data in an onclick event associated with the data points. Unfortunately, the only data passed to these events by dimple is the axis coordinates.
Is there a simple way to get at the rest of the attributes of the data in dimple?
The reason is that dimple will pre-aggregate the data so it doesn't work from the original data rows. Virtually all of the examples on the dimple website are drawn from the same tsv and in each case dimple aggregates the data to different levels. The benefit of this is that it means you can use very similar code for a line, area, bubble, bar or pie chart at any level of aggregation without any data manipulation in your own code.
Therefore if you would like another field it must be part of the aggregation, you can include as many fields as you like in the the series definition so:
var lines = myChart.addSeries(null, dimple.plot.line);
could become:
var lines = myChart.addSeries(["Brand", "Owner", "SKU", "Product"], dimple.plot.line);
And those 4 fields would be accessible.
Beware though that a line will be drawn for every distinct combination of those dimension values so you can't use this method to access a more granular datum.