Giter Site home page Giter Site logo

aidelabaz / weather_and_agriculture Goto Github PK

View Code? Open in Web Editor NEW
6.0 0.0 7.0 937 KB

AIDE Lab repository for LSMS-ISA and remotely sensed weather data cleaning code.

License: MIT License

Stata 100.00%
economics remote-sensing agriculture measurement-error africa econometrics

weather_and_agriculture's Introduction

Weather and Agriculture: Cleaning code for LSMS-ISA and remotely sensed weather data integration project

This repository acts as the mother ship for a number of other repositories that hold replication code for papers sprining from the main project. The main project site is on OSF and has the goal of exploring a variety of issues that arise when remotely sensed weather data is integrated with socioeconomic survey data. The dependency or subsidiary repos from this repo include replication packages for:

Because the weather data contains confidential information, it is not publically available. This means the weather code will not function, as that data is held by the World Bank. Contact Drs. Jeffrey D. Michler or Anna Josephson and they can share an intermediate - de-identified - version of the weather data for use in replicating the results.

This README was last updated on 3 September 2024.

Index

Project Team

Contributors:

  • Jeffrey D. Michler [[email protected]] (Conceptualizaiton, Supervision, Visualization, Writing)
  • Anna Josephson [[email protected]] (Conceptualizaiton, Supervision, Visualization, Writing)
  • Talip Kilic (Conceptualization, Resources, Writing)
  • Siobhan Murray (Conceptualization, Writing)
  • Brian McGreal (Data curation)
  • Alison Conley (Data curation)
  • Emil Kee-Tui (Data curation)
  • Reece Branham (Data curation)
  • Rodrigo Guerra Su (Data curation)
  • Jacob Taylor (Data curation)
  • Kieran Douglas (Data curation)

Data cleaning

The code in this repository is primarily for replicating the cleaning of the household LSMS-ISA data. This requires downloading this repo and the household data from the World Bank webiste. The projectdo.do should then replicate the data cleaning process.

Pre-requisites

Stata req's

  • The data processing and analysis requires a number of user-written Stata programs:
    1. weather_command
    2. blindschemes
    3. estout
    4. winsor2
    5. mdesc
    6. distinct

Folder structure

The OSF project page provides more details on the data cleaning.

For the household cleaning code to run, the public use microdata must be downloaded from the World Bank Microdata Library. Furthermore, the data needs to be placed in the following folder structure:

weather_and_agriculture
├────household_data      
│    └──country          /* one dir for each country */
│       ├──wave          /* one dir for each wave */
│       └──logs
├──weather_data
│    └──country          /* one dir for each country */
│       ├──wave          /* one dir for each wave */
│       └──logs
├──merged_data
│    └──country          /* one dir for each country */
│       ├──wave          /* one dir for each wave */
│       └──logs
├──regression_data
│    ├──country          /* one dir for each country */
│    └──logs
└────results_data        /* overall analysis */
     ├──tables
     ├──figures
     └──logs

weather_and_agriculture's People

Contributors

aljosephson avatar chandrakantagme avatar jdavidm avatar jtaylor125 avatar kierancdouglas avatar rbrnhm avatar rguerrasu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

weather_and_agriculture's Issues

total value of production - all crops (local currency)

In Uganda we generate crop value in two ways, one imputing value based on sold amount and the other calculating local prices and imputing values based on prices times quantity. The first one is what we used in Uganda while the other method is used in other countries. The first method results in lower crop values. Based on summary stats in the populated PAP Uganda has much lower yields and much lower crop value than other countries. Once all waves are completed we should reassess the decision about which value imputation method to use.

Almost 2/3 of the values in sold data are 0 in 2019_agsec5a

Describe the bug
Line 305 under section 4 (generating sold harvest values) attemps to replace zeros in sold data as missing. When you run it, ~2/3 of the values are then converted to missing (3932).

To Reproduce
Steps to reproduce the behavior:

  1. Go to line 304 in 2019_agsec5a
  2. Run line: replace s5aq07a_1 = . if s5aq07a_1 == 0
  3. Converts 3932 to missing

Screenshots
Screenshot 2024-05-10 at 11 35 03 AM

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.