Introduction
The following assignment would let you build a custom API endpoint that would retrieve TItanic CSV data from a URL convert it to JSON and visualize it on request. The API endpoint would be protected by a static API key passed as a header to your request.
Titanic Columns
|
Column Name |
Description |
Data Type |
Example |
|---|---|---|---|
|
PassengerId |
ID of the passenger |
integer |
integer |
|
Survived |
Whether the passenger has survived or not |
integer |
0 = No, 1 = Yes |
|
Pclass |
Ticket class |
integer |
1 = 1st, 2 = 2nd, 3 = 3rd |
|
Name |
Name of the passenger |
string |
Moran, Mr. James |
|
Sex |
Sex of the passenger |
string |
female/male |
|
Age |
Age in years |
integer |
35 |
|
SibSp |
Number of siblings / spouses aboard the Titanic |
integer |
2 |
|
Parch |
Number of parents / children aboard the Titanic |
integer |
1 |
|
Ticket |
Ticket number |
string |
A/5 21171 |
|
Fare |
Passenger fare |
float |
51.8625 |
|
Cabin |
Cabin number |
string |
C85 |
|
Embarked |
Port of Embarkation |
string |
C = Cherbourg, Q = Queenstown, S = Southampton |
Please note that not all records are complete and some are missing data for some of the columns.
Assignments
The assignment section is divided into two parts:
-
Simple Assignments - These require relatively low effort.
-
Advanced Assignments - These demand a higher level of effort for completion and are optional.
For each assignment, there is an Example Output section that provides an example of how the data should be formatted and returned to the API client requesting it.
Simple Assignments
Advanced Assignments