glombo_github

Development for the generalization project, both mono-product and multi-product

https://github.com/johnryt/glombo_github

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Development for the generalization project, both mono-product and multi-product

Basic Info
  • Host: GitHub
  • Owner: johnryt
  • License: other
  • Language: Python
  • Default Branch: main
  • Size: 1.62 GB
Statistics
  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 6
Created about 4 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Citation Zenodo

README.md

GLOMBO

Data locations

This repository serves as the source of code, data, figures, and tables associated with the publication Understanding key mineral supply chain dynamics using economics-informed material flow analysis and Bayesian optimization. The data associated with Table 1 of the main text and Supplementary Tables 8-26 can be found at input_files/user_defined/case study data.xlsx. Other input data can be found in the input_files folder as well, but data, figures, and tables corresponding to those in the text are saved in the folder of the corresponding main model run, in this case output_files/Historical tuning/2023-08-22 18_09_43_8_run_hist_all_main, in the figures and tables folders contained within it. Note that this folder also contains the folder input_files, which contains a copy of each file within the main/input_files folder from when the code was executed (as record in case input files are modified).

The database of literature values may be found in the Sources for elasticities.xlsx file in the main folder, or the updated version post-processing in output_files/Historical tuning/2023-08-22 18_09_43_8_run_hist_all_main/tables/table_s28_literature_parameter_database.csv.

Creating GLOMBO working environment

If intending to run any code from this repository, it is recommended to create a working environment such that all python packages are consistent between your machine and the author's. With this repository cloned to your machine (either using command line git, GitHub Desktop, or similar), the following code can be executed in the terminal (typically Anaconda Prompt on Windows), ensuring your working directory is the location of the cloned repository (the folder with glombo.yml in it): conda env create -f glombo.yml

The same can be accomplished by installing this package to your machine, which can be done using pip in the command line via: pip install git+https://github.com/johnryt/GLOMBO You can check the glombo working environment was created by running conda env list in your terminal. With this accomplished, you can begin running the model or reproducing its figures (or reproducing figures using alternative model tuning runs).

Generating figures

To save space, only the data comprising each figure is saved on github and not the figures themselves (note *.png and *.pdf in .gitignore), but these can be produced by running the python file generate_figures_tables.py in the main folder. This function will also print out many of the data points referenced in the text, such as the number of unique publications in the database, the fraction of MAPE changes associated with varying train-test splits less than 1%, etc.

## Running the full model The full historical tuning presented in the paper can be run using the run.py python file. It took several days on a PC with a 13th generation Intel i9 2200 MHz, 24 core processor and 64 GB of RAM, so understand that this is a substantial commitment.

All the remaining code is within the modules folder, with Many.py the most useful for running several iterations of the model (recommended in all circumstances, as there are instances of instability).

Owner

  • Login: johnryt
  • Kind: user

GitHub Events

Total
Last Year

Dependencies

environment.yml pypi
  • astor ==0.8.1
  • boruta ==0.3
  • botorch ==0.6.4
  • brewer2mpl ==1.4.1
  • cycler ==0.11.0
  • distlib ==0.3.6
  • docopt ==0.6.2
  • formulaic ==0.3.4
  • gamma-facet ==1.2.2
  • gamma-pytools ==1.2.5
  • gpytorch ==1.8.0
  • html5lib ==1.1
  • interface-meta ==1.3.0
  • ipython ==8.5.0
  • joypy ==0.2.6
  • jupyter-contrib-core ==0.4.0
  • jupyter-contrib-nbextensions ==0.5.1
  • jupyter-highlight-selected-word ==0.2.0
  • jupyter-latex-envs ==1.4.6
  • jupyter-lsp ==1.5.1
  • jupyter-nbextensions-configurator ==0.5.0
  • jupyterlab-code-cell-collapser ==1.0.0
  • jupyterlab-lsp ==3.10.1
  • lightgbm ==3.3.2
  • linearmodels ==4.27
  • matplotlib ==3.5.1
  • numpy ==1.21.5
  • opt-einsum ==3.3.0
  • pandas ==1.4.2
  • pipreqs ==0.4.11
  • platformdirs ==2.5.2
  • property-cached ==1.6.4
  • pyaml ==21.10.1
  • pyhdfe ==0.1.0
  • pyro-api ==0.1.2
  • pyro-ppl ==1.8.0
  • scikit-optimize ==0.9.0
  • scikit_learn ==1.1.2
  • scipy ==1.7.3
  • seaborn ==0.11.2
  • setuptools-scm ==6.4.2
  • shap ==0.39.0
  • sklearn ==0.0
  • sklearndf ==1.2.3
  • slicer ==0.0.7
  • statsmodels ==0.13.2
  • torch ==1.12.0
  • typeguard ==2.13.3
  • typing-inspect ==0.8.0
  • virtualenv ==20.16.5
  • yarg ==0.1.9
modules/setup.py pypi
  • os *