Socket
Book a DemoInstallSign in
Socket

celebs

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

celebs

Package built to access the Pantheon Fame 1.0 database.

latest
Source
npmnpm
Version
0.1.18
Version published
Maintainers
1
Created
Source

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.

Keywords

Celebrity

FAQs

Package last updated on 25 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts