PMSI-AlignAlytics / dimple

An object-oriented API for business analytics
Other
2.73k stars 556 forks source link

Using CSV as data source #278

Closed jerryhall closed 6 years ago

jerryhall commented 7 years ago

I've tried for hours now to use a CSV file that has a header row. The first column is County, then other columns are years 1990, 1991, 1992 etc.

The first column of data are California counties eg. Los Angeles, San Diego and the data in the other columns are numbers from 100-100,000 (the number of traffic citations in LA County in 1990, 1991, 1992 etc..

Ideally I can use such a CSV file as my data changes regularly and I'd like to not have to hard code individual charts or pages too often.

Could you give me an example of using such a csv for a line chart like this?: http://dimplejs.org/examples_viewer.html?id=lines_curvy

Thanks!

welshjs commented 7 years ago

Try to transpose the data so the dates are on each row and the locations are the column header?

James

On Jul 4, 2017, at 8:35 PM, Jerry Hall notifications@github.com wrote:

I've tried for hours now to use a CSV file that has a header row. The first column is County, then other columns are years 1990, 1991, 1992 etc.

The first column of data are California counties eg. Los Angeles, San Diego and the data in the other columns are numbers from 100-100,000 (the number of traffic citations in LA County in 1990, 1991, 1992 etc..

Ideally I can use such a CSV file as my data changes regularly and I'd like to not have to hard code individual charts or pages too often.

Could you give me an example of using such a csv for a line chart like this?: http://dimplejs.org/examples_viewer.html?id=lines_curvy

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

jerryhall commented 7 years ago

Thanks James. I tried that and about another 50 things to no avail. It seems like the most basic table in the world. I can create C3, D3 charts but, this is strange. I can't really tell from the docs what is what so not what to try. Is there a basic, 101 version chart one can do with a csv with a header row and a first col like this example? Thanks much.

jerryhall commented 6 years ago

I wasn't aware I could use columnar data and just name the column label. Thanks.