PHPackages                             soandso/continental-index - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. soandso/continental-index

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

soandso/continental-index
=========================

Library for calculating the index of continentality - a numerical characteristic of continental climate

0.3.1(4y ago)011GPL-2.0-or-laterPHPPHP ^7.4

Since Mar 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/soandsoSwEn/continental-index)[ Packagist](https://packagist.org/packages/soandso/continental-index)[ RSS](/packages/soandso-continental-index/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (5)Versions (8)Used By (0)

[![License](https://camo.githubusercontent.com/6c0f7944f5f1ed07c6afc14e6a10d4c866d9eb53c1abc65f3afdba1775716f7d/687474703a2f2f706f7365722e707567782e6f72672f736f616e64736f2f636f6e74696e656e74616c2d696e6465782f6c6963656e7365)](https://packagist.org/packages/soandso/continental-index)[![Version](https://camo.githubusercontent.com/f4ffa23ded1c1dcbdafe3beaad0ac08391feba6a310ee49547d1715ef35bc628/687474703a2f2f706f7365722e707567782e6f72672f736f616e64736f2f636f6e74696e656e74616c2d696e6465782f76657273696f6e)](https://packagist.org/packages/soandso/continental-index)[![Codacy grade](https://camo.githubusercontent.com/f01cdce20467f489ee51a1dbcfff7efa3828be52557cb3167abcdc906a3f1a00/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f67726164652f6565383831366265383737633439643961663932646331353331643936386533)](https://camo.githubusercontent.com/f01cdce20467f489ee51a1dbcfff7efa3828be52557cb3167abcdc906a3f1a00/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f67726164652f6565383831366265383737633439643961663932646331353331643936386533)[![PHP Version Require](https://camo.githubusercontent.com/b77a9e8cb1000ebb8ef63852135480bbf901e7119eab89c51b3ce85a8abadf28/687474703a2f2f706f7365722e707567782e6f72672f736f616e64736f2f636f6e74696e656e74616c2d696e6465782f726571756972652f706870)](https://packagist.org/packages/soandso/continental-index)[![GitHub top language](https://camo.githubusercontent.com/79a6a270bb0b3db4d93d79ed2bf4d4448494f997776d6d03857b4fadd4aea2c8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f746f702f736f616e64736f5377456e2f636f6e74696e656e74616c2d696e646578)](https://camo.githubusercontent.com/79a6a270bb0b3db4d93d79ed2bf4d4448494f997776d6d03857b4fadd4aea2c8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f746f702f736f616e64736f5377456e2f636f6e74696e656e74616c2d696e646578)[![GitHub code size in bytes](https://camo.githubusercontent.com/f1c5d04994f0355b65cb704cbafc8947132a273a76f7a744256abb9a70884841/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f736f616e64736f5377456e2f636f6e74696e656e74616c2d696e646578)](https://camo.githubusercontent.com/f1c5d04994f0355b65cb704cbafc8947132a273a76f7a744256abb9a70884841/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f736f616e64736f5377456e2f636f6e74696e656e74616c2d696e646578)[![GitHub release (latest SemVer)](https://camo.githubusercontent.com/c2d8b02c540c6c456c21d1599ee7e9790722ee29c9d3c14ca7f0b07f3e0830b7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f736f616e64736f5377456e2f636f6e74696e656e74616c2d696e646578)](https://camo.githubusercontent.com/c2d8b02c540c6c456c21d1599ee7e9790722ee29c9d3c14ca7f0b07f3e0830b7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f736f616e64736f5377456e2f636f6e74696e656e74616c2d696e646578)[![GitHub Release Date](https://camo.githubusercontent.com/4116732ee1c4ab007130eebe8439c3199f640bae04548b6aa960152f2941b004/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f736f616e64736f5377456e2f636f6e74696e656e74616c2d696e646578)](https://camo.githubusercontent.com/4116732ee1c4ab007130eebe8439c3199f640bae04548b6aa960152f2941b004/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f736f616e64736f5377456e2f636f6e74696e656e74616c2d696e646578)[![Codacy branch coverage](https://camo.githubusercontent.com/604ee86d3ccb1d495c3b57d05bacdcde71fca115fcc89c93d9324dc43066a7f0/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f636f7665726167652f65653838313662653837376334396439616639326463313533316439363865332f6d61696e)](https://camo.githubusercontent.com/604ee86d3ccb1d495c3b57d05bacdcde71fca115fcc89c93d9324dc43066a7f0/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f636f7665726167652f65653838313662653837376334396439616639326463313533316439363865332f6d61696e)

Continental index
=================

[](#continental-index)

PHP library for calculating the index of continentality - a numerical characteristic of continental climate.

[![](./images/Continental-Index.png)](./images/Continental-Index.png)

Requirements
------------

[](#requirements)

This library only requires PHP &gt;= 7.4

Setup
-----

[](#setup)

Add the library to your composer.json file in your project:

```
{
  "require": {
      "soandso/continental-index": "0.*"
  }
}
```

Use [composer](http://getcomposer.org) to install the library:

```
$ php composer.phar install
```

Composer will install synop decoder library inside your vendor folder. Then you can add the following to your .php files to use the library with Autoloading.

```
require_once(__DIR__ . '/vendor/autoload.php');
```

You can also use composer on the command line to require and install Grouping:

```
$ php composer.phar require soandso/continental-index
```

Usage
-----

[](#usage)

Instantiate the `Register` class with initialization data.

```
require_once dirname(__FILE__) . '/vendor/autoload.php';

use Soandso\ContinentalIndex\Register;

$report = new Register($inputType, $source, $inputTempUnits, $outputTempUnits, $latitude);

$inputType - Supported types of source data:
Register::FILE
Register::ARRAY
Register::JSON

$source - Input source:
1. File (Show file path)
Source data structure:
Year, space, temperature amplitude value
Example:
2022 78.5

2. array:
[
  Year, temperature amplitude value
]
Example:
[
  [2017, 80.9],
  [2018, 70.3],
  ............
]

3. json:
This format is an array (see above) encoded into a json string

$inputTempUnits - Input temperature amplitude units:
Register::FAHRENHEIT
Register::CELSIUS

$outputTempUnits - Output temperature amplitude units:
Register::FAHRENHEIT
Register::CELSIUS

$latitude - Location latitude
```

To get the calculation of the continentality index, use the method `getIndex`

```
$index->getIndex(string $title, string $format, string $filePath = null);

$title - Type index of continentality
The following methods for calculating the continentality index are supported:

1. Hromov continentality index - Register::HROMOV_INDEX
2. Gorchinsky continentality index - Register::GORCHINSKY_INDEX
3. Conrad continentality index - Register::CONRAD_INDEX
4. Zenker continentality index - Register::ZENKER_INDEX

$format - Output format
Register::FILE
Register::ARRAY
Register::JSON

$filePath - The path to the directory for extracting the results file
```

**Plotting**

You can build a line graph of continentality index versus time for a given location. To do this, you need to use the `plot()` method of the `Register` class, passing it the calculated data that were obtained using `getIndex` (see above)

`php Register::plot($indexAssets)`

The `plot` method also takes as its second optional argument options for plotting.

`php Register::plot($indexAssets, $options)`

```
$options = [
/** Show or hide the range selector widget (Only for Dygraph provider) **/
'showRangeSelector'      => null, //true or false
/** Height, in pixels, of the range selector widget (Only for Dygraph provider) **/
'rangeSelectorHeight'    => null, //int
/** Width, in pixels, of the chart **/
'width'                  => null, //int
/** Height, in pixels, of the chart **/
'height'                 => null, //int
'title'                  => 'Continental index',
/** Text to display to the left of the chart's y-axis **/
'ylabel'                 => 'Index', //string
/** Text to display below the chart's x-axis **/
'xlabel'                 => 'Date', //string
];
```

**Example usage**

Index calculation

```
$index = new Register(Register::FILE, __DIR__ . '/amplitude.txt', Register::FAHRENHEIT, Register::CELSIUS, 45.5);
$indexAssets = $index->getIndex(Register::HROMOV_INDEX, Register::FILE, __DIR__);
```

Plotting

```
Register::plot($indexAssets);
```

Specifying Custom Graph Options

```
Register::plot($indexAssets, [
        'showRangeSelector' => true,
        'rangeSelectorHeight' => 30,
        'title' => 'Hromov Index',
]);
```

Credits
-------

[](#credits)

Dygraphs - open source JavaScript charting library. ()

Standards
---------

[](#standards)

Continental index conforms to the following standards:

- PSR-2 - Basic coding standard ()
- PSR-4 - Autoloader ()
- PSR-12 - Extended coding style guide ()

License
-------

[](#license)

Grouping is licensed under the GPLv2 License ().

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

6

Last Release

1539d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/585980?v=4)[soandso](/maintainers/soandso)[@soandso](https://github.com/soandso)

---

Top Contributors

[![soandsoSwEn](https://avatars.githubusercontent.com/u/18630322?v=4)](https://github.com/soandsoSwEn "soandsoSwEn (54 commits)")

---

Tags

weatherclimatemeteorologyclimate changeclimatologycontinental index

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/soandso-continental-index/health.svg)

```
[![Health](https://phpackages.com/badges/soandso-continental-index/health.svg)](https://phpackages.com/packages/soandso-continental-index)
```

###  Alternatives

[amwhalen/noaa

Client library for NOAA's forecast and current weather services

301.5k](/packages/amwhalen-noaa)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
