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

Unbundling aid update #462

Open
1 of 13 tasks
Duncan-Knox opened this issue Dec 6, 2018 · 2 comments
Open
1 of 13 tasks

Unbundling aid update #462

Duncan-Knox opened this issue Dec 6, 2018 · 2 comments

Comments

@Duncan-Knox
Copy link
Collaborator

Duncan-Knox commented Dec 6, 2018

Data series needed for unbundling aid update:

This involves update progress on tables that drive the Unbundling Aid section of the website

List of Tables (included in last year's issue)

  • oda_new
    • Submitted for Review
  • oda_constant_new
    • Submitted for Review
  • oda_constant
    • Submitted for Review
  • oda
    • Submitted for Review

Dimension series needed for production of fact.oda_constant_new:

  • Donors: dimension.oecd_donor_to_di_id_map
  • Recipients: dimension.oecd_recipient_to_di_id_map
  • Sectors: dimension.oecd_crs_sector_code_3_digit_to_itep_sector_web_id_map
  • Channels: dimension.oecd_crs_channel_code_5_digit_to_itep_channel_web_id_map

Other

Please edit issue if needed @Napho @akmiller01

@Duncan-Knox
Copy link
Collaborator Author

Added to backlog for carry over into 2019.

@Duncan-Knox Duncan-Knox mentioned this issue Jan 7, 2019
8 tasks
@akmiller01
Copy link

Once null characters are removed from raw CRS, it can be read into R without error like so:

r = readBin(txt, raw(), file.info(txt)$size)
r[r==as.raw(0)] = as.raw(0x20) ## replace with 0x20 = <space>
writeBin(r, paste0("crs_cleanup/",basename(txt)) )
tmp = fread(paste0("crs_cleanup/",basename(txt)),sep="|")

After which, LATIN1 encoding is needed to import it into SQL.

DELIMITER ‘,’ ENCODING ‘LATIN1’ CSV HEADER;
COPY 3764422

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

No branches or pull requests

2 participants