Giter Site home page Giter Site logo

ciraig / openio-canada Goto Github PK

View Code? Open in Web Editor NEW
18.0 6.0 5.0 631.82 MB

Module to create symmetric Environmentally Extended Input-Output tables for Canada.

Python 100.00%
input-output-analysis carbon-footprint industrial-ecology water-footprint energy-consumption canada environmental-modelling

openio-canada's Introduction

OpenIO-Canada v2.9

Python class creating Multi-Regional symmetric Environmentally Extended Input-Output (MREEIO) tables for Canada. OpenIO-Canada operates at the provincial level (13 provinces). It can thus be used to compare the environmental impacts of value chains or consumption by households from any specific province.

OpenIO-Canada covers 492 commodities, 33 GHGs, 310 pollutants in 3 compartments (air, water and soil), 67 mineral resources, water consumption, energy use and plastic waste pollution.

OpenIO-Canada is connected to the Exiobase global MRIO database to model value chains happening outside Canada.

Getting started

Clone the repository (or download it) and install the different libraries required to run this Python class (requirements.txt).
Note that we recommend working with version 3.9 of Python as we can ensure it works for that specific version.
Go to the doc folder and take a look at the demo.ipynb file to see how to generate the IO tables.

Data used

openio-canada's People

Contributors

hha-mm avatar mapree avatar maximeagez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

openio-canada's Issues

error on version 2.8

Hi Maxime, I am running openIO ver 2.8 on 2019 data but I am getting the following error.

2024-03-15 11:23:52,211 - openIO-Canada - INFO - Reading all the Excel files...
2024-03-15 11:24:10,311 - openIO-Canada - INFO - Formatting the Supply and Use tables...
2024-03-15 11:25:10,107 - openIO-Canada - INFO - Modifying names of duplicated sectors...
2024-03-15 11:25:10,261 - openIO-Canada - INFO - Organizing final demand sectors...
2024-03-15 11:25:11,000 - openIO-Canada - INFO - Removing IOIC codes from index...
2024-03-15 11:25:11,572 - openIO-Canada - INFO - Balancing inter-provincial trade...
2024-03-15 11:26:53,205 - openIO-Canada - INFO - Pre-treatment of international trade data...
2024-03-15 11:27:23,262 - openIO-Canada - INFO - Linking international trade data to openIO-Canada...
2024-03-15 11:29:07,863 - openIO-Canada - INFO - Building the symmetric tables...
2024-03-15 11:29:16,658 - openIO-Canada - INFO - Linking openIO-Canada to Exiobase...
2024-03-15 11:39:16,996 - openIO-Canada - INFO - Extracting and formatting environmental data from the NPRI file...
2024-03-15 11:39:19,180 - openIO-Canada - INFO - Matching emission data from NPRI to IOT sectors...
2024-03-15 11:39:20,961 - openIO-Canada - INFO - Matching GHG accounts to IOT sectors...
2024-03-15 11:39:26,570 - openIO-Canada - INFO - Matching water accounts to IOT sectors...
2024-03-15 11:39:33,883 - openIO-Canada - INFO - Matching energy accounts to IOT sectors...
2024-03-15 11:39:37,861 - openIO-Canada - INFO - Matching mineral extraction data to IOT sectors...
2024-03-15 11:39:38,762 - openIO-Canada - INFO - Creating the characterization matrix...
2024-03-15 11:46:21,747 - openIO-Canada - INFO - Refining the GHG emissions for the agriculture sector...
2024-03-15 11:46:21,932 - openIO-Canada - INFO - Cleaning province and country names...
2024-03-15 11:46:22,044 - openIO-Canada - INFO - Refining the GHG emissions for the meat sector...
2024-03-15 11:46:29,461 - openIO-Canada - INFO - Adding HFP and PFC flows...
2024-03-15 11:47:15,846 - openIO-Canada - INFO - Refining water consumption of livestock and crops...
2024-03-15 11:47:23,616 - openIO-Canada - INFO - Adding plastic waste flows...
Traceback (most recent call last):
File "C:\Users\ranis\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexes\base.py", line 3361, in get_loc
return self._engine.get_loc(casted_key)
File "pandas_libs\index.pyx", line 76, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas_libs\hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'CA-AB'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "J:\F_Drive\CIRAIG_Training\OpenIOCanada\ARA_EEMARIO.py", line 20, in
tables = openIO.IOTables(folder_path,exiobase_folder,endogenizing_capitals=False, aggregated_ghgs=True)
File "J:\F_Drive\CIRAIG_Training\OpenIOCanada\openIO.py", line 240, in init
self.add_plastic_emissions()
File "J:\F_Drive\CIRAIG_Training\OpenIOCanada\openIO.py", line 2614, in add_plastic_emissions
self.K.loc(axis=0)[:, product].loc[:, 'CA-' + province].sum(1))
File "C:\Users\ranis\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py", line 925, in getitem
return self._getitem_tuple(key)
File "C:\Users\ranis\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py", line 1100, in _getitem_tuple
return self._getitem_lowerdim(tup)
File "C:\Users\ranis\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py", line 822, in _getitem_lowerdim
return self._getitem_nested_tuple(tup)
File "C:\Users\ranis\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py", line 906, in _getitem_nested_tuple
obj = getattr(obj, self.name)._getitem_axis(key, axis=axis)
File "C:\Users\ranis\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py", line 1164, in _getitem_axis
return self._get_label(key, axis=axis)
File "C:\Users\ranis\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py", line 1113, in _get_label
return self.obj.xs(label, axis=axis)
File "C:\Users\ranis\AppData\Roaming\Python\Python39\site-packages\pandas\core\generic.py", line 3761, in xs
return self[key]
File "C:\Users\ranis\AppData\Roaming\Python\Python39\site-packages\pandas\core\frame.py", line 3458, in getitem
indexer = self.columns.get_loc(key)
File "C:\Users\ranis\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexes\base.py", line 3363, in get_loc
raise KeyError(key) from err
KeyError: 'CA-AB'

