celebs

0.1.18 • Public • Published

Celebs

Package built to provide acces to the Pantheon Fame 1.0 database. The database has a selection of roughly 12,000 notable individuals from all areas of public life.

let celeb = celebs("views","all");

celeb.map((elem) => console.log(elem)); // 11241 items
  // [{ en_curid: '307',
  // name: 'Abraham Lincoln',
  // numlangs: '131',
  // birthcity: 'Hodgenville', ...

Installing

npm install celebs

Citation

Built on the Pantheon 1.0, Verified Dataset of Globally Famous Biographies https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/28201

Main Example

Setup.

// First parameter must be views or no-views
// views are access data for how many times the artists were searche for
let celeb1 = celebs("views","all");
let celeb2 = celebs("no-views", "all");

// The second parameter must be a string for the data set you want to load
// all loads all the data columns
let celeb3 = celebs("views","all");

// If a specific data column is passed in it will attempt to load that instead
let celeb4 = celebs("views","all");

celeb4.map((elem) => console.log(elem)); // 11241 items

API

Celebs

Main class, constructor takes valid file path parameters and returns an object.

Init

// First parameter must be views or no-views
// views are access data for how many times the artists were searched for
let celeb1 = celebs("views","all");
let celeb2 = celebs("no-views", "all");

// The second parameter must be the property of the data set you want to load
// all loads all the data columns
let celeb3 = celebs("views","all");

// If a specific data column is passed in it will attempt to load that instead
let celeb4 = celebs("views","all");

Using Data

To use data, call celebs with the appropriate parameters, returns an object.

// Calling celebs returns object of data
let celeb = celebs("views","all");

// You can process the array of data
celeb.map((elem) => console.log(elem)); // 11241 items

Scripts

Testing

To run mocha/chai tests. npm run test

Process Data

Reprocess the original csv file. npm run process

Examples

To run the main example. npm run ex

To run all examples. npm run exAll

License

Celebs.js is released under the MIT license.

Package Sidebar

Install

npm i celebs

Weekly Downloads

1

Version

0.1.18

License

MIT

Unpacked Size

34.1 MB

Total Files

58

Last publish

Collaborators

  • almtechhub