Create Plants from CSV Data
CSV>PLNTS
Create Plants from CSV Data
Creates plants with data from a CSV file. Plant data is stored in plant.data.
INPUTS
csv_path : Path to the csv file you wish to import.
names : Names of plants you would like to create. If None, plants will be randomly selected.
num : Number of random plants to get if no plant names are provided.
species_key : Name of the column that defines the species name. Default = Scientific Name
random : Whether to pull plants sequentially or randomly from the database. Default = True
<Q> : Query Instance defining search constraints
OUTPUTS
<P> : plants from csv file with basic attributes applied. All other plant data stored in plant.data
data : plant data in a readable string format
Plant Data Formating for CSV>PLNTS
Plant data formatting is largely based off of conventions in the ERA database.
We recommend customizing this data for your purposes. Do not use Microsoft Excel, which will often convert ranges into months (1-2 > Jan 2). Not to mention other localization issues we have discovered.
Recommend Data Editing Workflow
WARNING: Editing your data in Microsoft Word and Google Sheets converts ranges like “1-2” to dates like “Jan 2, 2023”. Not to mention all the localization stuff. We recommend describing ranges in one of the following ways to avoid this:
“1.0-2.0”
“1-2 ()”
Once you make edits to your data, be sure to export as a CSV. Also, be sure that your CSV uses commas and not colons or semicolons to separate values.
dash or emdash
treats values on either side as a domain:
“3.0-5.0” = 3 to 5 (domain)
Jan, Feb, Mar, etc
auto converts 3-letter month abbreviations and ranges to numbers when using the Bloom Calendar Component (in version 2.0.1):
“Jan”= 0.5
“Feb” = 1.5
“May, Jun, Aug” = 4.5, 5.5, 7.5
“Jan To Jun” = 0.5 to 5.5 (domain)
“Jan-Jun” = 0.5 to 5.5 (domain)
Parentheses
Land Kit ignores data values within parentheses (a great way of commenting in your data).
Square Brackets
Land Kit ignores values in brackets as well (also good for commenting in the data)
Color names
Many typical color names are translated directly into System color objects. See the list below. Will now also accept colors as hexidecimals (“#1234AF”) or as a tuple (“255, 200, 100”).
Comma
separates text into values that are treated like a set of possible values.
“Sun, Part Shade” = Sun OR Part Shade
Data Fields that automatically become plant attributes
**We hope to continue to update these to be more robust (and forgiving):
“Scientific Name” → plant name attribute
“Spread” → plant radius_current attribute (half of the spread value)
entries including “Height” → plant height_current attribute
“Flower Color” → plant color attribute
Color names for “Flower Color” Data field
In addition to hexidecimal numbers, these color names will be automatically converted to ARGB System colors (not case dependent):
"white" = (255, 255, 255, 255)
"rose" or "rose-pink" = (255, 255, 181, 181)
"pink" = (255, 255, 255, 156)
"cream" = (255, 255, 213, 181)
"red" = (255, 255, 0, 0)
"orange" = (255, 255, 126, 0)
"gold" = (255, 255, 200, 0)
"yellow-gold" = (255, 255, 230, 0)
"yellow" = (255, 255, 255, 0)
"yellow-green" = (255, 200, 240, 15)
"green-yellow" = (255, 135, 220, 31)
"green" = (255, 70, 200, 44)
"palegreen" or "greenish" = (255, 140, 255, 88)
"blue" = (255, 89, 175, 255)
"bluish" or "lightblue" = (255, 210, 230, 255)
"violet" = (255, 64, 70, 255)
"purple" = (255, 143, 64, 255)
"blue-lavender" = (255, 149, 176, 255)
"lavender" = (255, 209, 176, 255)
"magenta" = (255, 255, 0, 255)
"maroon" = (255, 163, 10, 97)
"brown" = (255, 186, 83, 39)
All Plant Data Components: