Code Monkey home page Code Monkey logo

frontend-challenge's Introduction

Infratab Frontend Coding Challenge!

Getting started

  1. Participate
  2. Setup the project
  3. Complete the Challenge!

Participate

There are two ways to participate in our coding challenge -

We would like you to follow the Github flow to participate in the coding challenge if you are familiar with Git and its ecosystem. However, in case you are not familiar with Git, please feel free to download the project directory and then complete the Challenge

Cloning the repo (Use the Github flow)

  1. Clone this repository
  2. Follow the Github Flow
  3. Complete the requirements listed in the Challenge
  4. Open a pull request!

Downloading the project directory

  1. Download this project direactory as a compressed folder (frontend-challenge.zip)
  2. Complete the requirements listed in the Challenge
  3. Email the compressed folder to [email protected] or to the person with whom you have been interacting!

Setup the project

  1. Run npm install
  2. Run npm start to run server
  3. Open http://localhost:3001/ in browser, if you see Here you go! text in the browser that means server is successfully running
  4. Please find index.html in the public folder
  5. Now you can start your coding!

Challenge

Here are the list of api end points necessary for this challenge.

Your challenge is to design a web page which shows trends percent contribution in the form of pie chart as shown below: You have to write html, css for this web page. If you face any problems please contact us.

assignment-3

Features:

1. Two dropdowns for selecting countries.

Make this API call to get the list of countries to show them in dropdown.

2. Show trends

Make this API call to get the list of trends of selected country.

Interactions

You can select country either from anyone or both the dropdowns.If you select a single country,then you have to show trends for that country else if you select countries from both the dropdowns, then show common trends of those countries.

The trends have to be displayed in the bottom-lef of the page as shown in the image

3. Weight calculation
  • Calculate wieght of each trend as follows

    • Assign weights 1 - 26 to alphabets from A-Z
    • For all the special characters like #, $, -,... weight is 0
    • For all the digits, the "value" is the "weight" like for 1 its 1, for 2 its 2 and so on.
    • After assigning weights, calculate the weight of trend by adding wieghts of each character
  • Add the weight of all trends

  • Calculat percentage contribution for each trend

4. Show piechart

Display this percentage contribution of all the trends in a piechart as shown in image.on hover highlight that part of the chart.

frontend-challenge's People

Contributors

swathi8 avatar moosicalbovine avatar priyanka1110 avatar

Watchers

Gallifuoco Vincenzo 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.