npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

carvis

v1.0.17

Published

a csv making machine

Downloads

8

Readme

Carvis

a maker of CSV files

Carvis is a command-line-tool that can make massive amounts of realistic, fake data as CSV files. These files map effortlessly to Mixpanel events, or user profiles.

The primarily motivation for this utility is to feed reverse-ETLs (like Census or Hightouch) which demonstrate how tabular data can be mapped to event (or people) data. 🥳

Carvis can also make dimension tables for use in Mixpanel.

usage

you don't need to install carvis to use it. assuming you have node.js installed (v14 or greater) you can simply run:

npx carvis

and watch carvis generate some test data.

you can specify custom data with options:

npx carvis --[option] [value]

for example, if we wanted 50 rows of data, we can run

npx carvis --rows 50

To see a list of examples, run:

npx carvis --help

see examples and API for more info

examples

  • generate some fake data as a CSV file
npx carvis
  • generate some fake data as a JSON file
npx carvis --json
  • generate some fake data in the mixpanel format
npx carvis --mixpanel
  • generate 10,000 rows of event data
npx carvis --rows 10000
  • generate 10,000 rows of event data over the last 90 days
npx carvis --rows 10000 --days 90
  • generate event data with column eventName with values appOpen, appInstall, or pageView and column userType with values free, trial, or paid:
npx carvis --cols eventName:appOpen,appInstall,pageView userType:free,trial,paid
  • generate people data with column npsScore with values 1-10 but mostly 6's:
npx carvis --people --cols npsScore:1,2,3,4,5,6,6,6,7,8,9,10
  • generate TWO CSV files with the same users; one with event data where eventName has values appOpen, appInstall, or pageView and one with people data where column Satisfaction Score has values 1-5.

guid values will match across both files (note the seed used for both is the same)

npx carvis --cols eventName:appOpen,appInstall,pageView --seed "are you satisfied?"
npx carvis --people --cols "Satisfaction Score":1,2,3,4,5 --seed "are you satisfied?"
  • generate a dimension table with 500 rows with a column hashtag with values foo, bar, and baz:
npx carvis --rows 500 --dimTable --cols hashTag:foo,bar,baz

API

Carvis lets you control the data that gets built in the CSV file. The general usage is:

npm run carvis --{{option}} {{value}}

here are the available options; all are optional and can be used in any order:

| option | Alias | Purpose | | ------ | ------ | ------ |
| --cols |-c | define the columns AND values for your CSV file. the format is columnName:value1,value2,value3 ... you can use this to create multiple columns | | --rows | -r | the number of rows/records to generate (default: 1000) | | --days | -d | the number of days (since today) to consider (default: 5) | | --seed | -s | any alphanumeric phrase which controls how distinct_id is generated; use the same seed to get the same users across multiple files |--people| -p| generate people profiles (including $name, $email, $avatar, etc...)| |--dimTable| -t| generate a dimension table (with unit_id as an integer for the first column)| |--json| -j| generate NDJSON format instead of CSV| |--mixpanel| -m| generate mixpanel data in NDJSON format | |--silent| -s| don't log stuff; pass filename to stdout |

note: the dimTable and people options are mutually exclusive. the mixpanel and json options are also mutually exclusive.

see examples for some recipes

why?

because sometimes you need real fake data.