Skip to content

Commit

Permalink
Add the files from local repo to git hub repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Olaya committed Dec 6, 2024
0 parents commit 30f3b60
Show file tree
Hide file tree
Showing 21 changed files with 8,958 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Byte-compiled Python files
__pycache__/
*.py[cod]
*$py.class

# Jupyter Notebook checkpoints
.ipynb_checkpoints/

# R specific
.Rhistory
.RData
.Ruserdata
.Rproj.user/

# Shell script temporary files
*.sh~
*.bak
*.tmp

# Virtual environments
env/
venv/
ENV/
.venv/
.virtualenv/

# Python packaging files
*.egg
*.egg-info/
dist/
build/
*.whl

# Logs and database
*.log
*.sqlite
*.db

# Environment and config files
.env

# Data and results
data/raw/*
!data/raw/.gitkeep
results/figures/*
results/tables/*
results/logs/*
!results/figures/.gitkeep
!results/tables/.gitkeep
!results/logs/.gitkeep

# Docker
*.env
.dockerignore

# Pixi
.pixi

# Miscellaneous
.DS_Store
Thumbs.db


# IPython NB Checkpoints
.ipynb_checkpoints/

# exclude compiled binaries
bin/

# exclude data from source control by default
/data/processed/
/data/raw/

# exclude external models from source control
/src/external/
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM python:3.9-slim

# Install Pixi

FROM ghcr.io/prefix-dev/pixi:latest

# Set working directory
WORKDIR /project

# Copy project files
COPY . .

# Install dependencies
RUN cd /project
RUN pixi install

# Default command
CMD ["pixi", "run", "preprocess"]

29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD License

Copyright (c) 2024, Julian
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

* Neither the name of Bios259_Practice nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

# Gapminder Project: Reproducible workflow with Pixi

## Task description
This project uses the Gapminder dataset to explore global development indicators like life expectancy, GDP per capita, and population.

The workflow includes:
- Data preprocessing
- Analysis by continent
- Visualization of results

## Setup Instructions

### 1. **Create a reproducible research using cookiecutter**:

Here is the command to install and start the project using cookiecutter.
```bash
mamba install cookiecutter jinja2-time
```
```bash
cookiecutter gh:bios259/cookie-for-reproducible-research
```
You can also check the GitHub repo to install cookiecutter and create a project - https://github.com/bios259/cookie-for-reproducible-research


### 2. **Copy necessary from this repo**:
Copy the necessary files (scripts and data) from this repo to making the project as Pixi and add the scripts and data.

Check the `pixi.toml` file for more details.

### 3. **Install Pixi packages and run the Pixi tasks**:

- Install pixi dependencies after copying the pixi.toml:

```bash
pixi install
```
- Preprocess the data:

```bash
pixi run preprocess
```

- Analyze the data:
```bash
pixi run analyze
```

- Visualize the results:
```bash
pixi run visualize
```

### 4. **Run with Docker**:

Build and run the Docker container:
```bash
docker build -t gapminder-project .
docker run -v $(pwd):/app -it gapminder-project
```

## Results
- **Cleaned Data**:
`data/processed/cleaned_gapminder.csv`

- **Summary Table**:
`results/tables/continent_summary.csv`

- **Figures**:
- Life Expectancy: `results/figures/life_expectancy_over_time.png`
- GDP per Capita: `results/figures/gdp_per_capita_distribution.png`
Empty file added config/.gitkeep
Empty file.
Empty file added data/.gitkeep
Empty file.
Empty file added environments/.gitkeep
Empty file.
Empty file added notebooks/.gitkeep
Empty file.
Loading

0 comments on commit 30f3b60

Please sign in to comment.