Welcome to the Hot Research Data Pipeline project! This data engineering project extracts, processes, and provides visualizations for information about published scientific papers from two APIs, CORE and arXiv. The entire pipeline is orchestrated and automated on a weekly basis using Apache Airflow.
-
Data Extraction: Utilizes APIs from CORE and arXiv to fetch the latest data on scientific papers.
-
Data Processing: Weekly automated process, orchestrated by Apache Airflow, includes filtering for English papers, removing stopwords and punctuation, and extracting n-grams from the text.
- Structured Storage: Data is stored in a Postgres database, providing a structured and efficient storage solution.
-
Jupyter Notebooks: Utilizes Jupyter Notebooks for visualization purposes, offering both standard and interactive options.
-
Interactive Visualizations: Enables live visualization of the entire database with dynamic plot parameter adjustments.
-
N-gram Analysis: Emphasizes the analysis of n-grams to identify popular keywords in scientific papers, providing insights into trending topics.
-
PySpark Integration: PySpark is further used for expedited data retrieval during the visualization process.
- Docker Containers: The project is containerized using Docker, with separate containers for Apache Airflow, the Postgres database, and the Jupyter server + PySpark.
-
CI Process: A streamlined continuous integration process is implemented through GitHub Actions.
-
Lint Checks: Ruff is used to enforce code style and best practices.
-
Unit Testing: Pytest is employed for unit testing to validate the functionality of the code.
To run the data pipeline, extract valuable insights, and explore visualizations, follow these steps:
-
Clone the Repository:
- Use
git cloneto clone the repository to your local machine.
- Use
-
Navigate to the Project Directory:
- Open a terminal and move to the project directory using
cd.
- Open a terminal and move to the project directory using
-
Set Environment Variables:
- Use the
.envfile in the project root to set the environment variables.
- Use the
-
Run the Data Pipeline:
- Execute
docker-compose upin the terminal to start the containers and run the data pipeline.
- Execute
-
Access Apache Airflow Web UI:
- Open your web browser and go to
localhost:8080to access the Apache Airflow Web UI. - Start the relevant DAGs
core_api_tf,arxiv_api_tf, andkeywords_dag_tfto extract, process, and load the information.
- Open your web browser and go to
-
Explore Visualizations:
-
Static Plots:
- Open the Jupyter Notebook
/visualization/visualizations.ipynbto view the static plots.
- Open the Jupyter Notebook
-
Interactive Plots:
- Once the DAGs have completed their tasks, access the Jupyter server running locally at
localhost:8888. - Utilize the Jupyter Notebook
/visualization/interactive_visualizations.ipynbto explore interactive plots. - Adjust parameters within the notebook to dynamically select and display specific data.
- Once the DAGs have completed their tasks, access the Jupyter server running locally at
-
By following these steps, you can run the entire project locally, extract meaningful insights from scientific paper data, and explore both static and interactive visualizations.
/dags: Contains Apache Airflow DAGs for the data extraction, processing, and loading tasks./plugins: Defines necessary functionalities for the DAGs, such as API access, database access, text processing, and other tasks./sql: SQL files with relevant queries to interact with the database./visualization: Jupyter Notebooks for visualization and analysis./docker-compose.yml: Configuration file for Docker containers./.github/workflows: GitHub Actions workflow for continuous integration.
Feel free to explore the project!
Happy coding! 🚀

