mospiR
R client for the MoSPI Microdata Portal that searches and downloads NSS, PLFS, ASI, HCES and other survey unit-level data
mospir.saketlab.orgmospiR is an R package from Saket Lab at IIT Bombay for fetching unit-level survey data from microdata.gov.in, the Ministry of Statistics’ microdata portal. It turns downloading through the portal into a few lines of code.
It does four things:
list_datasets()lists every dataset on the portal, with a keyword filter such as “labour force”.list_files()shows the files inside a survey round, with their sizes.download_file()fetches a single file.download_dataset()fetches an entire survey round into a folder.
This covers the National Sample Survey rounds, the Periodic Labour Force Survey, the Annual Survey of Industries, the Household Consumption Expenditure Survey and anything else on the portal. Failed requests are retried with exponential backoff.
You still need a free API key from microdata.gov.in, stored in .Renviron. The package only downloads the raw files. Reading them is a separate job, and the same lab’s nesstarR package parses the older Nesstar-format files that many NSS rounds come in.
Details
- Kind
- Tool
- Run by
- Academic
- Topics
- Where
- India
- Licence
- Open licence
- Cost
- Free
- Licence terms
- MIT
People
API
- Not available