I am looking to recreate the census heatmap shown on the Datashader front page:
import datashader as ds, pandas as pd, colorcet
df = pd.read_csv('census.csv')
cvs = ds.Canvas(plot_width=850, plot_height=500)
agg = cvs.points(df, 'longitude', 'latitude')
img = ds.tf.shade(agg, cmap=colorcet.fire, how='log')
or the file used in the census example:
df = dd.read_parquet('./data/census2010.parq')
For the life of me, I cannot locate the source for either of these files- what am I doing wrong???
Welcome to the community. Its actually a great question.
My guess is that you need to download the
datashader examples as described here.
Could you try @syphax and report back.
In general I, and lots of other users have been struggling with find the data when using the documentation on the web and not because we have the underlying notebooks installed locally. Its not very clear where the data is. How can we improve this situation @jbednar, @droumis and others?
This is where the pre-prepared census 2010 data can be downloaded from: http://s3.amazonaws.com/datashader-data/census2010.parq.zip
That was my thought; I did download the examples; the only data I found there was an NYC taxi ride dataset:
I looked pretty hard before posting this message!
Thank you. Naive question: Is this documented anywhere?
Your questions are good questions!
It is documented, but not in a particularly accessible place. The Census notebook (Census — Examples 0.1.0 documentation) which is the first item on the Topics page (Topics — Datashader v0.14.3) has a “Download this project” link right at the top, and this download contains a project file that links to everything you need to run the demo code.
Ah yes, I see that. Yes, that’s a bit hidden!