The disclosed implementations relate generally to data transformation, and more specifically to inferring rules for data transformation based on user-provided samples. Some implementations apply the data transformations in the context of data visualization, including systems, methods, and user interfaces that enable users to interact with data visualizations to analyze data.
Data visualization applications enable a user to understand a data set visually, including distribution, trends, outliers, and other factors that are important to making business decisions. Some data sets are very large or complex and include many data fields. Various tools can be used to help understand and analyze the data, including dashboards that have multiple data visualizations. However, some functionality may be difficult to use or hard to find within a complex user interface.
Additionally, some data visualization applications enable the user to transform the data sets by inputting code in a programming language (e.g., an expression or calculation language). However, this requires the users to learn the programming language, which can be difficult to use and hard for users to identify the appropriate function, or set of functions, for a desired data transformation.
Programming by example (PBE) is a technique involving a computer generating code based on examples from a user. In the context of data transformation (e.g., string transformations), PBE may be used to generate transformation code for a data set based on user input-output examples. For example, a PBE system generates a transformation from a set of example input-output pairs. The PBE system then applies that transformation to all remaining inputs to generate the complete set of transformed outputs. In some circumstances, this approach is faster, easier, and more efficient than having the user write out the transformations in an expression language.
In some circumstances, a large set of user examples are needed for a PBE system to generate the user's desired transformation for a complete data set. For example, a user wants inputs that start with an ‘A’ to output a ‘1’, inputs that start with a ‘B’ to output a ‘2’, and inputs that start with ‘C’ to output ‘2.’ In this example, the user supplies a user example of: “input ‘Apple’ outputs ‘1’.” However, the PBE system doesn't know whether the user intended a condition such as “starts with ‘A’,” or “ends with ‘e’,” or “contains two ‘p’s,” or “doesn't contain a space” or any of the many other possible ways to describe the input term ‘Apple.’ If the user gives another example starting with ‘A,’ it may still not be sufficient for the PBE system to identify the desired transformation. For example, if the user's next example is “input ‘Apricot’ outputs ‘1’.” The PBE system still won't know if the user intended a condition “starts with ‘A’,” or “contains at least one ‘p’,” or “doesn't contain a space;” even if other possible conditions can no longer be correct.
With heterogenous data in particular, there are multiple differences between the user examples that a PBE system can identify and use for generating a transformation. However, many of the generated transformations would be undesirable for the user. Therefore, many user examples may be needed before a PBE system generates the user's desired transformation for the complete data set.
In accordance with some implementations, the PBE systems and methods described herein enable a user to supply additional information (e.g., a hint or condition) for a given user transformation example. This additional information alleviates the need for a large set of user examples, thereby reducing the number of human-machine interactions and improving the efficiency of the PBE system.
An example PBE system includes a hints feature that enables the user to indicate input characters in their user transformation examples. The example PBE system prefers transformation conditions that utilize the indicated input characters. Referring again to the example above, if the user supplies the user transformation example of “input ‘Apple’ outputs ‘1’” and includes a hint of “A,” the PBE system is able to identify “starts with ‘A’” as the transformation condition, without the need for many additional user examples (e.g., at least 20% less user examples are needed as compared to a PBE system without the hints feature).
Thus, the hints feature enables a user to identify one or more characters in the input. The user isn't required to know the corresponding condition (e.g., “contains” or “starts with”). With the hints feature, the PBE system is able to identify more complex conditions such as “contains more than one” or “after the second occurrence of,” without the user having to know or input them.
In the previous example, if the user intended a transformation condition of “contains ‘a’,” then the user could provide a second user transformation example of “input ‘Banana’ outputs ‘1’” and include a hint of “a.” In this example, the PBE system recognizes that “starts with ‘A’” is invalid in light of the second user example and is likely to identify the desired “contains ‘a’” condition as the most appropriate. Without the user hints, many more user examples may be needed before the PBE system is able to identify “contains ‘a’” as the desired condition. Thus, the user is able to simply identify an important aspect of the input for the transformation, rather than needing to know the necessary programming functions and syntax to drive the transformation.
In accordance with some implementations, a method executes at a computing device with a display. For example, the computing device can be a smart phone, a tablet, a notebook computer, or a desktop computer. In some implementations, the method is performed by a PBE application executing on the computing device. The method includes displaying a user interface including: (i) a first set of input data retrieved from a data field from a data source; (ii) a second set of output data initialized from the data field so that each input datum (string) has a respective matching output datum (string); and (iii) an expression window displaying a transformation function ƒ that transforms each input datum into the corresponding output datum. The method further includes iteratively processing a plurality of user example transformations and a user hint corresponding to one of the example transformations, the user hint expressing a causal basis for the corresponding example transformation. The method further includes updating the transformation function ƒ according to the provided plurality of user example transformations and the user hint. The method further includes displaying the updated transformation function ƒ in the expression window. In some implementations, the method further includes receiving a user action to save the transformation function ƒ shown in the expression window; and storing the transformation function ƒ in accordance with the user action. In some implementations, the method further includes transforming the second set of output data using the updated transformation function ƒ and storing the transformed second set of output data.
In some implementations, a computing device includes one or more processors, memory, a display, and one or more programs stored in the memory. The programs are configured for execution by the one or more processors. The one or more programs include instructions for performing any of the methods described herein. In some implementations, the method is performed by a PBE program executing on the computing device.
In some implementations, a non-transitory computer-readable storage medium stores one or more programs configured for execution by a computing device having one or more processors, memory, and a display. The one or more programs include instructions for performing any of the methods described herein.
Thus, methods, systems, and graphical user interfaces are disclosed that enable users to easily interact with data sets to define data transformations according to user provided examples and hints. Such methods may complement or replace conventional methods for data visualization and transformation.
For a better understanding of the aforementioned systems, methods, and graphical user interfaces, as well as additional systems, methods, and graphical user interfaces that provide data visualization analytics, reference should be made to the Description of Implementations below, in conjunction with the following drawings in which like reference numerals refer to corresponding parts throughout the figures.
Reference will now be made to implementations, examples of which are illustrated in the accompanying drawings. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one of ordinary skill in the art that the present invention may be practiced without requiring these specific details.
Users who are not familiar with expression programming can find it difficult to apply transformations to their data sets. Programming by example (PBE) systems enable users to describe their desired transformation by examples instead of requiring knowledge of the programming language. However, in some circumstances PBE systems require a large set of user examples to identify the desired transformation for the data set. The systems, methods, and user interfaces described herein enable users to supply hints and/or conditions along with their examples, thereby improving efficiency and alleviating the need for a large set of user examples.
The graphical user interface 100 also includes a data visualization region 112. The data visualization region 112 includes a plurality of shelf regions, such as a columns shelf region 120 and a rows shelf region 122. These are also referred to as the column shelf 120 and the row shelf 122. As illustrated here, the data visualization region 112 also has a large space for displaying a visual graphic. Because no data elements have been selected yet, the space initially has no visual graphic. In some implementations, the data visualization region 112 has multiple layers that are referred to as sheets.
The computing device 200 includes a user interface 206 comprising a display device 208 and one or more input devices or mechanisms 210. In some implementations, the input device/mechanism includes a keyboard. In some implementations, the input device/mechanism includes a “soft” keyboard, which is displayed as needed on the display device 208, enabling a user to “press keys” that appear on the display 208. In some implementations, the display 208 and input device/mechanism 210 comprise a touch screen display (also called a touch sensitive display).
In some implementations, the memory 214 includes high-speed random access memory, such as DRAM, SRAM, DDR RAM or other random access solid state memory devices. In some implementations, the memory 214 includes non-volatile memory, such as one or more magnetic disk storage devices, optical disk storage devices, flash memory devices, or other non-volatile solid state storage devices. In some implementations, the memory 214 includes one or more storage devices remotely located from the CPU(s) 202. The memory 214, or alternatively the non-volatile memory devices within the memory 214, comprises a non-transitory computer readable storage medium. In some implementations, the memory 214, or the computer readable storage medium of the memory 214, stores the following programs, modules, and data structures, or a subset thereof:
Each of the above identified executable modules, applications, or sets of procedures may be stored in one or more of the previously mentioned memory devices, and corresponds to a set of instructions for performing a function described above. The above identified modules or programs (i.e., sets of instructions) need not be implemented as separate software programs, procedures, or modules, and thus various subsets of these modules may be combined or otherwise re-arranged in various implementations. In some implementations, the memory 214 stores a subset of the modules and data structures identified above. Furthermore, the memory 214 may store additional modules or data structures not described above.
Although
The user interface 230 includes an expression window 320 displaying a transformation function ƒ (sometimes referred to as a calculation or expression) that transforms each input string into the corresponding output string. In some implementations, the expression window 320 initially displays a transformation function ƒ specifying that the output string is equal to the input string (e.g., [In]). In some implementations, before a transformation function has been generated, the displayed expression is blank. That is, the expression window displays no transformation function prior to receiving user inputs to specify transformations.
The user interface 230 includes a user-selectable icon 322 to save the transformation function ƒ 240 shown in the expression window 320. In some implementations, the user-selectable icon 322 copies a string representation of the transformation function ƒ 240 to an operating system clipboard (or application-specific clipboard) and enables the user to paste the function 240 into another location. In some implementations, the copy operation can be initiated in other ways as well, such as highlighting the function 240 and pressing CTRL+C. In some implementations, saving the transformation function ƒ comprises selecting a save icon or button from a pop-up window.
The user interface 230 also includes a values region 318 with a menu (e.g., a drop down menu) of information about the data values being transformed. For example, the values region 318 specifies the number of examples 318-1 that the user has provided. In
In some implementations, the values region 318 specifies a quantity 318-3 of output values that have changed. Note that the quantity 318-3 of changed values is generally greater than the quantity 318-1 of examples because the function 240 is applied to the entire dataset of column 302. In
In some implementations, the values region 318 specifies the quantity 318-4 of values that have been changed to blank. In some implementations, the values region 318 specifies the quantity 318-5 of unchanged values. The unchanged values are the ones for which the transformation function 240 makes no change. In
In some implementations, the user interface 230 displays a settings menu 316, which enables the user to configure how elements of the user interface 230 are displayed (e.g., how the columns and data are displayed).
In some implementations, the user interface 230 enables the user to limit what rows are displayed. The user interface illustrated in
Thus, the user interface 230 allows the user to provide examples 232 of transforms for individual data values, and the expression generator 228 infers a function 240 based on the examples 232 provided. A user can assist with the generation of the function 240 by providing hints 238 for some (or all) of the examples. A hint 238 identifies a portion of an input data value 234 that is relevant to making the transformation. In some implementations, the hints are treated as a soft constraint and the computing device generates, and may propose, options that don't match the hints. For example, if a user mistakenly supplies inaccurate hint information, or the hint results in a suboptimal transformation function, the computing device may identify a transformation function that does not use the hint information (e.g., the hint information is not included in a conditional statement of the transformation function).
In some implementations, the hint 238 allows a user to provide an intended condition for a program with multiple domains and/or cases. For example, the hint 238 is optionally a condition using one or more of the following operators: CONTAINS( ), STARTSWITH( ) FINDNTH( ), or REGEXP_MATCH( ). Thus, in some implementations, rather than using a substring of original input values as a hint 238, the hints are defined as spans of input values that the PBE system considers when generating conditions. An example span is an index range of some input value, with a start index and an end index (inclusive or exclusive).
In some implementations, users are allowed to provide multiple spans of an original input for the PBE system to consider. For example, the user could select the starting character for a STARTSWITH condition and an ending character for an ENDSWITH condition. This can be helpful in cases where the user's intended conditional statement is a conjunction of multiple conditions. For example, a user wants to find all data values that start and end with a number character.
In some implementations, the hint 238 is case sensitive by default. In some implementations the hint 238 is case insensitive by default. In some implementations, a user affordance (e.g., a checkbox) is provided to the user at the time they enter the hint, where the user affordance allows the user to specify whether the hint is case sensitive.
The computing device iteratively processes the examples 232 provided by the user. Each user input provides a sample row transformation 232 to edit an output string ti 236. In some instances, the user designates a hint (e.g., a contiguous substring 238 of the corresponding input string si 234). The contiguous substring 234 expresses a causal basis for transforming the input string 234 into the output string 236. The user interface 230 updates the transformation function ƒ 240 in the expression window 320 according to the provided sample row transformations 232. If the examples provided by the user are labeled as 1, 2, . . . , n, then the expression generator creates a function ƒ 240 so that:
In some implementations, the updating occurs automatically after each user input, including updating the expression window 320 with the latest transformation function ƒ 240. In some implementations, the updating occurs after a user has confirmed a user transformation example 232 (e.g., by pressing the ENTER key or selecting a confirmation icon for the transformation example). In some implementations, the updating occurs in response to user activation of a user-interface affordance (not illustrated). In some implementations, the updating occurs after a preset amount of time has passed since the last user input.
As a result of the user-provided example, the values region 318 is also updated. Now the quantity 318-1 of examples is “1”, the quantity 318-3 of changed values is “676”, the quantity 318-4 of values changed to blank is “0”, and the quantity 318-5 of unchanged quantities is “0” (all of the rows have changed). In this case, the system has also identified three rows of data that the system recommends for review (the quantity 318-2 is “3”). These suggested rows for review assist the user to quickly figure out if the function is correct. In some implementations, the user can navigate or filter to the three suggested rows by selecting the element for quantity 318-2 (e.g., clicking on the “Suggested for review” element or the number “3”).
In
In the example of
As shown here, the function ƒ 240 has minimal branching among all possible transformation functions that perform according to the user provided examples. There are only two branches, and there are no transform functions that could achieve the desired results with a single branch. In some implementations, minimal branching means having the fewest number of IF statements.
The first portion 240-1 includes a Boolean condition 406, which determines whether the input string [In] includes the string ‘−’, which is a space, a hyphen, and another space. If the Boolean condition evaluates to TRUE, the output value is specified by the corresponding function 410. In this case, the function 410 applies the SPLIT( ) operator twice to extract the string between the brackets ‘[’ and ‘]’. The innermost SPLIT( ) operator divides the expression into two pieces at the left bracket ‘[’, and returns the second split (specified by the parameter “2”). The outermost SPLIT( ) operator uses the output of the first SPLIT( ) operator, and performs a second split at the right bracket ‘]’. In this case, it uses the first split, as specified by the parameter value “1”. The expression generator 228 created this expression automatically based on the two examples provided by the user. For this particular data set, the function 410 achieves the desired transformation. However, if any of the input data values had extra square brackets or lacked the ‘−’ connector, the output would be incorrect. For example, if the original data value 404-4 was “Limasol-GOC [91413]” rather than “Limasol—GOC [91413]” the result of applying the function ƒ 240 would be “N/A” rather than the desired “91413.”
The expression window 320 also provides feedback to the user about how the formula has been applied to the input data values. For example, for the first formula portion 240-1, the user interface provides usage data 432, which indicates how many of the user examples were taken into account to generate the formula portion as well as how many of the data values satisfy the Boolean condition 406. The second portion 240-2 represents the ELSE clause 408 with a return value of “N/A” and indicates that 1 user example and 1 value resolve to that clause.
The values window 318 indicates the value results based on the application of the function ƒ 240. The quantity of examples 418-1 is 2, the quantity of rows suggested for review 418-2 is 3, and the quantity of rows that have changed 418-3 is 32 (all rows in the data set). Next to the descriptive labels are the review indicator icon 430 and the changed indicator icon 428, which are the same indicators as displayed in the output rows 404.
While checking for ‘−’ results in the desired transformation in this case, it may not be the most intuitive or robust function. Looking at the Boolean condition 406 for the formula, the user may wonder why the generator is looking for ‘−’ rather than the square brackets. In this scenario, the user believes that the brackets are a better indicator. The user interface enables the user to give the system a “hint” about the importance of the brackets.
The hint window 416 allows a user to provide a hint in a variety of ways, including (i) specifying what text to look for in the input or (ii) specifying a position to look at in the input string. The hint window 416 allows a user to enter text in the entry box 416-2 and, optionally, select an operator 416-1 for the text (e.g., Contains, StartsWith, and the like). In some implementations, a user can specify a hint that uses both specific text and position. In accordance with some implementations, the hint window includes instructions and information for the user, such as the alert (417) which notifies the user that when a hint is supplied, the expression generator will apply the transform indicated by the example only to other input values that satisfy the hint.
As an alternative to a sequence of menu selections to designate a hint, some implementations enable a user to directly select/highlight a portion of an input string to designate it as a hint.
Based on this hint,
The user in this example wishes to transform the original data set based on which company is associated with each data value. In
The user in this example wishes to transform the original data set to remove the company references. In
The method includes displaying (902) a user interface having a first column with non-editable input strings s1, s2, . . . , sn retrieved from a data field of a data source, a second column with editable output strings t1, t2, . . . , tn, and an expression window displaying a transformation function ƒ that transforms each input string into the corresponding output string. The output strings are initialized (904) from the data field so that each row has a respective input string and a respective matching output string. In some implementations, the output strings are blank prior to receiving any user transformation examples.
In some implementations, the expression window initially displays (906) a transformation function specifying that the output string is equal to the input string. In some implementations, the expression window displays (908) no transformation function prior to receiving any user input to specify a sample row transformation. In some implementations, the expression window is hidden or minimized prior to receiving any user transformation examples.
The method 900 further includes iteratively processing (910) a plurality of user inputs, each user input i providing a sample row transformation to edit an ith output string t. As an example scenario, a user provides a first example that “input ‘Apple’ outputs ‘1’;” and a second example that “input ‘Lemon’ outputs ‘2’.”
A plurality of the user inputs i designate (912) a contiguous substring ssi of the corresponding input string si. The contiguous substring expresses a causal basis for transforming the input string si into the output string t. Continuing the scenario above, using the “input ‘Apple’ outputs ‘1’” example from above, the user could highlight the ‘A’ in Apple as the causal basis (e.g., a hint) for transforming the term ‘Apple’ into the output ‘1’.
Turning to
Continuing the example scenario above, each of the two user examples is analyzed to generate a transformation function ƒ that satisfies (1)-(3). A generated transformation function ƒ for this example scenario could be: if the input begins with an ‘A’ then output ‘1,’ otherwise output ‘2.’
In some implementations, the input strings are tokenized. In some implementations, the transformation function is updated based on the tokenized input strings. In some implementations, the contiguous substrings (hints) are used by the computing system to score predicates chosen by input classifiers for their corresponding subprogram or domain. In this way, if a given predicate's token corresponds to a contiguous substring, its score is increased. In some implementations, predicates that have regular expression (regex) tokens are deprioritized with respect to predicates with non-regex tokens. In some implementations, a predicate corresponds to a contiguous substring if, for any input, the span of its token match is an exact match (e.g., same start and end indices) for the contiguous substring. In some implementations, predicates that match the contiguous substring are prioritized over predicates that match more inputs.
In some implementations, the contiguous substrings are also used to group inputs to generate better domains. In some implementations, the computing system linearly intersects transform graphs to form program domains (e.g., rather than attempt to validate every possible intersection). As such, in some circumstances, grouping inputs before they are mapped to transform graphs and intersected has a significant impact on the correctness of domains and how quickly the PBE system is able converge on the best transformation function.
In some implementations, the computing system groups inputs based on their character patterns and/or significant constants. In some implementations, the contiguous sub strings are used to extract sub strings in input values that correspond to the contiguous substring spans and use those as constants in clustering inputs. In some circumstances, this approach allows for converging faster as users tend to provide hints about important constants.
In some implementations, a materialized union of token matches is used to update the transformation function (e.g., instead of using an input graph). In some circumstances, using the materialized union of token matches improves stability over an approach that uses an input graph. For example, an input graph approach based on intersecting the various patterns keeps only those token matches that are present in all inputs. However, when the data has some noise in it, or when some inputs simply are lacking a particular token match, the input graph approach drops these tokens even though they may be key information. For example, if the input values are a set of URLs, some of which have a ‘?’, a materialized union approach may take everything up to the ‘?’ or to the end if it's not present. Conversely, an input graph approach may drop the “?” and result in an overly complicated transformation function (or no valid transformation function).
In some implementations, a token match set is obtained, the token match set being a set that represents the union of all token matches identified in the input values. In some implementations, the set of token matches includes occurrences of each token match and the corresponding spans in each input. In some circumstances, this approach is faster and requires less computing power than finding the intersection of input graphs. These advantages stem from the approach being linear, while generating an intersected input graph is quadratic in the number of inputs. For example, in terms of the length of the longest input, the time needed is O(n2) to detect the different spans, whereas intersecting input graphs is O(n4). Moreover, the token match set approach does not incur a performance cost in transform graph computations.
In some implementations, an empty intersection of all transform graphs is used as a signal that the transformation is a multi-domain case. In some implementations, instead of clustering the transform graphs, the computing system intersects them one at a time. In some implementations, this approach results in a final transform graphs for each domain. In some implementations, a classifier is generated to identify which subprogram to apply for a given input. In some implementations, a decision tree is generated based on the existence or absence of token matches. In some implementations, one or more operators are used in the identification, such as STARTSWITH( ), ENDSWITH( ), and EQUALS( ).
In some implementations, one or more function preferences are used to rank valid transformation functions and updating the transformation function includes selecting the highest ranked valid transformation function. In some implementations, the function preferences include one or more of: a preference to anchor from the start or end of an input rather than on punctuation, a preference to use the first matching series of digits rather than a later occurring matching series, and a preference for shorter functions over longer functions.
In some implementations, the updating occurs (916) in response to user activation of a user-interface affordance. For example, the updating occurs in response to a user selection of confirmation 326 (
In some implementations, the transformation function ƒ includes (918) a sequence of IF statements, each IF statement evaluating a respective Boolean expression, and an ELSE statement. For example,
In some implementations, at least one Boolean expression for an IF statement uses (924) a string position of a contiguous substring ssi within the corresponding input string For example, in
The method 900 further includes displaying (926) the updated transformation function ƒ in the expression window. For example,
Turning to
Turning now to some example scenarios and implementations.
(A1) In one aspect, some implementations include a method (e.g., the method 900) for transforming data performed at a computer (e.g., the computing device 200) having a display, one or more processors, and memory storing one or more programs (e.g., the data visualization application 222 and the expression generator 228) configured for execution by the one or more processors. The method includes displaying (e.g., via the data visualization application 222) a user interface (e.g., the user interface 230) including: (i) a first column (e.g., the column 302) having non-editable input strings s1, s2, . . . , sn retrieved from a data field from a data source (e.g., the first data source 250-1); (ii) a second column (e.g., the column 304) having editable output strings t1, t2, . . . , tn, initialized from the data field so that each row has a respective input string and a respective matching output string; (iii) an expression window (e.g., the window 320) displaying a transformation function ƒ (e.g., the transformation functions 240) that transforms each input string into the corresponding output string. The method further includes iteratively processing (e.g., via the expression generator 228) a plurality of user inputs, each user input i providing a sample row transformation to edit an ith output string ti, where a plurality of the user inputs i designate a contiguous substring ssi of the corresponding input string si (e.g., the portion 806), the contiguous substring expressing a causal basis for transforming the input string si into the output string ti. The method further includes updating (e.g., via the expression generator 228) the transformation function ƒ according to the provided sample row transformations 1, 2, . . . , i so that:
The method further includes displaying (e.g., via the expression generator 228 and/or the data visualization application 222) the updated transformation function ƒ in the expression window, and receiving (e.g., 928) a user action to save the transformation function ƒ shown in the expression window.
(A2) In some implementations of A2, the updating is periodic and occurs after each user input. In some implementations, the updating occurs after the user inputs a preset number of user transformation examples and/or user hints (e.g., 1, 2, or 3). For example, the transformation function is updated after receiving at least two user examples and is then updated after each subsequent example or hint. In some implementations, the updating occurs a preset amount of time after the user's latest input. For example, the updating occurs 5, 10, or 20 seconds after the user's latest input. In some implementations, the updating occurs at periodic intervals during a user's entry of inputs.
(A3) In some implementations of A1, the updating occurs in response to a user activation of a user-interface affordance. For example, the updating occurs in response to a user selection of confirmation 326 (
(A4) In some implementations of A1-A3, the transformation function ƒ includes a sequence of IF statements, each IF statement evaluating a respective Boolean expression, and an ELSE statement. For example,
(A5) In some implementations of A4, minimal branching among possible transformation functions includes having a fewest number of IF statements. For example,
(A6) In some implementations of A4 or A5, at least one Boolean expression for an IF statement specifies one of the contiguous substrings. For example, in
(A7) In some implementations of A4-A6, at least one Boolean expression for an IF statement uses a string position of a contiguous substring ss; within the corresponding input string For example, in
(A8) In some implementations of A1-A7, the expression window initially displays a transformation function ƒ specifying that the output string is equal to the input string. For example, the expression window 320 in
(A9) In some implementations of A1-A7, the expression window displays no transformation function prior to receiving any user input to specify a sample row transformation. For example, in
(A10) In some implementations of A1-A9, saving the transformation function ƒ includes copying (930) a string representation of the transformation function ƒ to an operating system clipboard and pasting it into another location.
(A11) In some implementations of A1-A10, the user action includes selecting a save icon or button from a pop-up window. For example, the user action may include selecting the user-selectable icon 322.
(B1) In another aspect, some implementations include a method executing at a computing system (e.g., the computing device 200). For example, the computing system is optionally a smart phone, a tablet, a notebook computer, a desktop computer, a virtual machine, a cloud computing system, or a server system. In some implementations, the method is performed by a PBE program (e.g., the expression generator 228) executing on the computing system. The method includes displaying (e.g., via the data visualization application 222) a user interface (e.g., user interface 230) including: (i) a first set of input data (e.g., input data in the row 802,
(B2) In some implementations of B1, the method further includes receiving a user action to save the transformation function ƒ shown in the expression window (e.g., selection of the user-selectable icon 322 in
(B3) In some implementations of B1 or B2, the method further includes transforming the second set of output data using the updated transformation function ƒ and storing the transformed second set of output data (e.g., storing the transformed second set within the database 250).
(B4) In some implementations B1-B3, the method further includes transforming the second set of output data using the updated transformation function ƒ and generating (e.g., via the data visualization application 222) a data visualization using the transformed second set of output data.
(B5) In some implementations of B1-B4, the method further includes receiving an additional hint from the user, where the additional hint includes a causal basis for transforming one of the plurality of user example transformations, and the hint includes one or more characters not in the corresponding input datum. For example, a user submits an example transformation of “input ‘Apple’ outputs ‘string’” and the hint includes the NOTCONTAINS operator and one or more digit characters.
(B6) In some implementations of B1-B5, the updating occurs after each user input. In some implementations, the updating occurs after the user inputs a preset number of user transformation examples and/or user hints. In some implementations, the updating occurs a preset amount of time after the user's latest input. In some implementations, the updating occurs at periodic intervals during a user's entry of inputs.
(B7) In some implementations of B1-B5, the updating occurs in response to a user activation of a user-interface affordance.
(B8) In some implementations of B1-B7, the transformation function ƒ includes a sequence of conditional statements. In some implementations, the transformation function ƒ is updated to have a minimal amount of branching among possible transformation functions. In some implementations, the minimal branching includes having a fewest number of conditional statements. In some implementations, minimal branching means having the fewest number of IF statements. In some implementations, at least one conditional statement specifies the user hint. In some implementations, the at least one conditional state specifies a span of the user hint. In some implementations, the at least one conditional state specifies a character of the user hint.
(B9) In some implementations of B1-B8, the expression window initially displays a transformation function ƒ specifying that the output datum is equal to the input datum.
(B10) In some implementations of B1-B9, the expression window displays no transformation function prior to receiving any user input to specify a sample row transformation.
In another aspect, some implementations include a computing system including one or more processors and memory coupled to the one or more processors, the memory storing one or more programs configured to be executed by the one or more processors, the one or more programs including instructions for performing any of the methods described herein (e.g., A1-A11 and B1-B10 above).
In yet another aspect, some implementations include a non-transitory computer-readable storage medium storing one or more programs for execution by one or more processors of a computing system, the one or more programs including instructions for performing any of the methods described herein (e.g., A1-A11 and B1-B10 above).
The terminology used in the description of the invention herein is for the purpose of describing particular implementations only and is not intended to be limiting of the invention. As used in the description of the invention and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term “and/or” as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and/or groups thereof.
The foregoing description, for purpose of explanation, has been described with reference to specific implementations. However, the illustrative discussions above are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations are possible in view of the above teachings. The implementations were chosen and described in order to best explain the principles of the invention and its practical applications, to thereby enable others skilled in the art to best utilize the invention and various implementations with various modifications as are suited to the particular use contemplated.
Number | Name | Date | Kind |
---|---|---|---|
20160125057 | Gould | May 2016 | A1 |
20220318194 | Ireifej | Oct 2022 | A1 |
Entry |
---|
Kandel et al., Article: “Wrangler: Interactive Visual Specification of Data Transformation Scripts”; CHI '11: Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, May 2011 pp. 3363-3372 (Year: 2011). |