Skip to content

Quantilica/comexdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

172 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

comexdown: Brazil's foreign trade data downloader

GitHub PyPI

This package contains functions to download brazilian foreign trade data published by Ministerio da Economia(ME)/Secretaria de Comercio Exterior (SCE).

Installation

comexdown package is available on PyPI, so just use pip!

pip install comexdown

Usage

import comexdown

# Download main NCM table in the directory ./DATA
comexdown.ncm(table="ncm", path="./DATA")

# Download 2019 exports data file in the directory ./DATA
comexdown.exp(year=2019, path="./DATA")

Command line tool

Download data on Brazilian foreign trade transactions (Exports / Imports).

You can specify a range of years to download at once.

comexdown trade 2008:2019 -o "./DATA"

Download code tables.

comexdown tables  # Download all related code files

Datasets

  • Trade data:
    • exp
    • imp
    • exp-mun
    • imp-mun
    • exp-nbm
    • imp-nbm
  • Unique trade data files:
    • exp-completa
    • imp-completa
    • exp-mun-completa
    • imp-mun-completa
  • Trade validation data:
    • exp-validacao
    • imp-validacao
    • exp-mun-validacao
    • imp-mun-validacao
  • Trade REPETRO:
    • exp-repetro
    • imp-repetro
  • Auxiliary tables:
    • ncm
    • sh
    • cuci
    • cgce
    • isic
    • siit
    • fat-agreg
    • unidade
    • ppi
    • ppe
    • grupo
    • pais
    • pais-bloco
    • uf
    • uf-mun
    • via
    • urf
    • isic-cuci
    • nbm
    • ncm-nbm

Data source: Ministério da Economia/Secretaria de Comércio Exterior

Development

To setup a development environment clone this repository and install the required packages:

git clone https://github.com/dankkom/comexdown.git
cd comexdown
pip install -e .[dev]

Run tests

To run the tests suite, use the following command:

 pip install -e .[dev]
 pytest tests/

About

A commandline utility to download Brazil's foreign trade data

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages