joeroe / joeroe/rintchron

More robust parsing of responses

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
R
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The parsing functions (intchron_extract() and intchron_tabulate()) currently just extract specific elements from the listified JSON response based on what other functions needed. Specifically, they assume the important data is contained in a "records" array. But according to the schema (http://intchron.org/schema) and in implementing #5 and #6 I encountered other data structures.

Rather than continuing to pile kludges into intchron_extract(), we should have a generalised R representation of the response data. Probably with a dedicated S3 class as suggested by https://cran.r-project.org/web/packages/httr/vignettes/api-packages.html.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading intchron_extract() and intchron_tabulate(), then compare their assumptions with the response structures described by the IntChron schema. Review the linked httr API-packages guidance and the context from issues #5 and #6. Done means the response has a generalized R representation that supports structures beyond the records array.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.