Skip to content

Instantly share code, notes, and snippets.

@AjayThorve
Created May 18, 2020 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AjayThorve/f63f8afa2713713b0fe2c3b8df311501 to your computer and use it in GitHub Desktop.
Save AjayThorve/f63f8afa2713713b0fe2c3b8df311501 to your computer and use it in GitHub Desktop.
cuxfilter eg. 2
import cuxfilter
import cudf
df = cudf.read_parquet('./data/census_data.parquet/*')
#create cuxfilter dataframe
cux_df = cuxfilter.DataFrame.from_dataframe(df)
#declare charts
chart0 = cuxfilter.charts.scatter_geo(x='x', y='y')
chart1 = cuxfilter.charts.bar('age')
chart2 = cuxfilter.charts.bar('sex')
chart3 = cuxfilter.charts.bar('cow')
chart4 = cuxfilter.charts.bar('income')
chart5 = cuxfilter.charts.bar('education')
d = cux_df.dashboard(
[chart0, chart1, chart2, chart3, chart4, chart5],
layout=cuxfilter.layouts.feature_and_five_edge,
)
d.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment