Skip to content

Commit

Permalink
New release (#14)
Browse files Browse the repository at this point in the history
* ignore

* update
  • Loading branch information
greimel authored Mar 4, 2022
1 parent 3542d18 commit b18b2a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
test/Manifest.toml

docs/Manifest.toml

.DS_Store
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DINA"
uuid = "2e9d5fb1-712f-4dff-9379-c18f12b3746d"
authors = ["Fabian Greimel <fabgrei@gmail.com> and contributors"]
version = "0.1.2"
version = "0.1.3"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand All @@ -16,10 +16,10 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
TableOperations = "ab02a1b2-a7df-11e8-156e-fb1833f50b87"

[compat]
CategoricalArrays = "0.9"
CategoricalArrays = "0.10"
Chain = "0.4"
DataDeps = "0.7"
DataFrames = "0.22"
DataFrames = "1"
ReadableRegex = "0.3"
StatFiles = "0.8"
StatsBase = "0.33"
Expand Down
5 changes: 3 additions & 2 deletions src/DINA.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ using DataDeps: register, DataDep, @datadep_str, unpack
using DataFrames: DataFrames, DataFrame, disallowmissing!,
groupby, combine, transform!, ByRow
using LinearAlgebra: dot
#using ProgressMeter: @showprogress
using ReadableRegex: look_for, one_or_more, DIGIT
using StatFiles: StatFiles, load
using StatsBase: wquantile
using StatsBase: quantile, weights
using TableOperations
using Statistics: mean

Expand Down Expand Up @@ -85,7 +86,7 @@ function aggregate_quantiles(var, byvar, ngroups, year; wgt, by_taxunit)
q = 0:1/ngroups:1

# Cut byvar into groups (e.g. income into deciles)
groups = cut(df[!,byvar], wquantile(df[!,byvar], df[!,wgt], q), extend=true, labels = format)
groups = cut(df[!,byvar], quantile(df[!,byvar], weights(df[!,wgt]), q), extend=true, labels = format)
df.group_id = parse.(Int, string.(groups))

# Aggregate by group
Expand Down

2 comments on commit b18b2a2

@greimel
Copy link
Owner Author

@greimel greimel commented on b18b2a2 Mar 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/55979

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.3 -m "<description of version>" b18b2a23544f1a7ec8c5af59cc1fbee006cdfd55
git push origin v0.1.3

Please sign in to comment.