Skip to content

Commit

Permalink
Merge pull request #49 from cicirello/rename-keys
Browse files Browse the repository at this point in the history
Renamed keys used to customize included bibliometrics and ordering
  • Loading branch information
cicirello authored Nov 3, 2023
2 parents 3f29a8e + 260c989 commit 5931e97
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 110 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased] - 2023-10-28
## [Unreleased] - 2023-11-03

**BREAKING CHANGES**: Next release will be 3.0.0 due to breaking changes.

### Added
* Calculation of R-index
* Calculation of A-index

### Changed
* Renamed the keys for customizing which bibliometrics to include and in what order. This is a breaking change only if you are customizing.

### Deprecated

Expand Down
46 changes: 32 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,31 @@ Here are a couple sample SVGs.

![Example 2](https://raw.githubusercontent.com/cicirello/bibliometrics/main/images/bibliometrics2.svg)

In the above examples, A-index and R-index are deliberately in uppercase,
while the others use a lowercase letter (e.g., h-index). This is for
consistency with how each bibliometric was originally named by its creators.

Here is a sample of the JSON summary also generated by the utility:

```JSON
{
"A": "71.56",
"R": "42.30",
"e": "34.12",
"fiveYear": 364,
"g": 44,
"h": 25,
"i10": 33,
"i100": 3,
"most": 228,
"total": 2052
"a-index": "71.56",
"e-index": "34.12",
"five-year-cites": 364,
"g-index": 44,
"h-index": 25,
"i10-index": 33,
"i100-index": 3,
"most-cited": 228,
"r-index": "42.30",
"total-cites": 2052
}
```

The keys in this JSON are all lowercased, and correspond to the keys expected if you
customize the order in your configuration file. However, in your configuration file
they are case-insensitive. See the next section for how to configure.

The above sample is also found in this
repository: [bibliometrics.json](https://github.com/cicirello/bibliometrics/blob/main/bibliometrics.json),
and the sample SVGs are found in the [images](https://github.com/cicirello/bibliometrics/blob/main/images) directory.
Expand All @@ -85,9 +93,10 @@ via the `"jsonOutputFile"` field. If this field is not present, then no JSON fil
To change the order that the bibliometrics appear in the SVG, or to explicitly exclude one or more
bibliometrics, you can use the `"include"` field. This field is an array of keys associated with the
various bibliometrics. If this field is not present, then the following default order is
used: `[ "total", "fiveYear", "most", "h", "g", "i10", "i100", "i1000", "i10000", "e", "R", "A" ]`. There is no
used: `[ "total-cites", "five-year-cites", "most-cited", "h-index", "g-index", "i10-index", "i100-index", "i1000-index", "i10000-index", "e-index", "r-index", "a-index" ]`. There is no
reason to use this field if the only thing you want to do is to exclude bibliometrics that have the
value 0. Such bibliometrics will be excluded by default.
value 0. Such bibliometrics will be excluded by default. The list of keys for the bibliometrics to
include is case-insensitive.

The `"svgConfig"` field is an array of JSON objects, such that each object configures one SVG. Each
of the JSON objects in this array includes the following fields:
Expand Down Expand Up @@ -135,7 +144,16 @@ the g-index, e-index, R-index, and A-index:
```JSON
{
"jsonOutputFile": "bibliometrics.json",
"include": ["total", "fiveYear", "most", "h", "g", "e", "R", "A"],
"include": [
"total-cites",
"five-year-cites",
"most-cited",
"h-index",
"g-index",
"e-index",
"r-index",
"a-index"
],
"svgConfig": [
{
"background": "#010409",
Expand All @@ -150,7 +168,7 @@ the g-index, e-index, R-index, and A-index:
"filename": "images/bibliometrics2.svg",
"text": "#c9d1d9",
"title": "#58a6ff",
"include": ["total", "fiveYear", "most", "h"]
"include": ["total-cites", "five-year-cites", "most-cited", "h-index"]
},
{
"background": "#f6f8fa",
Expand Down
20 changes: 10 additions & 10 deletions bibliometrics.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"A": "71.56",
"R": "42.30",
"e": "34.12",
"fiveYear": 364,
"g": 44,
"h": 25,
"i10": 33,
"i100": 3,
"most": 228,
"total": 2052
"a-index": "71.56",
"e-index": "34.12",
"five-year-cites": 364,
"g-index": 44,
"h-index": 25,
"i10-index": 33,
"i100-index": 3,
"most-cited": 228,
"r-index": "42.30",
"total-cites": 2052
}
2 changes: 1 addition & 1 deletion images/bibliometrics.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion images/bibliometrics2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5931e97

Please sign in to comment.