Plan the business data transformation
The sales data system expects to receive the traffic data in a specific format and conform to specific rules. This is the example specification given to you by the sales system API team:
The specification from the sales system API team reads:
"The data should contain the following:"
- The three-letter country code (string).
- The year (integer).
- The average rate (float).
"We are only interested in the latest available data for each country, where:"
- The data concerns both females and males.
- The rate is the average rate.
- The average rate is below
5.0
.
You take a look at the first item in the raw JSON data you downloaded from the traffic data API:
- The
SpatialDim
attribute seems to contain the three-letter country code. - The
Dim1
attribute seems to indicate the gender (in this case, probably female). - The
NumericValue
attribute seems to be the average rate based on theLow
andHigh
attributes.
Diving deeper into the raw data, you figure out that "Dim1": "BTSX"
indicates "both sexes" (female and male).
Ok. You need to filter the raw data to contain only the entries that match the requirements (the latest available average rate below 5.0
for each country concerning both females and males).
In addition, you need to transform the data to conform to the format expected by the sales system API.
No worries - Robocorp supports all this data wrangling! Supports meaning you can use the handy RPA Framework libraries, any Python libraries (such as numpy), or write your own solution. No restrictions. Use whatever makes sense to you!