Implement ETL pipeline for OpenAlex data standardization#7
Open
hadimobini00-ship-it wants to merge 1 commit into
Open
Implement ETL pipeline for OpenAlex data standardization#7hadimobini00-ship-it wants to merge 1 commit into
hadimobini00-ship-it wants to merge 1 commit into
Conversation
Add ETL pipeline for OpenAlex -> WoS standardization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Project Report: ETL Pipeline for Bibliometrix-Python
Student: [Your Name]
Course: Hardware & Software (2nd Semester)
Date: May 2026
1. Architectural Approach
I implemented a modular ETL pipeline (Extract → Transform → Load) with clear separation of concerns:
api_retriever.py– extracts raw data from the OpenAlex REST API.dispatcher.py– orchestrates extraction of nested fields (authors, affiliations, keywords, concepts, cited references, source, abstract) using a mapping dictionary.mapping.py– defines the mapping from OpenAlex source fields to standard Web of Science (WoS) tags.validator.py– enforces data types, converts multi‑value fields to Python lists, replaces NaNs, and computes the Short Reference (SR).main.py– single entry point to run the pipeline.test_functions.py– validates that the standardized CSV works with the bibliometrix‑python analytical functions.This design makes the system maintainable (update one module without breaking others) and scalable (add new data sources by extending the mapping dictionary).
2. Mapping Strategy
The
mapping.pydictionary maps OpenAlex fields to WoS tags. For nested fields (e.g.,primary_location.source.display_name→SO), the dispatcher contains custom extraction functions that safely traverse the JSON‑like structures.3. Type Enforcement & Validation
validator.pyensures:TC(times cited) andPY(publication year) are integers (NaNs become 0).AU,C1,CR,DE,ID) are stored as Python lists.SRis calculated following the logic of the originalformat_sr_columnfunction from the library.4. Patching Example
The original
get_relevantauthors.pyfailed due to aNaNinmax_x. I added a guard clause:5. Evidence
All assigned analytical functions run without errors on the standardized CSV.
Test output:
The Jupyter notebook (
Bibliometrix_ETL_Documentation.ipynb) contains the full code, output, and explanations.6. Conclusion
The implemented ETL pipeline meets both the Base Level (API extraction) and Advanced Level (full standardization) requirements of the exam. It produces a clean, WoS‑compliant CSV that passes all tested bibliometrix‑python functions without crashes.