Giter VIP home page Giter VIP logo

fixie's Introduction

DEPRECATION NOTE

This program has been deprecated in favor of Fixie3, the main improvement being that Fixie3 doesn't require Java as a dependency and runs fully native Python. Find it at projects/fixie3.

FIXIE - 1099 Data Extraction

This script processes a 1099 form in .pdf format, extracting data from the 1099-DIV and 1099-B sections on the Summary Information page. It also extracts data from the Detail for Dividends and Distributions pages, grouping and summing by ticker symbol. The output is a set of .csv files:

  • summary.csv. Extracts the 1099-DIV section from Summary Information page.
  • income.csv. Displays data from the Detail for Dividends and Distributions pages. Groups and sums rows by ticker symbol, with these columns:
    • Nonqualified dividends
    • Qualified dividends
    • Short term capital gains
    • Long term capital gains
    • Section 199A dividends
    • Foreign taxes paid
    • Tax exempt income
  • broker_transactions.csv. Extracts data from the 1099-B section of the Summary Information page ("Summary of Proceeds, Gains & Losses"), parsed into these columns:
    • Short term gain/loss
    • Long term gain/loss
    • Undetermined total
    • Grand total
  • result.xmls is a single file combining the data described above into three worksheets.

Processes

The script takes a PDF file, extracts specific sections into ./input, then processes the data using PyPDF2 and tabula-py. After processing, it deletes the copies in ./input, leaving the original file untouched, and stores output files into ./output. This tool is a complement to a tax calculator spreadsheet.

Usage

  1. Python and Java are required dependencies for this program.
  2. Activate the virtual environment: source venv/bin/activate.
  3. Install dependencies: pip3 install -r requirements.txt.
  4. Create two empty folders in the main directory: ./input and ./output.
  5. Place a 1099 file (in .pdf format) into the ./input folder.
  6. Go to app.py and change this line: summary_table = summary('./input/summary.pdf', '2023') for your desired year instead of "2023". Do the same in local.py. (Promise to fix this some day).
  7. Run the program: python3 local.py.
  8. Find the result files in the ./output folder.

Use as a Quick Action for Mac

To use this program as a Quick Action on a Mac:

  • Create an Automator Quick Action that points to ./driver.sh (an example script and guide is provided in ./automator.sh).
  • Add your Quick Action to Finder on your Mac.
  • Right-click any file in Finder; the Quick Action you created should be displayed under 'Quick Actions' (tested on Mac OS X Sonoma 14.1.1).

Contribute

Please feel free to clone, fork, or contribute in any way you find interesting.

Related

Resources and related topics worth to investigate IMO:

fixie's People

Contributors

gmzi avatar

Stargazers

 avatar Nathanael McDaniel avatar Clayton Kehoe avatar

Watchers

 avatar  avatar

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.