Vega is a high-level implementation of the grammar of graphics, allowing the creation of charts with the power of D3 but with greater ease.
We’ve released a collection of commonly used charts under Vega gallery.
This will be continuously updated, watch out for this space.
Admin page now shows information about Gramex and the server.
Broadly in these sections
This information is exposed under admin-page/info endpoint
(Contributor: @jatin.balodhi)
gramex.ml.groupmeans
analytical model helps you identify the most significant influencer of each metric.
By coupling with FormHandler
‘s filter, provides you a powerful API to build exploratory interfaces.
For example, Groupmeans with FormHandler
can be exposed as
url:
groupmeans-insights:
pattern: /$YAMLURL/insights-api
handler: FormHandler
kwargs:
url: $YAMPATH/sales-data.csv
modify: groupmeans_app.groupmeans_insights(data, handler)
And in groupmeans_app.py
import gramex.ml
def groupmeans_insights(data, handler):
args = handler.argparse(
groups={'nargs': '*', 'default': []},
numbers={'nargs': '*', 'default': []},
cutoff={'type': float, 'default': .01},
quantile={'type': float, 'default': .95},
minsize={'type': int, 'default': None},
weight={'type': float, 'default': None})
return gramex.ml.groupmeans(data, args.groups, args.numbers,
args.cutoff, args.quantile, args.weight)
Read more on guide
Also, read insights derived from National Acheivement Survey data
If you’re used gramex 0.x earlier, you can relate to autolysis.groupmeans
With RMarkdown documents you can weave together narrative text and code to produce elegantly formatted outputs.
You can now render RMarkdown files as HTML outputs using Gramex’s FileHandler
with rmarkdown
transform.
url:
r/rmarkdown:
pattern: /$YAMLURL/(.*Rmd)
handler: FileHandler
kwargs:
path: $YAMLPATH # path at which Rmd files (.*Rmd) are located
transform:
"*.Rmd": # Any file matching .Rmd
function: rmarkdown(content, handler)
headers:
Content-Type: text/html
Cache-Control: max-age=3600
This RMarkdown-story.Rmd file is rendered as
You can now read files from a HTTP or HTTPS URL (public datasets, external hosted, etc!)
... # FormHandler
# This URL is read once and cached forever
url: http://www-bcf.usc.edu/~gareth/ISL/Advertising.csv
ext: csv # Explicitly specify the extension for HTTP(S) urls
This makes it possible for you to create charts, stories from 3-rd party data endpoints.
You can bust the cache using parameters
Starting 1.44
, when running gramex, the application prompts the user on the command line:
-------------------------------------------------------------------------
Read the license agreement at https://learn.gramener.com/guide/license/
Do you accept the license (Y/N):
Once the user accepts the license, the prompt is not shown thereafter.
Users can also accept the license by running gramex license accept
once on the command line. This calls gramex.license.accept(...)
gramex uicomponents now ships with g1
0.10.0
In this version, two changes were introduced to mapviewer
tooltip:
& tooltipOptions:
were inside attrs:
.
Now they are 1 level higher, alongside attrs:
.gramex init
fail if git is not installed. This is now fixed.Note: gramex >= 1.41
onwards requires Anaconda >= 5.2.0
To upgrade Gramex, run:
pip install --verbose gramex==1.44
To upgrade apps dependencies, run:
gramex setup --all
This downloads Chromium and other front-end dependencies. That may take time.