Create a punchcard search
To create a punchcard, you must use a search that returns data in the correct format.
Use this syntax to generate a punchcard.
... | <stats_function>[(metric_field)] [<stats_function>(color_field)] by <first_dimension> <second_dimension>
- Determines circle size.
- Use this function to aggregate the metric you are tracking.
- Determines circle color.
- Use a stats function to aggregate values in this field.
- For sequential color mode, values in this field must be numerical.
- Represents the first dimension for plotting results.
- For example, you can use a time field such as date_hour.
- Represents the second dimension for plotting results, usually more granular than the first dimension.
- For example, you can use a time field such as date_wday.
Search results data format
After running the search, check the Statistics tab. The results table includes columns representing the metric, color field, and two time dimensions.
Make sure that the results table has columns for required fields in this order.
|first_dimension||second_dimension||count or other aggregated value||color_field (optional)|
Here is a search that analyzes bicycle rental popularity by hours and days.
inputlookup bikeshare.csv | stats count by date_hour date_wday
The search generates the following results table.
This documentation applies to the following versions of Punchcard: 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0