How I can call and use this function. Please help. thanks

def treatment_import_data(original_file_path):
"""Function used to treat the merchandise imports trade database file. FIle is way too big to be provided to
users through Github, so we treat the data to only keep what is relevant."""

# load database
merchandise_database = pd.read_csv(original_file_path)
# drop useless columns

merchandise_database = merchandise_database.drop(['YearMonth/AnnéeMois', 'Province', 'State/État',
                                                  'Quantity/Quantité', 'Unit of Measure/Unité de Mesure'],
                                                 axis=1)

# drop international imports coming from Canada
merchandise_database = merchandise_database[merchandise_database['Country/Pays'] != 'CA']

# also drop nan countries for obvious reasons
merchandise_database = merchandise_database.dropna(subset=['Country/Pays'])

# set the index as country/code multi-index
merchandise_database = merchandise_database.set_index(['Country/Pays', 'HS6'])

# regroup data from several months into a single yearly data
merchandise_database = merchandise_database.groupby(merchandise_database.index).sum()

# multi-index is cleaner
merchandise_database.index = pd.MultiIndex.from_tuples(merchandise_database.index)

return merchandise_database

Getting error when endogenizing_capitals=True with 2017 run only, 2018 and 2019 works fine.

2023-10-26 09:21:52,776 - openIO-Canada - INFO - Endogenizing capitals of OpenIO-Canada...
There is an issue while allocating capital formation of openIO-Canada for the capital: Machinery manufacturing and for the province: NT
There is an issue while allocating capital formation of openIO-Canada for the capital: Beverage and tobacco product manufacturing and for the province: NU
There is an issue while allocating capital formation of openIO-Canada for the capital: Animal production and for the province: NU
There is an issue while allocating capital formation of openIO-Canada for the capital: Beverage and tobacco product manufacturing and for the province: NU
2023-10-26 09:23:54,740 - openIO-Canada - INFO - Balancing inter-provincial trade...
2023-10-26 09:25:51,280 - openIO-Canada - INFO - Pre-treatment of international trade data...
Traceback (most recent call last):
File "F:\carbon\EEMRIO_2017.py", line 10, in
tables = openIO.IOTables(folder_path='F://carbon/2017/Detail level/',
File "F:\carbon\openIO.py", line 172, in init
self.determine_sectors_importing()
File "F:\carbon\openIO.py", line 810, in determine_sectors_importing
assert len(self.U[self.U < -1].dropna(how='all', axis=1).dropna(how='all', axis=0)) == 0
AssertionError

GHG flows aggregated

Because Canada only provides the GHG flows as aggregated, it is not possible (using only the data from the government) to distinguish between CO2, CH4 and N2O. It has multiple cosnequences:

  1. We are only able to use the factors they used to aggregate these flows (GWP100 characterization factors) and are unable to update those or look at different time periods (e.g. GWP500)
  2. Can only look at GWP as a separate indicator. It is impossible to integrate the impact climate change has on Human Health or the Ecosystems Quality.
  3. [the most troublesome] Some of the GHGs impact other impact categories (methane is also a VOC impacting the formation of smog). So, because they are aggregated, it is impossible to link these gases to other impact categories. In other words, the other categories total impact scores will be underestimated.

Biogenic emissions

The file provided by Statistics Canada does not differentiate between biogenic and fossil emissions.

For now, all emissions are considered fossil (conservative approach) which results in overestimations (mostly for agriculture and wood fuels).

If Statistics Canada cannot provide the differentiated version for biogenic/fossil GHGs, will have to come up with a fix.

Loading error when following the demo

Following the demo (https://github.com/CIRAIG/OpenIO-Canada/blob/master/doc/demo.ipynb)

Getting the following error at the 'Endogenizing capitals' stage:
image

If I disable endogenizing capitals and run again, I get a similar error at the 'Balancing interprovincial trade' stage:
image

I am using the recommended pandas version (1.3.4), so this is not a duplicate of #21.
Here is the full library version list:
image
Using numpy 1.21.0 instead of 1.20.3, because it crashes with 1.20.3 (matplotlib requires >1.21.0).

This is with the 2019 datasets, copying the demo.

Industry by industry with final demand disaggregated

The combination of arguments classification='industry' and final_demand_aggregated=False leads to a bug for water use as the code directly calls a product 'Water delivered by water works and irrigation systems' which is thus not available in the "industry" classification.

Emissions for Agriculture

The GHG data from physical accounts of Statistics Canada only cover a very broad category "Crop and animal production (except cannabis)". GHG emissions are then distributed to the higher resolution classification depending on market shares (~economic allocation of LCA). This gives questionable direct emissions for agricultural products which vary a lot in their direct emissions (breeding 1$ of cow should emit way more GHGs than growing 1$ of apple).

Potential fix to implement -> use LCA results (converted using prices) to refine the distribution of GHG emissions for the agricultural sectors.

Use for independent project

Hi,

I was wondering if this code would be able to allow me to calculate my Canadian company's scope 3 emissions by inputting all the units we have purchased from suppliers?

Classifications available

For now only the "Detail level" classification is operational. Maintaining the other levels of classification (e.g., "Link-1961 level") takes a lot of effort, so I will see if it is something to work for or if I should just give up on it.

data loading error in 2019 at Balancing inter-provincial trade

image
2023-09-07 17:36:15,195 - openIO-Canada - INFO - Reading all the Excel files...
2023-09-07 17:36:44,026 - openIO-Canada - INFO - Formatting the Supply and Use tables...
2023-09-07 17:38:40,612 - openIO-Canada - INFO - Modifying names of duplicated sectors...
2023-09-07 17:38:41,344 - openIO-Canada - INFO - Organizing final demand sectors...
2023-09-07 17:38:43,674 - openIO-Canada - INFO - Removing IOIC codes from index...
2023-09-07 17:38:43,846 - openIO-Canada - INFO - Endogenizing capitals of OpenIO-Canada...
2023-09-07 17:39:56,995 - openIO-Canada - INFO - Balancing inter-provincial trade...

KeyError Traceback (most recent call last)
Input In [4], in <cell line: 1>()
----> 1 tables = openIO.IOTables(folder_path='C://Users/ranis/Downloads/carbon/2019/Detail level/',
2 exiobase_folder='C://Users/ranis/Downloads/carbon/IOT_2019_pxp/',
3 endogenizing_capitals=True)

File C:/Users/ranis/Downloads/carbon\openIO.py:165, in IOTables.init(self, folder_path, exiobase_folder, endogenizing_capitals)
162 self.endogenizing_capitals()
164 logger.info("Balancing inter-provincial trade...")
--> 165 self.province_import_export(
166 pd.read_excel(
167 folder_path+[i for i in [j for j in os.walk(folder_path)][0][2] if 'Provincial_trade_flow' in i][0],
168 'Data'))
170 if self.exiobase_folder:
171 logger.info('Pre-treatment of international trade data...')

File C:/Users/ranis/Downloads/carbon\openIO.py:724, in IOTables.province_import_export(self, province_trade_file)
719 scaled_imports_K = ((import_distribution_K.T * import_markets.fillna(0).loc[
720 importing_province, exporting_province]).T).reindex(import_distribution_K.index).fillna(0)
721 scaled_imports_Y = ((import_distribution_Y.T * import_markets.fillna(0).loc[
722 importing_province, exporting_province]).T).reindex(import_distribution_Y.index).fillna(0)
--> 724 self.assert_order(exporting_province, importing_province, scaled_imports_U, scaled_imports_Y,
725 scaled_imports_K)
727 # assign new values into self.U
728 self.U.loc[exporting_province, importing_province] = (
729 scaled_imports_U.loc[:, self.U.columns.levels[1]].reindex(
730 self.U.loc[exporting_province, importing_province].columns, axis=1).values)

File C:/Users/ranis/Downloads/carbon\openIO.py:2490, in IOTables.assert_order(self, exporting_province, importing_province, scaled_imports_U, scaled_imports_Y, scaled_imports_K)
2482 assert all(self.K.loc[exporting_province, importing_province].index ==
2483 scaled_imports_K.loc[:, self.K.columns.levels[1]].reindex(
2484 self.K.loc[exporting_province, importing_province].columns, axis=1).index)
2485 assert all(self.K.loc[exporting_province, importing_province].columns ==
2486 scaled_imports_K.loc[:, self.K.columns.levels[1]].reindex(
2487 self.K.loc[exporting_province, importing_province].columns, axis=1).columns)
2489 assert all(self.Y.loc[exporting_province, importing_province].index ==
-> 2490 scaled_imports_Y.loc[:, self.Y.columns.levels[1]].reindex(
2491 self.Y.loc[exporting_province, importing_province].columns, axis=1).index)
2492 assert all(self.Y.loc[exporting_province, importing_province].columns ==
2493 scaled_imports_Y.loc[:, self.Y.columns.levels[1]].reindex(
2494 self.Y.loc[exporting_province, importing_province].columns, axis=1).columns)

File ~\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py:1147, in _LocationIndexer.getitem(self, key)
1145 if self._is_scalar_access(key):
1146 return self.obj._get_value(*key, takeable=self._takeable)
-> 1147 return self._getitem_tuple(key)
1148 else:
1149 # we by definition only have the 0th axis
1150 axis = self.axis or 0

File ~\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py:1330, in _LocIndexer._getitem_tuple(self, tup)
1328 with suppress(IndexingError):
1329 tup = self._expand_ellipsis(tup)
-> 1330 return self._getitem_lowerdim(tup)
1332 # no multi-index, so validate all of the indexers
1333 tup = self._validate_tuple_indexer(tup)

File ~\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py:1015, in _LocationIndexer._getitem_lowerdim(self, tup)
1013 # we may have a nested tuples indexer here
1014 if self._is_nested_tuple_indexer(tup):
-> 1015 return self._getitem_nested_tuple(tup)
1017 # we maybe be using a tuple to represent multiple dimensions here
1018 ax0 = self.obj._get_axis(0)

File ~\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py:1127, in _LocationIndexer._getitem_nested_tuple(self, tup)
1124 axis -= 1
1125 continue
-> 1127 obj = getattr(obj, self.name)._getitem_axis(key, axis=axis)
1128 axis -= 1
1130 # if we have a scalar, we are done

File ~\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py:1382, in _LocIndexer._getitem_axis(self, key, axis)
1379 if hasattr(key, "ndim") and key.ndim > 1:
1380 raise ValueError("Cannot index with multidimensional key")
-> 1382 return self._getitem_iterable(key, axis=axis)
1384 # nested tuple slicing
1385 if is_nested_tuple(key, labels):

File ~\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py:1322, in _LocIndexer._getitem_iterable(self, key, axis)
1319 self._validate_key(key, axis)
1321 # A collection of keys
-> 1322 keyarr, indexer = self._get_listlike_indexer(key, axis)
1323 return self.obj._reindex_with_indexers(
1324 {axis: [keyarr, indexer]}, copy=True, allow_dups=True
1325 )

File ~\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexing.py:1520, in _LocIndexer._get_listlike_indexer(self, key, axis)
1517 ax = self.obj._get_axis(axis)
1518 axis_name = self.obj._get_axis_name(axis)
-> 1520 keyarr, indexer = ax._get_indexer_strict(key, axis_name)
1522 return keyarr, indexer

File ~\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexes\multi.py:2648, in MultiIndex._get_indexer_strict(self, key, axis_name)
2645 if len(keyarr) and not isinstance(keyarr[0], tuple):
2646 indexer = self._get_indexer_level_0(keyarr)
-> 2648 self._raise_if_missing(key, indexer, axis_name)
2649 return self[indexer], indexer
2651 return super()._get_indexer_strict(key, axis_name)

File ~\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexes\multi.py:2669, in MultiIndex._raise_if_missing(self, key, indexer, axis_name)
2666 raise KeyError(f"{keyarr[cmask]} not in index")
2667 # We get here when levels still contain values which are not
2668 # actually in Index anymore
-> 2669 raise KeyError(f"{keyarr} not in index")
2670 else:
2671 return super()._raise_if_missing(key, indexer, axis_name)

KeyError: "Index(['Changes in inventories', 'Governments final consumption expenditure',\n 'Gross fixed capital formation, Construction',\n 'Gross fixed capital formation, Intellectual property products',\n 'Gross fixed capital formation, Machinery and equipment',\n 'Household final consumption expenditure', 'International exports',\n 'Non-profit institutions serving households' final consumption expenditure'],\n dtype='object') not in index"

Land use data

Land use data from FAOSTAT can be used to get land extensions in openIO-Canada. Only issue is how to allocate the land uses to the different sectors of a each province.

GHG emissions levels are off

Current open IO results give a rough 4tCO2e/capita for Quebec while other models are closer to the 10-12tCO2e/capita mark.

It is suspicious.

Water use to water consumption

Find the rules applied by ecoinvent and apply them to the sectors in openIO-Canada to get water consumption data from water use

production and consumption comparision

Hi Maxime, As you mentioned in the validation file that Comparison openIO-Canada v2.7 and v2.8 results for the GWP scores for the whole Canadian economy in 2019:

  • Consumption approach
    • v2.7 estimates at 681MtCO2e the total footprint of Canada
    • v2.8 estimates at 650MtCO2e the total footprint of Canada
  • Production-based approach
    • v2.7 estimates at 814MtCO2e the total footprint of Canada
    • v2.8 estimates at 795MtCO2e the total footprint of Canada
      I found that the consumption-based results are in Table D as climate change short term. where are the production-based results? means in which table and row. thanks

Tests

Self explanatory.

consumption emissions (MtCO2eq)

Hi, I'm currently studying EEIO analysis method and found your JCR manuscript quite informative. I am curious how you calculated the results presented in the following statement: "In 2017, Canada's consumption was responsible for the release of 692 MtCO2eq." Specifically, is this figure derived by summing all the values in Table E (the total emissions table)? Thanks.

NPRI coverage + link to IW+

Need to better the link between NPRI and IW+. So afr it's only been done relying on CAS number and obvious links based on names. Will have to modify the emissions to create residuals that will then be linked to default values of IW+, e.g., speciated VOCs that could not be matched to IW+ should be gathered (their quantities) and characterized the default values of NMVOC from IW+.

Additional transformation models

Could add other transformation models. So far, only the ones trigerring no negative values were implemented (fixed industry sales and industry technology). Product technology, fixed product sales and hybrid technology models could be integrated and the choice could be given to the user.

Regionalization

Since we have all provincial data, might as well try to get regionalized tables!

if you please write the tables names as written in demo what are these tables it will help. Thanks

I was looking for 2019 IO table but it look like it is already normalized. if you kindly mention the name of these tables it could help me to understand the code. Thanks

    self.V = pd.DataFrame()
    self.U = pd.DataFrame()
    self.A = pd.DataFrame()  # technology matrix, covering 13 Canadian provinces, 44 country and 5 Rest of the World region
    self.K = pd.DataFrame()  # capital matrix (only available if you chose to endogenize capitals)
    self.Z = pd.DataFrame()
    self.W = pd.DataFrame()
    self.R = pd.DataFrame()  # normalized value added
    self.Y = pd.DataFrame()  # final demand
    self.WY = pd.DataFrame()
    self.g = pd.DataFrame()
    self.inv_g = pd.DataFrame()
    self.q = pd.DataFrame()
    self.inv_q = pd.DataFrame()
    self.F = pd.DataFrame()   # environmental flow matrix
    self.S = pd.DataFrame()  # normalized environmental flow matrix
    self.FY = pd.DataFrame()   # direct emissions from final demand
    self.C = pd.DataFrame()   # characterization matrix (using IW+)
    self.INT_imports = pd.DataFrame()
    self.L = pd.DataFrame()    # Leontief inverse
    self.E = pd.DataFrame()
    self.D = pd.DataFrame()  # total emissions per final demand sector
    self.who_uses_int_imports_U = pd.DataFrame()
    self.who_uses_int_imports_K = pd.DataFrame()
    self.who_uses_int_imports_Y = pd.DataFrame()
    self.A_exio = pd.DataFrame()
    self.K_exio = pd.DataFrame()
    self.S_exio = pd.DataFrame()
    self.F_exio = pd.DataFrame()
    self.C_exio = pd.DataFrame()
    self.link_openio_exio_A = pd.DataFrame()
    self.link_openio_exio_K = pd.DataFrame()
    self.link_openio_exio_Y = pd.DataFrame()
    self.merchandise_imports = pd.DataFrame()
    self.merchandise_imports_scaled_U = pd.DataFrame()
    self.merchandise_imports_scaled_K = pd.DataFrame()
    self.merchandise_imports_scaled_Y = pd.DataFrame()
    self.minerals = pd.DataFrame()

International imports

International imports are estimated using the exiobase database. Imports data provided by Statistics Canada however, only provide the intensity and nature of the flow and not its origin nor its user. So we know that Québec imported X$ of cars from elsewhere than Canada but we do not know:

  • which sector in the Québec economy requires international imports of cars
  • from which countries these cars come from (we only know it's not coming from Canada)

For the first point we apply an economic allocation to determine to which sectors the imports are attributed, i.e., if sector A represents 5% of the use of cars in the Québec economy, then sector A will be attributed 5% of the international imports of cars. This is probably the best possible fix.

For the second point, we consider the global market distribution to determine the origin of products. If China represents 50% of the global market in cars (in volume sold), then we will consider than 50% of the cars imported by Québec come from China. In reality however, it's most probably coming from the US.
-> Potential fixes to implement for the second point:

  • Go fetch data from the customs of Canada which (probably) records the origin of products imported
  • Use COMTRADE
  • Use exiobase's international imports distribution for Canada

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.