epogrebnyak / data-rosstat-kep

Time series dataset of Rosstat Short-term Economic Indicators ("KEP") publication
http://www.gks.ru/wps/wcm/connect/rosstat_main/rosstat/ru/statistics/publications/catalog/doc_1140080765391
6 stars 6 forks source link

Refine and extend texting of rs.inputs.py and rs.rs.py #97

Closed epogrebnyak closed 8 years ago

epogrebnyak commented 8 years ago

rs.rs.py and linked files allow reading raw data and parsing specification + producting output as stream of flat dictionaries, which can be stored in database or transformed to pandas dataframes.

rs.rs.py bottom section also demonstartes some rs methods for diagnostics.

Todo:

Minor todo:

Notes:

epogrebnyak commented 8 years ago

write_temp_files() must write to tempdata

TEMPDATA_DIR = "path to tempdata directory from config"

class TestfolderFile(File):

    def __init__(self, filename):
        self.filename=os.path.join(TEMPDATA_DIR, filename)

def write_tempdata():        
    TestfolderFile('temp.txt').save_text("123456")       
    return TEMPDATA_DIR