Git Product home page Git Product logo

data's Introduction

Codes for research data sets

DOI

This repository contains Python 3 modules that retrieve, clean, subset and otherwise transform various data sets used in research. The objective is to abstract these tasks and keep them separate from research code that performs actual analysis on the data.

  • ceic — CEIC Data's China Premium Database
  • chip — China Household Income Project
  • chfs — China Household Finance Survey
  • cn_nbs — National Bureau of Statistics of China

The modules are largely independent but have a roughly similar API. Each module…

  • contains a method like load_ceic() that returns data in a clean, Pythonic form.
  • may contain a method like import_ceic() that processes raw data sets into a cache in the directory of the name (e.g. ceic/ for ceic.py).
  • can be invoked as a command-line program, e.g. python3 -m ceic. Invoking a module without any arguments gives basic usage instructions, but the code is also documented.
  • may make use of a configuration file in the directory of the same name. Example configuration files are provided.

The variable requirements in the top-level module gives the dependencies for each module.

If you use this code, please cite using the DOI above.

data's People

Contributors

khaeru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

data's Issues

China CPI query

Thank you for these scripts!

I'm trying to use it (or actualize if needed) for National Bureau of Statistics of China API. However, I can't find any docs with available idicators codes:
- *series*: the indicator requested, e.g. 'A090302'.
Unfortunately, the english version on data.stats.gov.cn is not very informative ...

Can you please suggest where to look for indicators list or suggest the indicator code for the main Consumer Price Index (CPI) monthly data query?

Example not working

The example request given in the docstring of load_nbs_web is not working.

Running

import requests
url = 'http://data.stats.gov.cn/english/easyquery.htm?m=QueryData&dbcode=fsnd&rowcode=reg&colcode=sj&wds=[{"wdcode":"zb","valuecode":"A090201"}]&dfwds=[{"wdcode":"sj","valuecode":"1995-2014"}]&k1=1472740901192'

res = requests.get(url, verify=False)

print(res.status_code)

returns 404

Freeze requirements

Add:

  • a requirements.txt in each data set directory that contains the requirements for running each code.
  • a Makefile target to install these using pip.

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.