Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p.csv issue update #26

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

p.csv issue update #26

wants to merge 4 commits into from

Conversation

bcakire
Copy link
Contributor

@bcakire bcakire commented Nov 21, 2024

No description provided.

Comment on lines 139 to 156
county_id_mapping_path = joinpath(input_filename, "county_id_mapping.csv")

if isfile(county_id_mapping_path)
county_id_mapping = CSV.read(county_id_mapping_path, DataFrame)


county_id_mapping.County_FIPS = map(x -> lpad(string(x), 5, '0'), county_id_mapping.County_FIPS)
county_id_mapping.BA = map(x -> "p$x", county_id_mapping.PCA_ID)

prefix = "Res"
county_id_mapping[!, :index_h] = string.(prefix, "_", county_id_mapping.County_FIPS)

county_id_mapping[!, :index_z] = county_id_mapping.BA

county_to_ba = Dict(county_id_mapping.County_FIPS .=> county_id_mapping.BA)
else
error("county_id_mapping.csv not found at $county_id_mapping_path")
end
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't need project-specific code in common.jl.

@@ -171,6 +193,7 @@ function HEMData(input_filename::String; epsilon::AbstractFloat = 1.0E-3)
index_z,
index_sector,
h_to_sector,
county_to_ba,
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, "county" is too project-specific. Perhaps what's needed is for an "index_h_z_mapping.csv" to be made in HEMData.jl similar to "index_h_sector_mapping.csv"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants