Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Commit

Permalink
New QuickCharts recipe - same as UCDP
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarans committed Aug 20, 2019
1 parent b00c884 commit fad86f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/hdx_resource_view_static.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
description: ""
title: "Quick Charts"
view_type: "hdx_hxl_preview"
hxl_preview_config: '{"configVersion":5,"bites":[{"tempShowSaveCancelButtons":false,"ingredient":{"aggregateColumn":null,"valueColumn":"#affected+killed","aggregateFunction":"sum","dateColumn":null,"comparisonValueColumn":null,"comparisonOperator":null,"filters":{"filterWith":[{"#date+year":"$MAX$"}]},"description":""},"type":"key figure","errorMsg":null,"computedProperties":{"explainedFiltersMap":{},"title":"Sum of best","dataTitle":"best","unit":null},"uiProperties":{"internalColorPattern":["#1ebfb3","#0077ce","#f2645a","#9C27B0"],"title":"Fatalities in latest year","postText":"deaths"},"dataProperties":{},"displayCategory":"Key Figures","hashCode":-1955043658},{"tempShowSaveCancelButtons":false,"ingredient":{"aggregateColumn":"#date+year","valueColumn":"#affected+killed","aggregateFunction":"sum","dateColumn":null,"comparisonValueColumn":null,"comparisonOperator":null,"filters":{},"description":""},"type":"chart","errorMsg":null,"computedProperties":{"explainedFiltersMap":{},"pieChart":false,"title":"Sum of best by year","dataTitle":"best"},"uiProperties":{"swapAxis":true,"showGrid":true,"color":"#1ebfb3","sortingByValue1":null,"sortingByCategory1":"DESC","internalColorPattern":["#1ebfb3","#0077ce","#f2645a","#9C27B0"],"title":"Fatalities each year","limit":null,"dataTitle":"deaths"},"dataProperties":{},"displayCategory":"Charts","hashCode":2084034886},{"tempShowSaveCancelButtons":false,"ingredient":{"aggregateColumn":"#adm1+name","valueColumn":"#affected+killed","aggregateFunction":"sum","dateColumn":null,"comparisonValueColumn":null,"comparisonOperator":null,"filters":{"filterWithout":[{"#adm1":""}]},"description":""},"type":"chart","errorMsg":null,"computedProperties":{"explainedFiltersMap":{},"pieChart":false,"title":"Sum of best by adm_1","dataTitle":"best"},"uiProperties":{"swapAxis":true,"showGrid":true,"color":"#1ebfb3","sortingByValue1":"DESC","sortingByCategory1":null,"internalColorPattern":["#1ebfb3","#0077ce","#f2645a","#9C27B0"],"title":"Fatalities per region in latest year","dataTitle":"deaths"},"dataProperties":{},"displayCategory":"Charts","hashCode":738289179}],"recipeUrl":"https://raw.githubusercontent.com/mcarans/hxl-recipes/dev/recipes/genericlatestyear/recipe.json"}'
hxl_preview_config: '{"configVersion":5,"bites":[{"tempShowSaveCancelButtons":false,"ingredient":{"aggregateColumn":null,"valueColumn":"#affected+killed","aggregateFunction":"sum","dateColumn":null,"comparisonValueColumn":null,"comparisonOperator":null,"filters":{"filterWith":[{"#date+year":"$MAX$"}]},"description":""},"type":"key figure","errorMsg":null,"computedProperties":{"explainedFiltersMap":{},"title":"Sum of best","dataTitle":"best","unit":null},"uiProperties":{"internalColorPattern":["#1ebfb3","#0077ce","#f2645a","#9C27B0"],"title":"Fatalities in latest year","postText":"deaths"},"dataProperties":{},"displayCategory":"Key Figures","hashCode":-1955043658},{"tempShowSaveCancelButtons":false,"ingredient":{"aggregateColumn":"#date+year","valueColumn":"#affected+killed","aggregateFunction":"sum","dateColumn":null,"comparisonValueColumn":null,"comparisonOperator":null,"filters":{},"description":""},"type":"chart","errorMsg":null,"computedProperties":{"explainedFiltersMap":{},"pieChart":false,"title":"Sum of best by year","dataTitle":"best"},"uiProperties":{"swapAxis":true,"showGrid":true,"color":"#1ebfb3","sortingByValue1":null,"sortingByCategory1":"DESC","internalColorPattern":["#1ebfb3","#0077ce","#f2645a","#9C27B0"],"title":"Fatalities each year","limit":null,"dataTitle":"deaths"},"dataProperties":{},"displayCategory":"Charts","hashCode":2084034886},{"tempShowSaveCancelButtons":false,"ingredient":{"aggregateColumn":"#adm1+name","valueColumn":"#affected+killed","aggregateFunction":"sum","dateColumn":null,"comparisonValueColumn":null,"comparisonOperator":null,"filters":{"filterWith":[{"#date+year":"$MAX$"}],"filterWithout":[{"#adm1":""}]},"description":""},"type":"chart","errorMsg":null,"computedProperties":{"explainedFiltersMap":{},"pieChart":false,"title":"Sum of best by adm_1","dataTitle":"best"},"uiProperties":{"swapAxis":true,"showGrid":true,"color":"#1ebfb3","sortingByValue1":"DESC","sortingByCategory1":null,"internalColorPattern":["#1ebfb3","#0077ce","#f2645a","#9C27B0"],"title":"Fatalities per region in latest year","dataTitle":"deaths"},"dataProperties":{},"displayCategory":"Charts","hashCode":738289179}],"recipeUrl":"https://raw.githubusercontent.com/mcarans/hxl-recipes/dev/recipes/genericlatestyear/recipe.json"}'
2 changes: 1 addition & 1 deletion tests/test_acled.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ def test_generate_resource_view(self):
dataset.add_update_resource(resource)
result = generate_resource_view(dataset)
assert result == {'resource_id': '123', 'description': '', 'title': 'Quick Charts', 'view_type': 'hdx_hxl_preview',
'hxl_preview_config': '{"configVersion":5,"bites":[{"tempShowSaveCancelButtons":false,"ingredient":{"aggregateColumn":null,"valueColumn":"#affected+killed","aggregateFunction":"sum","dateColumn":null,"comparisonValueColumn":null,"comparisonOperator":null,"filters":{"filterWith":[{"#date+year":"$MAX$"}]},"description":""},"type":"key figure","errorMsg":null,"computedProperties":{"explainedFiltersMap":{},"title":"Sum of best","dataTitle":"best","unit":null},"uiProperties":{"internalColorPattern":["#1ebfb3","#0077ce","#f2645a","#9C27B0"],"title":"Fatalities in latest year","postText":"deaths"},"dataProperties":{},"displayCategory":"Key Figures","hashCode":-1955043658},{"tempShowSaveCancelButtons":false,"ingredient":{"aggregateColumn":"#date+year","valueColumn":"#affected+killed","aggregateFunction":"sum","dateColumn":null,"comparisonValueColumn":null,"comparisonOperator":null,"filters":{},"description":""},"type":"chart","errorMsg":null,"computedProperties":{"explainedFiltersMap":{},"pieChart":false,"title":"Sum of best by year","dataTitle":"best"},"uiProperties":{"swapAxis":true,"showGrid":true,"color":"#1ebfb3","sortingByValue1":null,"sortingByCategory1":"DESC","internalColorPattern":["#1ebfb3","#0077ce","#f2645a","#9C27B0"],"title":"Fatalities each year","limit":null,"dataTitle":"deaths"},"dataProperties":{},"displayCategory":"Charts","hashCode":2084034886},{"tempShowSaveCancelButtons":false,"ingredient":{"aggregateColumn":"#adm1+name","valueColumn":"#affected+killed","aggregateFunction":"sum","dateColumn":null,"comparisonValueColumn":null,"comparisonOperator":null,"filters":{"filterWithout":[{"#adm1":""}]},"description":""},"type":"chart","errorMsg":null,"computedProperties":{"explainedFiltersMap":{},"pieChart":false,"title":"Sum of best by adm_1","dataTitle":"best"},"uiProperties":{"swapAxis":true,"showGrid":true,"color":"#1ebfb3","sortingByValue1":"DESC","sortingByCategory1":null,"internalColorPattern":["#1ebfb3","#0077ce","#f2645a","#9C27B0"],"title":"Fatalities per region in latest year","dataTitle":"deaths"},"dataProperties":{},"displayCategory":"Charts","hashCode":738289179}],"recipeUrl":"https://raw.githubusercontent.com/mcarans/hxl-recipes/dev/recipes/genericlatestyear/recipe.json"}'}
'hxl_preview_config': '{"configVersion":5,"bites":[{"tempShowSaveCancelButtons":false,"ingredient":{"aggregateColumn":null,"valueColumn":"#affected+killed","aggregateFunction":"sum","dateColumn":null,"comparisonValueColumn":null,"comparisonOperator":null,"filters":{"filterWith":[{"#date+year":"$MAX$"}]},"description":""},"type":"key figure","errorMsg":null,"computedProperties":{"explainedFiltersMap":{},"title":"Sum of best","dataTitle":"best","unit":null},"uiProperties":{"internalColorPattern":["#1ebfb3","#0077ce","#f2645a","#9C27B0"],"title":"Fatalities in latest year","postText":"deaths"},"dataProperties":{},"displayCategory":"Key Figures","hashCode":-1955043658},{"tempShowSaveCancelButtons":false,"ingredient":{"aggregateColumn":"#date+year","valueColumn":"#affected+killed","aggregateFunction":"sum","dateColumn":null,"comparisonValueColumn":null,"comparisonOperator":null,"filters":{},"description":""},"type":"chart","errorMsg":null,"computedProperties":{"explainedFiltersMap":{},"pieChart":false,"title":"Sum of best by year","dataTitle":"best"},"uiProperties":{"swapAxis":true,"showGrid":true,"color":"#1ebfb3","sortingByValue1":null,"sortingByCategory1":"DESC","internalColorPattern":["#1ebfb3","#0077ce","#f2645a","#9C27B0"],"title":"Fatalities each year","limit":null,"dataTitle":"deaths"},"dataProperties":{},"displayCategory":"Charts","hashCode":2084034886},{"tempShowSaveCancelButtons":false,"ingredient":{"aggregateColumn":"#adm1+name","valueColumn":"#affected+killed","aggregateFunction":"sum","dateColumn":null,"comparisonValueColumn":null,"comparisonOperator":null,"filters":{"filterWith":[{"#date+year":"$MAX$"}],"filterWithout":[{"#adm1":""}]},"description":""},"type":"chart","errorMsg":null,"computedProperties":{"explainedFiltersMap":{},"pieChart":false,"title":"Sum of best by adm_1","dataTitle":"best"},"uiProperties":{"swapAxis":true,"showGrid":true,"color":"#1ebfb3","sortingByValue1":"DESC","sortingByCategory1":null,"internalColorPattern":["#1ebfb3","#0077ce","#f2645a","#9C27B0"],"title":"Fatalities per region in latest year","dataTitle":"deaths"},"dataProperties":{},"displayCategory":"Charts","hashCode":738289179}],"recipeUrl":"https://raw.githubusercontent.com/mcarans/hxl-recipes/dev/recipes/genericlatestyear/recipe.json"}'}

0 comments on commit fad86f6

Please sign in to comment.