docs/dimensions.md in reports_kit-0.2.0 vs docs/dimensions.md in reports_kit-0.3.0
- old
+ new
@@ -13,75 +13,68 @@
```
You can then use `dimensions: ['carrier']` to count the number of Flights per Carrier:
```yaml
-measure:
- key: flight
- dimensions:
- - carrier
+measure: flight
+dimensions:
+- carrier
```
[<img src="images/flights_by_carrier.png?raw=true" width="500" />](images/flights_by_carrier.png?raw=true)
You can also use two dimensions:
```yaml
-measure:
- key: flight
- dimensions:
- - carrier
- - flight_at
+measure: flight
+dimensions:
+- carrier
+- flight_at
```
[<img src="images/flights_by_carrier_and_flight_at.png?raw=true" width="500" />](images/flights_by_carrier_and_flight_at.png?raw=true)
Dimensions can be configured using a string (`carrier`):
```yaml
-measure:
- key: flight
- dimensions:
- - carrier
+measure: flight
+dimensions:
+- carrier
```
Or, if you need to use options, you can configure them using a hash:
```yaml
-measure:
- key: flight
- dimensions:
- - key: carrier
- limit: 5
+measure: flight
+dimensions:
+- key: carrier
+ limit: 5
```
#### Types
##### Association
```yaml
-measure:
- key: flight
- dimensions:
- - carrier
+measure: flight
+dimensions:
+- carrier
```
[<img src="images/flights_by_carrier.png?raw=true" width="500" />](images/flights_by_carrier.png?raw=true)
##### Datetime Column
```yaml
-measure:
- key: flight
- dimensions:
- - flight_at
+measure: flight
+dimensions:
+- flight_at
```
[<img src="images/flights_by_flight_at.png?raw=true" width="500" />](images/flights_by_flight_at.png?raw=true)
##### Integer Column
```yaml
-measure:
- key: flight
- dimensions:
- - delay
+measure: flight
+dimensions:
+- delay
```
[<img src="images/flights_by_delay.png?raw=true" width="500" />](images/flights_by_delay.png?raw=true)
##### Custom Dimensions
@@ -98,13 +91,12 @@
```
We can then use the `hours_delayed` dimension:
```yaml
-measure:
- key: flight
- dimensions:
- - hours_delayed
+measure: flight
+dimensions:
+- hours_delayed
```
[<img src="images/flights_by_hours_delayed.png?raw=true" width="500" />](images/flights_by_hours_delayed.png?raw=true)
#### Options