-
Notifications
You must be signed in to change notification settings - Fork 3
Flattened Data #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flattened Data #198
Conversation
…o hide/enable features.
… just makes sure file can be read as TOML)
…nsparencies were being ignored/not properly restored.
…template. Otherwise, fall back to _default.template.toml.
…e any errant `id` field in JSON templates.
…-create.config` file.
…. (Leave them in in case we need to process objects in the future)
…fs to be `type=select` with options.
…old 'attributes' processing).
@kalanicraig @jdanish Please test this. This data change will require migrating your old datasets to a new format, so make sure you save a copy of your old datasets before trying to open them. If it's important, we can rename the data file so there's less confusion (like we did with the template file). But this conversion was the precursor to being to custom define the export labels from the template. e.g. now you can use the This PR builds on (and includes) the toml changes so you can just work with this. |
Sorry if this was noted somewhere and I missed it, but converted files appear to be semi-transparent whereas new ones work aok. Is that a bug or did I mess something up? Thanks. |
Random minor thing - in the template interface we currently need an empty node type to set the "no type selected" color. We should either add inline explanation to the editor (less ideal, maybe easier?) or have that be a special entry so that it is obvious what it does? This has always worked this way, but with noobs editing the templates I bet we run into quirks as a result. |
Sorry, last two questions were from me - I switched logins so that it won't read as "net.create org". |
This is due to a change in how we handle the default transparency setting for Nodes. There's actually two transparency settings you want:
I should probably add a second default transparency value for the highlights. Unless you think my default values of 0.2 for nodes and 0.05 for edges is good enough? The other approach here would be during the conversion process to force node default transparency to 1.0. I'm not sure why anyone would want a value other than 1.0... In any case, changing the defaultTransparency for nodes to 1.0 will fix the transparency issue.
Yeah, this is where the json-editor experience is less than ideal. Right now I'm thinking about either creating our own UI for managing node/edge types. Trying to hack json-editor to support things like combining or splitting is a bit of a pain. This is what I'm working through today. |
OK, I'll try changing the transparency and make sure it makes sense to me and then reply. Re: the json editor, yeah. It might be enough on our end if you pre-fill it with "Unselected Nodes" or some such and then look for that when reading the template? |
Remaining fixes in #200. OK to merge. |
hotfix-edge-color: Restore collapsed edge color in node's edge tab. #197
Merge after #194!!!
Branch:
dev-bl/flatten
The original Net.Create data format was based on the Google Fusion export format that encapsulated arbitrary fields in an
attributes
object. When reading and writing data, we converted back and forth between an internal representation which used a flat set of variables (e.g.node.type
) to the encapsulated format (e.g.node.attributes.NodeType
). This added unnecessary complexity to data handling, especially with regards to exporting, importing data and template streamlining.With the implementation of exporting, importing, and template improvements, this seemed a natural time to also update the data format. It would simplify the implementation of those features.
Features / Changes
Mapping Fields
The old attributes fields have been mapped to root level objects.
NODES
node.attributes.Node_Type
=>node.type
node.attributes["Extra Info"]
=>node.info
node.attributes.Notes
=>node.notes
EDGES
edge.attributes.Relationship
=>edge.type
edge.attributes.Info
=>edge.info
edge.attributes.Citations
=>edge.citation
edge.attributes.Notes
=>edge.notes
edge.attributes.Category
=>edge.category
Auto Migration
When you open a old pre-version 1.3 dataset file, we will automatically try to migrate the data to the new format. (You can see the migration function in
ns-logic.m_MigrateData:1031
).The migrated dataset is then saved on top of the old data.
NOTE that the original
attribute
data remains in the.loki
database file for reference. When you re-open the dataset, NetCreate will ignore the original attributes and just load the new attributes.Export Labels set via Template's
exportLabel
propertyExport labels can now be set via Template. Change the template's
exportLabel
to map internal variables to different csv field headers. For example, for thenotes
field, you can change theexportLabel
toDescription
.Implications
Gender
field in the template and it would be automatically made available in the Node Editor, Node Table, Exports, and Filters.To Test
git pull && git checkout dev-bl/flatten
./nc.js --dataset=<existingproject>
-- Open an existing project so you can see test the conversion