Description Usage Arguments Details
Shortcut to get unique values from a df column using unique_sep_values_of_col() and then create nodes from them.
1 | nodify_col(df, col, label = "df_col_name", property_key = "Name", sep = ";")
|
df |
The data.frame containing the column of data. |
col |
The name of the data column, as a string. |
label |
The label to assign to these nodes. The default is to take this label from the name of the column. As a string. |
property_key |
The name for the property key for these values. Eg. "Name" for nodes labeled "Person". The default is "Name". As a string. |
sep |
The separator between items in a cell of the column, eg "," or ";" |
remember that label is the NODE label in Neo4j, and propery_key is the unique value that constrains nodes of that label.
So if your df has a column with names of items, eg lizard_species, that are unique names, this is perfect.
If the column is already named Lizard_Species (which is what you want as the Node label, ie :Lizard_Species) then you don't need to enter anything for label.
If you want the unique property value to be "Name" (ie. Lizard_Species.Name) then leave property_key blank.
If some rows have multiple items (eg, the row was tagged with multiple species) then set the sep and all you need to do is point this funtion at the df and column.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.