queryverse / queryverse/ReadStat.jl
Allow either DataValues or Missings for representing missing data
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 79
- Forks
- 18
- Avg merge
- 22h 31m
- Merged PRs (30d)
- 3
Description
@davidanthoff I wanted to run this by you before preparing a PR.
I think it should be possible to represent missing data values in the result using either the DataValues package or the Missings package. Suppose that all the read_* functions had an optional Bool argument to control this choice with its value being stored in the ReadStatDataFrame. The handle_variable! function then ends with
push!(ds.data, ds.useMissings ? fill(Union{jtype, Missing}(missing), ds.rows) : DataValueVector{ds.rows))
I think the only additional changes would be to use
dest::Union{DataValueVector{T}, Vector{Union{Missing,T}}}
in the signature of the readfield! methods and to add the Missings package.
Shall I prepare a PR for your consideration?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the read_* functions, ReadStatDataFrame, handle_variable!, and the readfield! methods to understand how missing values are currently represented. Check how the Missings package would fit alongside DataValues and update the affected signatures and dependency. Done means callers can choose either representation and both forms work through the read path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100