Giter VIP home page Giter VIP logo

visidata-plugins's Introduction

Custom VisiData Plugins

This repository serves as a place for me to share VisiData plugins I've written.

Note: This repository has (mostly) been updated for VisiData 2.x. For plugin versions compatible with VisiData 1.5.2, see this version of the repository.

All code is released under the MIT License.

Table of Contents

  • dedupe, for deduplicating rows (VisiData v2.x)
  • normcol, for normalizing column names (VisiData v2.x)
  • fec, for loading .fec files (VisiData v1.5.2)

dedupe

This plugin adds two sheet commands to VisiData:

  • select-duplicate-rows sets the selection status in VisiData to selected for each row in the active sheet that is a duplicate of a prior row.

  • dedupe-rows pushes a new sheet in which only non-duplicate rows in the active sheet are included.

See the plugin file for usage details.

normcol

This plugin normalizes column names in any given sheet, so that the names are:

  • Composed only of lowercase letters, numbers, and underscores.

  • Valid Python identifiers. This is mostly handled by the rule above, but also prohibits names beginning with a digit; that is handled by prefixing those names with an underscore.

  • Unique within the sheet. Non-unique names are suffixed with "__" and an integer.

Unnamed columns are left as such.

For instance, a sheet with the following columns names:

  • "Genus, Species"
  • "Height"
  • "5-score"
  • "Height"
  • ""
  • ""

... would be converted to have the following column names:

  • "genus_species"
  • "height__0"
  • "_5_score"
  • "height__1"
  • ""
  • ""

This plugin adds one sheet command to VisiData:

  • normalize-col-names normalizes the names of all non-hidden columns in the active sheet, per the approach described above.

See the plugin file for additional details.

fec

This plugin adds support for loading the Federal Election Commission's .fec files. In order for it to work, you'll need to install fecfile: pip install fecfile. Demo here.

See the plugin file for additional details.

visidata-plugins's People

Contributors

jsvine avatar aborruso avatar

Stargazers

Scott Edwards avatar Rey F. Diaz avatar Joey Lee avatar Jorge Gomez avatar Maxim Uvarov avatar  avatar Maryanne Wachter avatar Alexander Sutcliffe avatar Alexander Sutcliffe avatar Nico Kokonas avatar Jim Tinsky avatar silver lee avatar  avatar Jon Baer avatar $hoot->Pairs avatar  avatar Dominik Böhler avatar Henrik avatar Periklis Papanikolaou avatar Evangelos Constantinou avatar AM avatar Mark Jones avatar Andrew avatar Mert Nuhoglu avatar Justin Marciszewski avatar Nikolaus Schlemm avatar AJ Kerrigan avatar Ettore Rizza avatar Rida Ayed avatar  avatar  avatar Caleb Dowdy avatar Cléber Zavadniak avatar Saul Pwanson avatar Aaron Williams avatar Anja Kefala avatar

Watchers

Michael Pishchagin avatar Saul Pwanson avatar  avatar James Cloos avatar Anja Kefala avatar AJ Kerrigan avatar  avatar

visidata-plugins's Issues

dedupe plugin SHA256 does not match!

Hi, I'm trying to install the plugin, I've tried this in visidata 2.4 as well as after upgrading to 2.6.1.

Apparently the 2.x version strips whitespace before hashing, and encodes to utf-8 ; too bad the docs weren't properly updated. There's now a utility in visidata/dev/vdhash.py to create a similar hash. I ran it and it generated this hash:

94cc1b0afcf7dbcbe93ca421104a2252c411448d59ba75df00ae455d3577934a

I tried setting in the open-plugins settings, and it fixed the issue. If you're happy, I can submit a PR to saulpw/visidata to correct the plugin hash there, as well as maybe some docs (if I can find them)

in VD 2.-1dev dedupe-rows doesn't work

Deduplicating rows doesn't work in the pre-release. In this case the action didn't do anything, but in other cases it multiplies the rows (I can't figure out any pattern here)
dedupe

Ctrl+E gets "no error".

vdnormcol doesn't check names for conflicts with globals

This is a feature request. The vdnormcol plugin is very useful since it fixes column names to be referenced in any Visidata command that takes a Python express. This seems like it should be built-in to Visidata.

However, it is possible for a column name to conflict with an existing global. For example a column with the name "time" would be left unchanged by vdnormcol, but would hide the time module.

Request: vdnormcol should also check columns against existing global names.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.