0% found this document useful (0 votes)
17 views3 pages

COVID-19 Dashboard React Assignment

The assignment requires the creation of a COVID-19 dashboard using React.js that visualizes data through interactive charts, focusing on total cases, recoveries, and deaths. It involves integrating two RESTful APIs for fetching historical COVID-19 data and a list of countries, along with implementing various React components, ensuring responsiveness, and maintaining code quality. Deliverables include a public GitHub repository and optional live demo, with evaluation based on adherence to requirements and performance.

Uploaded by

pathansuhail810
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views3 pages

COVID-19 Dashboard React Assignment

The assignment requires the creation of a COVID-19 dashboard using React.js that visualizes data through interactive charts, focusing on total cases, recoveries, and deaths. It involves integrating two RESTful APIs for fetching historical COVID-19 data and a list of countries, along with implementing various React components, ensuring responsiveness, and maintaining code quality. Deliverables include a public GitHub repository and optional live demo, with evaluation based on adherence to requirements and performance.

Uploaded by

pathansuhail810
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Frontend React JS Developer Assignment`

Objective
Create a COVID-19 dashboard using [Link], which visualizes statistical data through
interactive charts and conveys pandemic statistics, including total cases, recoveries,
and deaths as per the provided Mockup.

Requirements

API Integration
You will be integrating two RESTful APIs to fetch necessary data for the dashboard.

​ COVID-19 Historical Data:


●​ Fetch historical COVID-19 data for a default country (USA) and allow the
user to select different countries from a dropdown menu.
●​ Use the following cURL request to understand the API endpoint:
●​ Method: GET
●​ Endpoint:
[Link]
ays=1500
●​ Replace {country} with the chosen country from the dropdown.
Make sure to send the ISO code of the country. Example: usa
●​ The lastdays=1100 parameter is hardcoded to fetch data for the
last 1500 days.
●​ The response will be in JSON format containing the historical case
data.
​ Country Options for Dropdown:
●​ To populate the dropdown with country options, integrate a REST API that
provides a list of countries.
●​ Suggested API endpoint:
●​ Endpoint: GET [Link]
●​ This endpoint does not require any parameters.
●​ It will return a list of countries along with various details, from
which you can extract the country names and codes for the
dropdown.

Other Requirements
●​ Implement React components such as statistical cards, line chart, and pie chart.
●​ Ensure application state is managed effectively using React's state management
features.
●​ The dashboard must be responsive and work on a variety of screen sizes.
●​ Apply error handling for all API requests.
●​ Write clean, modular, and well-commented code.
●​ Style the application to match the provided mockup as closely as possible.
●​ Use Git for version control and include a [Link] with project setup
instructions.

Deliverables
●​ A public GitHub repository with all source code.
●​ A live demo is optional but encouraged.
Evaluation Criteria
●​ Adherence to the provided mockup and functionality.
●​ Code quality and organization.
●​ Responsiveness and usability across devices.
●​ Performance and efficiency of the application.

Common questions

Powered by AI

Developers should style the COVID-19 dashboard to closely match the provided mockup, which includes implementing visual elements such as statistical cards, line charts, and pie charts to display COVID-19 data interactively. Clean and intuitive design principles, consistent use of colors, fonts, and spacing should be followed. Ensuring the overall aesthetic reflects the mockup will likely involve detailed CSS work or using UI libraries that provide pre-designed components fitting the application's theme .

The document recommends integrating a REST API to fetch the list of countries to populate the dropdown menu. The suggested endpoint for this purpose is 'https://restcountries.com/v3.1/all', which does not require any parameters. It returns a list of countries with various details, from which the country names and codes can be extracted for the dropdown. This allows users to select a country for which they wish to view the COVID-19 data .

The document recommends using a RESTful API to fetch historical COVID-19 data for countries. Specifically, it suggests sending a GET request to the endpoint: 'https://disease.sh/v3/covid-19/historical/{country}?lastdays=1500', where '{country}' should be replaced with the selected country's ISO code from a dropdown menu. The data for the last 1500 days is hardcoded. The response is expected to be in JSON format, containing the historical case data. Developers need to ensure proper country selection through the dropdown for accurate API requests .

The document proposes that the setup and documentation for delivering the React.js COVID-19 dashboard include a README.md file that provides project setup instructions. This is significant as it ensures clarity in the installation and configuration process, making the project accessible to collaborators and end-users. Comprehensive documentation fosters ease of use, guiding through dependencies, build instructions, running the application, and additional notes like API configurations. It also serves as a reference point for future maintenance or for onboarding new developers to the project .

Version control is a critical component in the development process of the React.js COVID-19 dashboard, as it facilitates collaboration, tracks changes, and enables rollback if needed. Using Git for version control, as recommended, allows developers to manage code iterations, implement features in isolated branches, and merge contributions systematically. It enhances code security and integrity and provides a historical record of project evolution, which aids in troubleshooting and auditability. Moreover, it supports the creation of a public GitHub repository, which can be useful for peer reviews and deployment .

The primary objective is to create a COVID-19 dashboard using React.js that visualizes statistical data through interactive charts and conveys pandemic statistics, such as total cases, recoveries, and deaths. The requirements include integrating two RESTful APIs to fetch COVID-19 historical data and populate a country selection dropdown, implementing React components like statistical cards and charts, ensuring effective state management, responsiveness, and error handling, and styling the application to match the provided mockup. The dashboard should be managed with Git and include appropriate documentation .

The document stresses code quality and organization as key evaluation criteria, emphasizing the need for clean, modular, and well-commented code. Developers should ensure that their codebase is well-structured, making use of React components to encapsulate related functionality and applying best practices in code readability and maintenance. Each function or module should have clear documentation comments, facilitating easier collaboration and future updates. Effective use of version control with Git, implementation of state management practices, and maintaining code efficiency for performance are critical to achieving high code quality .

The document highlights the need for effective error handling for all API requests in the React.js COVID-19 dashboard application. This involves anticipating and managing potential issues such as failed network requests, invalid responses, or data fetch errors. Developers should implement try-catch blocks or equivalent error handling mechanisms, display user-friendly error messages or fallback content, and ensure that the application does not crash under unexpected conditions. Logging errors for debugging purposes and providing feedback to the user to retry actions are also recommended practices .

State management is crucial in the React.js COVID-19 dashboard to ensure dynamic updating and rendering of data as users interact with the application, such as selecting different countries from the dropdown. The developers should leverage React's state management capabilities, possibly employing tools like Redux for complex state logic. This involves defining state variables to store fetched data, selected country, and other interactive elements. Consistent synchronization between UI components and the state for data accuracy, alongside ensuring state updates trigger necessary re-renders, is essential for responsiveness and user experience .

The document advises ensuring the COVID-19 dashboard is responsive by designing it to work effectively across different screen sizes and devices. This likely involves employing CSS frameworks like Bootstrap or using media queries for custom CSS styling, as well as ensuring that UI components and charts adapt fluidly to screen changes. Additionally, ensuring accessibility aspects are met, like appropriate color contrasts and screen reader support, could further enhance usability across devices .

You might also like