Very new to Cypher and Neo4j so please excuse my ignorance and misuse of terms. I am looking to change the label of a node from the ID to the property name (see image below). I used the following code to load the data from CSV.
load csv with headers from "file:///Goal.csv" as row
create (g:Goal) set g.name = row.goalName
Is there a way to change the label from the ID to the name property? I have tried the solution in the link below but it did not provide what I am looking for. Ultimately I would like the node to show the name information (i.e. reduce fuel, green, etc.)
Change node label in neo4j
Dave Bennett's comment's right - the docs will help show all the visualisation customisations you can do but for this specific case:
Click the node label above the graph visualisation you want to change - they're colour-coded
Choose a new caption field underneath the graph
In this graph, let's change the caption of the yellow 'Location' nodes:
Related
I am trying to scrape a website for financials of Indian companies as a side project & put it in Google Sheets using XPATH
Link: https://ticker.finology.in/company/AFFLE
I am able to extract data from elements that have a specific id like cash, net debt, etc. however I am stuck with extracting data for labels like Sales Growth.
tried
Copying the full xpath from console, //*[#id="mainContent_updAddRatios"]/div[13]/p/span - this works, however, i am reliable on the index of the div (13) and that may change for different companies, hence i am unable to automate it.
Please assist with a scalable solution
PS: I am a Product Manager with basic coding expertise as I was a developer few years ago.
At some point you need to "hardcode" something unless you have some other means of mapping the content of the page to your spreadsheet. In your example you appear to be targeting "Sales Growth" percentage. If you are not comfortable hardcoding the index of the div (13), you could identify it by the id of the "Sales Growth" label which is mainContent_lblSalesGrowthorCasa.
For example, change your
//*[#id="mainContent_updAddRatios"]/div[13]/p/span
to:
//*[#id = "mainContent_updAddRatios"]/div[.//span/#id = "mainContent_lblSalesGrowthorCasa"]/p/span
which is selecting the div based on the div containing a span with id="mainContent_lblSalesGrowthorCasa". Ultimately, whether you "hardcode" the exact index of the div or "hardcode" the ids of the nodes, you are still embedding assumptions regarding the structure of page.
Thanks #david, that helped.
Two questions
What if the structure of the page would change? Example: If the website decided to remove the p tag then would my sheet fail? How do we avoid failure in such cases?
Also, since every id is unique, the probability of that getting changed is lesser than the index being changed. Correct me, if I am wrong?
What do we do when the elements don't have an id like Profit Growth, RoE, RoCE etc
This is my first time using CartoDB. My dataset is a simulation of the behaviour of users arround the campus. My rows have latitude, longitude and the class column depending of the cluster in which the user is.
I saw an option to visualize the animation of the behaviour (cartodb transforms the data into a time lapse), but I'm trying to see the points colored by the class value. In the platform, there is an option to do that, but when I choose the "animation" mode then I can't choose any of the columns to set the color.
I show you an image:
However, if I choose the "By points" mode, I can display the points color by the class column value.
Is there anyone who has had the same problem? Do you have any recommendation?
I think the problem is on the column type, you need your column to be a string to be offered as a value, so maybe you want add a column to your SELECT statement on the DATA tab to reclassify your clusters. If you rename then you can also show them on the legend can reflect a better name for your clusters:
select *,
case cluster
when 1 then 'Cluster 1'
when 2 then 'Cluster 2'
else 'unknown'
end as cluster_named
from my_table
Something around that should help to convert cluster numeric field into a string one, then you'll see it offered to animate by that value.
Disclaimer: I work at CARTO
I found how to create new labels (by just entering its name in the corresponding issue field) and how to search issues with a specific label (with a JQL query like labels IN ('mylabel'), but I can't find a place to view all the existing labels, nor a JQL operator or function to list them.
How do I see which labels already exist? Can I manage (i.e. rename) them too?
To see all the labels that are existent in a Jira Project do the following:
Create a new Dashboard (for the desired project)
Add a label gadget to it
Again, select the project you want to see the labels from.
Enter search interval if necessary -> Save it
-> You will see all the labels.
we can add...
JQL: label is not EMPTY -> export to CSV > import in excel.
Ask your DBA to list that for you. Simplest way.
No way to manage them. All edit actions will trigger notification to all defined in notification scheme users.
my nodes have the following order in GrapheneDB neo4J hosted database:
<id>:3 human_date:Wednesday, July 5, 2017type:painuuid:7c74a49d-f102-4825-914b-87dcc88d339bvalue:Emptinessepoch_utc_i:1499285499
The input of the JSON object is I first create the node with the value, and then set properties: {uuid, epoch_utc, human_time}
It's hard to use the graphical UI to see different nodes because only human_time is displayed...and that is often the same for multiple nodes. I would prefer to see type or value
You can change the properties that were picked by Neo4j Browser to be displayed as captions.
Just click at the top of the window on a Label tag, and once selected, change the caption at the bottom to type or value.
For more advanced styling, like displaying multiple captions, you can edit the Graph Style Sheet (.grass file). Just enter :style in Neo4j Browser, click on the download icon, edit and upload the file back and the changes will be reflected.
You can read more on Neo4j Browser styling here.
I'm new to cytoscape.
I want to make the width of edges in my network according to a certain number.
my file looks like this:
node1 node2 34.04
node3 node2 56.89
node4 node5 8.09
node1 node4 10.54
when I import my network file I choose column 3 to be the "interactions". Then the number in column 3 ends up in a string column, and can't be used to make a continuous mapping. When I import the same table as node attributes I am still only able to get it in to a string column.
I have tried to look in the manual and googled a lot - but I seem to be the only one having this problem. How do I solve it?
Thanks
This answer is for Cytoscape 2.8.3. It probably applies for 3.?.?.
Like you say, with your file format, the numbers will be used to population "interaction", and that is a String attribute.
So, for your file, do not set the Interaction Type (red) in the Import Network from Table dialog. Instead, set Source Interaction (purple) to Column 1 and Target Interaction (orange) to Column 2. Then, in the table at the bottom of the dialog, click the column header Column 3. It will turn blue. It will then be imported as a floating point attribute as "Column 3", and you can use it in a Continuous mapper.