Skip to content

Commit

Permalink
started fixing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
FDonati committed Mar 21, 2019
1 parent ebd5081 commit bc65bcb
Show file tree
Hide file tree
Showing 64 changed files with 3,732 additions and 3,332 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ clean-test: ## remove test and coverage artifacts
rm -fr .pytest_cache

lint: ## check style with flake8
flake8 pyce tests
flake8 pycirk tests

test: ## run tests quickly with the default Python
py.test
Expand All @@ -60,13 +60,13 @@ test-all: ## run tests on every Python version with tox
tox

coverage: ## check code coverage quickly with the default Python
coverage run --source pyce -m pytest
coverage run --source pycirk -m pytest
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/pyce.rst
rm -f docs/pycirk.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ pycirk
$(MAKE) -C docs clean
Expand Down
129 changes: 3 additions & 126 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,130 +132,7 @@ It is possible to specify:
- whether the intervention affects domestic, import transactions or both


This package was created with Cookiecutter and the `audreyr/cookiecutter-pypackage` project template.

## Important modules


### pycirk.py

1. Initiates the operations to set scenarios and to create IOT from SUT based on prodxprod Industry-Technology assumption both under Market Share Coefficient method and Technical Coefficient method.
2. From start you can launch all the analysis specifications listed under scenarios.xls and save everything
3. Results will be saved in the output folder

Permitted SUT transformation Methods:
- method = 0 >> Prod X Prod Ind-Tech Assumption Technical Coeff method
- method = 1 >> Prod X Prod Ind-Tech Assumption Market Share Coeff method

