Git Product home page Git Product logo

2023-11_rid_realizations's Introduction

"RID Realizations" project

Research analysis data for the improved FEMA P-58 residual drift generation project.

Setting up the environment

# using venv
$ python -m venv {path/to/virtual_environment}
$ source {path/to/virtual_environment}/bin/activate
$ python -m pip install -r requirements.txt

# using conda
$ conda create -n rid_prj -c conda-forge python=3.12 -y
$ conda activate rid_prj
$ python -m pip install -r requirements.txt

You would then have to configure your editor to use the interpreter from the newly created environment. (Emacs) (pycharm) (spyder)
The interpreter is always assumed to be launched at the project root (the directory containing src, not src itself).

Tearing down the enviornment, if needed:

# using venv
$ rm -r {path/to/virtual_environment}

# using conda
conda remove -n rid_prj --all

Directory structure

src/ contains the source code.

src/validation contains code that is not meant to reproduce the results of the study, but was utilized while developing the main code to take incremental steps towards a goal or to troubleshoot issues.

data/ contains the time-history analysis data we use.

results contains analysis results, such as fit parameters or generated figures, and should not be version-controled.
We use the following directory structure: results/{result-category}/{data_gathering_approach}/{method}/{result-filename}.
{result-category} can be any of parameters, tables, figures.
{data_gathering_approach} can be any of separate_directions, bundled_directions.
{method} corresponds to the fitting methods we examine.
{result-filename} is the file name for a type of result, and it can be the same for different methods.

doc/ contains the files used to generate documents associated with the project, such as the poster presentation, manuscripts and any other derivative work.

Data version control

data/ and results/ are not version controlled, but the contents are tracked with DVC.

After cloning the repository and setting up the environment, issue the following command to pull the contents:

$ dvc pull

After making changes, they should be added with DVC and then committed with git.


# changes in data/
$ dvc add data

# changes in results/
$ dvc add results

$ dvc push
$ git add {changed-dvc-files}
$ git commit -m 'DVC - update results'

Data processing pipeline

This section will describe in what order to execute the code to reproduce all of the project's analysis results. Note that the results should already be available using DVC.

Set the PYTHONPATH variable

export PYTHONPATH=$PYTHONPATH:$(pwd)
  1. Fit all the models. Creates parameters.parquet and models.picle files in results/parameters/{method}/.
$ python src/fit_models.py
  1. Create plots that help assess the quality of the fit. Creates fit_{system}_{stories}_{rc}.pdf files in results/figures/{method}/.
$ python src/plot_fit.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.