vega_datasets icon indicating copy to clipboard operation
vega_datasets copied to clipboard

Some datasets are images and throw a ValueError

Open tcdejong opened this issue 3 years ago • 0 comments

Some datasets like ffox are images (.png) and thus throw a ValueError

To reproduce in vega-datasets-0.9.0 (current version on pip):

from vega_datasets import data
data.ffox()

Raises:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
c:\Users\redacted\Repositories\altair-demos\basic_chart.py in <module>
----> 1 data.ffox()

~\AppData\Local\Programs\Python\Python39\lib\site-packages\vega_datasets\core.py in __call__(self, use_local, **kwargs)
    244             return pd.read_csv(datasource, **kwds)
    245         else:
--> 246             raise ValueError(
    247                 "Unrecognized file format: {0}. "
    248                 "Valid options are ['json', 'csv', 'tsv']."

ValueError: Unrecognized file format: png. Valid options are ['json', 'csv', 'tsv'].

tcdejong avatar Mar 28 '22 14:03 tcdejong