Hi all,
I've got a raw dataset in the following format:
where the value of indicatordescription is actually the variable (there are 50 of them in the full dataset). Ignore bbnum for now (don't know what that is). But, essentially, I'd like to get this into the following format:
where, if possible, the label for SCB_cr is the previous value of indicator description (i.e. "SCBs credit: Agriculture"). Although this is not super crucial, as I will probably have to edit the labels anyway.
Would appreciate any help!
I've got a raw dataset in the following format:
indicatorcode | indicatordescription | regionid | regionname | bbnum | unit | value | year |
94408 | SCBs credit: Agriculture | 1000 | Vellore | 1004269 | Rs. million | 1889.3 | 2000 |
94408 | SCBs credit: Agriculture | 1000 | Vellore | 1004269 | Rs. million | 1925.7 | 2001 |
94408 | SCBs credit: Agriculture | 1000 | Vellore | 1004269 | Rs. million | 1901.5 | 2002 |
94408 | SCBs credit: Agriculture | 1000 | Vellore | 1004269 | Rs. million | 2253.7 | 2003 |
94408 | SCBs credit: Agriculture | 254 | Faizabad | 1002577 | Rs. million | 9107.3 | 2016 |
94408 | SCBs credit: Agriculture | 254 | Faizabad | 1002577 | Rs. million | 10302.2 | 2017 |
94408 | SCBs credit: Agriculture | 254 | Faizabad | 1002577 | Rs. million | 12951.6 | 2018 |
94408 | SCBs credit: Agriculture | 256 | Farrukhabad | 1002580 | Rs. million | 1070.6 | 2000 |
region_id | region_name | SCB_cr | year |
1000 | Vellore | 1889.3 | 2000 |
1000 | Vellore | 1925.7 | 2001 |
1000 | Vellore | 1901.5 | 2002 |
1000 | Vellore | 2253.7 | 2003 |
254 | Faizabad | 9107.3 | 2016 |
254 | Faizabad | 10302.2 | 2017 |
254 | Faizabad | 12951.6 | 2018 |
256 | Farrukhabad | 1070.6 | 2000 |
Would appreciate any help!
Comment