Skip to content

divakaivan/text2chart

Repository files navigation

This is text2chart - transforming natural language to charts

Hosted webapp: https://text2chart.streamlit.app/

You will need a free huggingface API key to execute queries.

There are 2 default datasets loaded in the webapp:

  1. Financial Statements of Major Companies(2009-2023) from Kaggle
  2. Boston house price data from Kaggle

How to use

  1. Input your HuggingFace API key
image
  1. Load your CSV data (optional)
image
  1. Select data to visualize (default is the financial statements data)
image
  1. Enter a query, run and get your chart
image

Experiment with different chart types

  • Vertical Bar Charts: Display the revenue, net income, and EPS of each top company for the latest fiscal year in separate vertical bar charts for easy comparison. image

  • Horizontal Bar Charts (Metric Comparison): Compare the revenue, net income, and EPS of the top companies for the latest fiscal year using horizontal bar charts. image

  • Line Charts (Trend Analysis): Plot the revenue trend over the past five years for the top companies to visualize growth or decline over time. image Show me AAPL's revenue trend over the Years image

  • Pie Charts (Composition Analysis): Group by companies in the IT category and create a pie chart showing a breakdown of each company's market share. image

  • Scatter Plots (Correlation Analysis): Explore the correlation between revenue growth and net income growth over the past five years for each top company using scatter plots. image

  • Box Plots (Distribution Analysis): Generate a box plot for each top company to show the distribution of net income in the latest year. image

Known limitations

  • right now it can read columns as either categorial (if dtype is not int/float) or numerical (int/float), so it might have problems with dates (as seen in the Line chart example above)
  • might not be able to make a more complicated chart (or may need a more specific query)