JohnFTitor / histogram

This application allows users to generate histograms based on user input or a text file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Histogram App

This is a simple Histogram application that allows users to generate grahp bars based on the count of words of either a text file or a text area

Screenshot

App screenshot

Requirements

In order to work on this project, you need to have the following dependencies installed:

Built With

  • Languages: Ruby
  • Frameworks: Ruby On Rails
  • Technologies used: Visual Studio Code

Getting Started

Clone this repository

$ git clone git@github.com:JohnFTitor/histogram.git
$ cd histogram

Commands to run

Run

$ bundle install 

To get all the gems required for the project

Then, run

$ npm install 

To install packages such esbuild and chartkirt

To check linters locally, use

$ rubocop .

Once you have the project correctly set up, run

$ bin/rails db:create

To generate the database for this project and work without any issue. Please review the requirements listed above

Important note: Since this project uses SCSS for the styling, you need to run:

$ ./bin/dev

For you to see the styling being applied in the browser during development

It's really important to check the console where you run bin/dev, since it is there where the values of the cycles will be printed

If you have any issue setting up this project, don't hesitate to contact me with any link below

Next Steps

  • Optimizing the counting algorithm. There must be a better way to count the words and sort them on the go, without demanding too much time complexity
  • Add exception handling with direct user feedback. The app can be easily broken if you submit a file that is not of type .txt or no file at all, which is not suitable. Providing error handling and flash messages can do so the users have a better experience
  • Create a better chart. Due to the nature of the external gem, there are some issues when the input file has many unique words, since its size is not responsive at all. Creating a chart by hand could provide more flexibility on this end

Authors

👤 Andrés Felipe Arroyave Naranjo

Platform Badge
PortFolio JohnFTitor
GitHub @JohnFTitor
Twitter @johnftitor
LinkedIn Andres

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

About

This application allows users to generate histograms based on user input or a text file


Languages

Language:Ruby 75.3%Language:HTML 18.1%Language:SCSS 5.0%Language:JavaScript 1.3%Language:Shell 0.4%