2022-09-03 00:28:03 +00:00
|
|
|
# Dataset Library for PHP/Composer
|
|
|
|
|
|
|
|
This is a library for loading datasets from bundled packages.
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
Require Dataset, and some actual datasets:
|
|
|
|
|
|
|
|
$ composer require noccylabs/dataset juicebox/flavordata
|
|
|
|
|
|
|
|
You can now open the desired sets and do useful stuff with the data:
|
|
|
|
|
|
|
|
```php
|
|
|
|
use NoccyLabs\Dataset\DatasetManager;
|
|
|
|
|
|
|
|
$dm = new DatasetManager();
|
2022-09-03 14:23:46 +00:00
|
|
|
$ds = $dm->getDataset("juicebox/flavordata#flavors");
|
2022-09-03 00:28:03 +00:00
|
|
|
|
2022-09-03 14:23:46 +00:00
|
|
|
foreach ($ds as $row) {
|
|
|
|
// row is an array
|
2022-09-03 00:28:03 +00:00
|
|
|
}
|
|
|
|
```
|