Download the PHP package lfiweb/jsonstat-phpviz without Composer

On this page you can find all versions of the php package lfiweb/jsonstat-phpviz. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package jsonstat-phpviz

jsonstat-phpviz

Render JSON-stat v2.0 data with any number of dimensions as an HTML table using PHP.

Features

not implemented

Usage

Example 1

Render a table from JSON-stat data having four dimensions with sizes [3,2,4,2] (= shape). Two dimensions are automatically used to group the rows:

Example 2

Render a table from the same JSON-stat data, but with three dimensions used for the row grouping instead:

Example 3

Transpose the table by permutating dimension A with dimension D:

See NumPy transpose for how to use the axis array.

Example 4

Real-world example with data from the Swiss NFI having a caption, column units and row totals as well as two dimensions of size one, excluded from rendering:

Example 5

Render the table as comma separated values (csv):

Installation

Install with composer require lfiweb/jsonstat-phpviz or add it to your composer.json

Dependencies

None. But if you want to export the table in the ODF Spreadsheet (ods) or MS Excel format (xlsx), you need PhpSpreadsheet. You can install it with composer require phpoffice/phpspreadsheet.

JSON-stat rendering rules

The renderer applies the following rules when generating a html table:

HTML inside JSON-stat

Caution: Do this only if you trust the origin of the JSON-stat.

The renderer (or rather the DOMDocument) escapes all html contained in the JSON-stat when inserting it into the DOM. If you want to allow HTML inside the table cells, you need to override the classes TableHtml and CellHtml as follows:

Note:

Note 1: When rendering a table with rowspans (useRowSpans property is true), applying css might become complicated because of the irregular number of cells per row.

Note 2: Originally, this code was directly translated from its JavaScript counterpart jsonstat-viz, but has since been developed independently @see https://github.com/speich/jsonstat-viz

Author

Simon Speich for the Swiss National Forest Inventory

License

GNU General Public License v3.0 or later\ See COPYING for the full text.


All versions of jsonstat-phpviz with dependencies

PHP Build Version
Package Version
Requires ext-dom Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lfiweb/jsonstat-phpviz contains the following files

Loading the files please wait ....