Skip to content

Commit

Permalink
feat: replace SOURCES.md with datapackage.md (#643)
Browse files Browse the repository at this point in the history
Co-authored-by: Dan Redding <[email protected]>
  • Loading branch information
dsmedia and dangotbanned authored Dec 15, 2024
1 parent 18a4670 commit 5eaa256
Show file tree
Hide file tree
Showing 9 changed files with 3,205 additions and 522 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Collection of datasets used in Vega and Vega-Lite examples. This data lives at h

Common repository for example datasets used by Vega related projects. Keep changes to this repository minimal as other projects (Vega, Vega Editor, Vega-Lite, Polestar, Voyager) use this data in their tests and for examples.

The list of sources is in [SOURCES.md](https://github.com/vega/vega-datasets/blob/next/SOURCES.md).
The list of sources is in [datapackage.md](https://github.com/vega/vega-datasets/blob/next/datapackage.md#resources).
This metadata is also available in a machine-readable format at [datapackage.json](https://github.com/vega/vega-datasets/blob/next/datapackage.json).


To access the data in Observable, you can import `vega-dataset`. Try our [example notebook](https://observablehq.com/@vega/vega-datasets). To access these datasets from Python, you can use the [Vega datasets python package](https://github.com/altair-viz/vega_datasets). To access them from Julia, you can use the [VegaDatasets.jl julia package](https://github.com/davidanthoff/VegaDatasets.jl).

Expand Down
423 changes: 0 additions & 423 deletions SOURCES.md

This file was deleted.

966 changes: 966 additions & 0 deletions _data/datapackage_additions.toml

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions _data/templates/package-table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# {{ package.name }}
`{{ package.version }}` | [GitHub]({{ package.homepage }}) | {{ package.created | fmt_date()}}

{{ package.description }}

## licenses
{{ package.licenses | tabulate() }}

## contributors
{{ package.contributors | tabulate() }}

# resources
{% for resource in package.resources %}
{% include 'resource-table.md' %}
{% endfor %}
23 changes: 23 additions & 0 deletions _data/templates/resource-table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## `{{ resource.name }}`{% if resource.title %} {{ resource.title }}{% endif %}

{% if resource.path %}
### path
{{ resource.path }}
{% endif %}
{% if resource.description %}
### description
{{ resource.description }}
{% endif %}
{% if resource.schema %}
### schema
{{ resource.schema | filter_dict(exclude=['fields']) | dict_to_markdown(level=2) }}
{{ resource.schema.fields | tabulate() }}
{% endif %}
{% if resource.sources %}
### sources
{{ resource.sources | tabulate() }}
{% endif %}
{% if resource.licenses %}
### licenses
{{ resource.licenses | tabulate() }}
{% endif %}
Loading

0 comments on commit 5eaa256

Please sign in to comment.