Results options:
- results_only = True >> output only results (spec'd in scenarios.xls under analysis)
- results_only = False >> output all IOTs and results
- scen_no = 0 - n (0 = baseline)
- n = is number of scenarios specified by sheet in scenarios.xls
- "scenario_1" is also allowed for scenarios
- None, 0, base and baseline are also accepted for baseline

Aggregation types:
- aggregation = ["", "bi-regional"](bi-regional EU-ROW), None (Multi-regional 49 countries)

Availability of secondary raw materials in IO:
- make_secondary = False (regular database), True (modifies SUTs so that secondary raw materials are avaialable in IO after transformation)


### scenarios.xls

From this .xls file it is possible to set different types of interventions and the analysis to perform:

- matrix = specifies in which matrix of IOT the changes are applied
- intervention = Primary and ancillary are only used to specify the type of intervention from a conceptual level
- reg_o or reg_d = Regional coordinates (o=origin or row, d=destination or column)
- cat_o or cat_d = category (e.g. products or extensions ) coordinates (o=origin or row, d=destination or column)
- kt = technical change coefficient (max achievable technically); a negative value means reduction; unit = %
- ka = absolute values for addition
- kp = penetration coefficient (level of market penetration of the policy); unit = %
- copy = allows you to copy a specific transation to a different point in the matrices (useful for proxy creation)
- substitution = tells the software whether it needs to substitute values among specified categories
- sk = which intervention should be substituted
- swk = Substitution weighing factor (how much of the original transaction should be substituted); allows to simulate difference in prices and physical properties between categories; unit = %

These can be set for:

- product category e.g. C_STEL (basic iron), C_PULP (pulp), etc.
- final demand category e.g. F_HOUS (households), F_GOVE (government), etc.
- primary input category e.g. E_HRHS (employment highly skilled), T_TLSA (taxes less subsidies), etc.
- emissions extensions e.g. E_CO2_c (CO2 - combustion)
- material extensions e.g. NI.02 (Nature Inputs: Coking Coal)
- resource extension e.g. L_1.1 (Land use - Arable Land - Rice)

Furthemore, from the analysis sheet you can set the following variables to be compared in the analysis:

- product categories
- primary input categories
- emissions extensions
- material extensions
- resource extensions
- region of interest
- impact categories # Please see the data_validation_list sheet in the scenarios.xls file for the comprehensive list

### make_secondary.py
Allows for the modification of secondary material flows in the SUTs so that they are visible in the IO system

## Other modules

### results.py

Class to assemble results for analysis as specified in scenario.xls analysis sheet:

- Output product content in other products
- Output results for each scenario
- Output results and all IO tables and extensions


### save_.py

Save class:

- Save one scenario results
- Save one scenario results + IOTs
- Save all scenarios + IOTs
- Save all results


### apply_policy.py

Policy interventions class:

- Recreate any matrix in IOT from policy interventions listed in the scenarios scenarios.xls

### base_n_scen.py

Calculate IOT for baseline and scenarios from SUTs


### SUTtoIOT.py

Assemblying IOTs and Extensions from:

- Prod x prod industry technology assumption in market share coefficient method
- Prod x prod industry technology assumption in technical coefficient method


### SUTops.py

Class for fundamental mathematical operations of IOA and SUT


### labels.py

General label manager for tables


## Credits

Thanks to dr. Arnold Tukker, dr. Joao Dias Rodriguez for the supervision
dr. Arjan de Koning for knowledge support in exiobase
MSc. Glenn Auguilar Hernandez for testing

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
Cookiecutter: https://github.com/audreyr/cookiecutter
audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
67 changes: 1 addition & 66 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ It is possible to specify:


4.1. pycirk.py
------------
--------------


1. Initiates the operations to set scenarios and to create IOT from SUT based on prodxprod Industry-Technology assumption both under Market Share Coefficient method and Technical Coefficient method.
Expand Down Expand Up @@ -235,71 +235,6 @@ Furthemore, from the analysis sheet you can set the following variables to be co
- impact categories # Please see the data_validation_list sheet in the scenarios.xls file for the comprehensive list


### make_secondary.py
Allows for the modification of secondary material flows in the SUTs so that they are visible in the IO system


================
5. Other modules
================


5.1. results.py
---------------

Class to assemble results for analysis as specified in scenario.xls analysis sheet:

- Output product content in other products
- Output results for each scenario
- Output results and all IO tables and extensions


5.2. save_.py
-------------

Save class:

- Save one scenario results
- Save one scenario results + IOTs
- Save all scenarios + IOTs
- Save all results


5.3. apply_policy.py
--------------------

Policy interventions class:

- Recreate any matrix in IOT from policy interventions listed in the scenarios scenarios.xls


5.4. base_n_scen.py
-------------------

Calculate IOT for baseline and scenarios from SUTs


5.5. SUTtoIOT.py
----------------

Assemblying IOTs and Extensions from:

- Prod x prod industry technology assumption in market share coefficient method
- Prod x prod industry technology assumption in technical coefficient method


5.6. SUTops.py
--------------

Class for fundamental mathematical operations of IOA and SUT


5.7. labels.py
--------------

General label manager for tables



==========
6. Credits
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = pyce
SPHINXPROJ = pycirk
SOURCEDIR = .
BUILDDIR = _build

Expand Down
Binary file modified docs/_build/doctrees/authors.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/contributing.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/history.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/installation.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/module.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/modules.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/pycirk.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/readme.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/usage.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 99d7142f39acbba3c9fe65c805d4ec72
config: 973b200ac544692cf49b7ad1a82bc8fc
tags: 645f666f9bcd5a90fca523b33c5a78b7
55 changes: 45 additions & 10 deletions docs/_build/html/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<title>Overview: module code &#8212; pycirk 1.0.0 documentation</title>
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" src="../_static/documentation_options.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
Expand All @@ -27,25 +27,52 @@
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">


<div class="body" role="main">

<h1>All modules for which code is available</h1>
<ul><li><a href="pycirk/SUTops.html">pycirk.SUTops</a></li>
<li><a href="pycirk/SUTtoIOT.html">pycirk.SUTtoIOT</a></li>
<li><a href="pycirk/apply_policy.html">pycirk.apply_policy</a></li>
<li><a href="pycirk/base_n_scen.html">pycirk.base_n_scen</a></li>
<ul><li><a href="pycirk/fundamental_operations.html">pycirk.fundamental_operations</a></li>
<li><a href="pycirk/labels.html">pycirk.labels</a></li>
<li><a href="pycirk/make_scenarios.html">pycirk.make_scenarios</a></li>
<li><a href="pycirk/make_secondary_flows.html">pycirk.make_secondary_flows</a></li>
<li><a href="pycirk/organize_io.html">pycirk.organize_io</a></li>
<li><a href="pycirk/positions.html">pycirk.positions</a></li>
<li><a href="pycirk/pycirk.html">pycirk.pycirk</a></li>
<li><a href="pycirk/pycirk_settings.html">pycirk.pycirk_settings</a></li>
<li><a href="pycirk/results.html">pycirk.results</a></li>
<li><a href="pycirk/save_.html">pycirk.save_</a></li>
<li><a href="pycirk/save_utils.html">pycirk.save_utils</a></li>
<li><a href="pycirk/transformation_methods.html">pycirk.transformation_methods</a></li>
</ul>

</div>

</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"><div class="relations">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../index.html">pycirk</a></h1>








<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../readme.html">pycirk</a></li>
<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="../modules.html">pycirk</a></li>
<li class="toctree-l1"><a class="reference internal" href="../contributing.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../authors.html">Credits</a></li>
<li class="toctree-l1"><a class="reference internal" href="../history.html">History</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
Expand All @@ -64,16 +91,24 @@ <h3>Quick search</h3>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>








</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2018, Franco Donati.
&copy;2019, Franco Donati.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.7.4</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.8.2</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>

</div>

Expand Down
Loading

0 comments on commit bc65bcb

Please sign in to comment.