Skip to content

Commit

Permalink
remove eachplit because julia 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
lrnv committed Apr 1, 2024
1 parent 69f3bac commit c71486c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data/process_the_zip_file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ death_rates = Dict{String, DataFrames.DataFrame}()
countries = Dict{String,String}()
for file in readdir(joinpath(@__DIR__,"death_rates", "Mx_1x1"))
path = joinpath(@__DIR__,"death_rates", "Mx_1x1",file)
country_code = first(eachsplit(file,"."))
country_name = first(eachsplit(readline(path),", Death rates"))
country_code = first(split(file,"."))
country_name = first(split(readline(path),", Death rates"))
df = read_HMD(path,verbose=true)
push!(death_rates,country_code => df)
push!(countries,country_code => country_name)
Expand Down
2 changes: 1 addition & 1 deletion src/RateTables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const RT_HMD = let

for file in readdir(joinpath(@__DIR__,"..","data","qx"))

country_code, country_name = String.(collect(eachsplit(file,"."))[1:2])
country_code, country_name = String.(split(file,".")[1:2])
df = CSV.read(joinpath(@__DIR__,"..","data","qx",file), DataFrames.DataFrame)

# Transform:
Expand Down

0 comments on commit c71486c

Please sign in to comment.