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

Update EPA-EIA crosswalk to use 2021 data #1

Merged
merged 5 commits into from
May 5, 2023
Merged

Conversation

e-belfer
Copy link
Member

@e-belfer e-belfer commented Apr 24, 2023

WIP: Update to use 2021 data. See issue here.

Still to do:

  • Configure fork to sync w/ upstream repo automatically
  • Add documentation to repo readme
  • Set up basic pre-commit configurations for branch?

@e-belfer
Copy link
Member Author

e-belfer commented Apr 25, 2023

Right now the existing code is tripped up by an error in the encoding of the CAMD data, with one character improperly converted to UTF-8. Running:

response <-
  GET(str_glue(
    "https://api.epa.gov/FACT/1.0/facilities?api_key={api_key}"
  ))

results in the error: Error in substring(u, so, so + ml - 1L) : invalid multibyte string, element 1
I fix this by using another library to read in the json, which also requires slight retooling of the transform of this data

@e-belfer e-belfer changed the title WIP update to 2021 data Update CAMD EIA crosswalk to use 2021 data Apr 25, 2023
@e-belfer e-belfer changed the title Update CAMD EIA crosswalk to use 2021 data Update EPA-EIA crosswalk to use 2021 data Apr 26, 2023
@e-belfer e-belfer requested a review from zschira April 26, 2023 15:06
Copy link
Member

@zschira zschira left a comment

Choose a reason for hiding this comment

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

Looks good to me! I'm going to go ahead and merge this so I can get it all archived. Also, I don't think we need to worry about pre-commit hooks at this point. If we end up doing more active development here it might be nice, but I think it's fine for now

@zschira zschira merged commit be8aff7 into main May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants