FAO_1.py 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. spec = {
  2. "name": "FAO",
  3. "title": (
  4. "Food and Agriculture Organization of the United Nations (FAO) "
  5. "FAOSTAT data set categorisation"
  6. ),
  7. "comment": "Needed to add FAOSTAT data to PRIMAP-hist",
  8. "references": "",
  9. "institution": "FAO",
  10. "hierarchical": True,
  11. "last_update": "2024-12-10",
  12. "version": "2024",
  13. "total_sum": True,
  14. "canonical_top_level_category": "0",
  15. "categories": {
  16. "0": {
  17. "title": "Total",
  18. "comment": "All emissions and removals",
  19. "children": [["1", "2", "3"]],
  20. },
  21. "1": {
  22. "title": "Crops",
  23. "comment": "Crops",
  24. "alternative_codes": "1",
  25. "children": [["1.A", "1.B"]],
  26. "info": {"gases": ["CH4", "N2O"]},
  27. },
  28. "2": {
  29. "title": "Energy use in agriculture",
  30. "comment": "Energy use in agriculture",
  31. "alternative_codes": "2",
  32. "children": [["2.A", "2.B", "2.C", "2.D", "2.E"]],
  33. "info": {"gases": ["CH4", "N2O", "CO2"]},
  34. },
  35. "3": {
  36. "title": "Livestock",
  37. "comment": "Livestock",
  38. "alternative_codes": "3",
  39. "children": [
  40. [
  41. "3.A",
  42. "3.B",
  43. "3.C",
  44. "3.D",
  45. "3.E",
  46. "3.F",
  47. "3.G",
  48. "3.H",
  49. "3.I",
  50. "3.J",
  51. "3.K",
  52. "3.L",
  53. "3.M",
  54. "3.N",
  55. "3.O",
  56. "3.P",
  57. "3.Q",
  58. "3.R",
  59. ]
  60. ],
  61. "info": {"gases": ["CH4", "N2O"]},
  62. },
  63. "1.A": {
  64. "title": "All crops",
  65. "comment": "All crops",
  66. "alternative_codes": "1A",
  67. "children": [
  68. [
  69. "1.A.1",
  70. "1.A.2",
  71. "1.A.3",
  72. "1.A.4",
  73. "1.A.5",
  74. "1.A.6",
  75. "1.A.7",
  76. "1.A.8",
  77. "1.A.9",
  78. "1.A.10",
  79. "1.A.11",
  80. "1.A.12",
  81. ]
  82. ],
  83. "info": {"gases": ["CH4", "N2O"]},
  84. },
  85. "1.A.1": {
  86. "title": "Wheat",
  87. "comment": "Wheat",
  88. "alternative_codes": ["1A1"],
  89. "info": {"gases": ["CH4", "N2O"]},
  90. "children": [["1.A.1.a", "1.A.1.b"]],
  91. },
  92. "1.A.1.a.i": {
  93. "title": "Wheat crop residues direct emissions",
  94. "comment": "Wheat crop residues direct emissions",
  95. "alternative_codes": ["1A1a"],
  96. "info": {"gases": ["N2O"]},
  97. },
  98. "1.A.1.a.ii": {
  99. "title": "Wheat crop residues indirect emissions",
  100. "comment": "Wheat crop residues indirect emissions",
  101. "alternative_codes": ["1A1ai"],
  102. "info": {"gases": ["N2O"]},
  103. },
  104. "1.A.1.a": {
  105. "title": "Wheat crop residues",
  106. "comment": "Wheat crop residues",
  107. "alternative_codes": ["1A1a"],
  108. "info": {"gases": ["N2O"]},
  109. "children": [["1.A.1.a.ii", "1.A.1.a.i"]],
  110. },
  111. "1.A.1.b": {
  112. "title": "Wheat burning crop residues",
  113. "comment": "Wheat burning crop residues",
  114. "alternative_codes": ["1A1b"],
  115. "info": {"gases": ["CH4", "N2O"]},
  116. },
  117. "1.A.2": {
  118. "title": "Rice",
  119. "comment": "Rice",
  120. "alternative_codes": ["1A2"],
  121. "info": {"gases": ["CH4", "N2O"]},
  122. "children": [["1.A.2.a", "1.A.2.b", "1.A.2.c"]],
  123. },
  124. "1.A.2.a.i": {
  125. "title": "Rice crop residues direct emissions",
  126. "comment": "Rice crop residues direct emissions",
  127. "alternative_codes": ["1A2a"],
  128. "info": {"gases": ["N2O"]},
  129. },
  130. "1.A.2.a.ii": {
  131. "title": "Rice crop residues indirect emissions",
  132. "comment": "Rice crop residues indirect emissions",
  133. "alternative_codes": ["1A2ai"],
  134. "info": {"gases": ["N2O"]},
  135. },
  136. "1.A.2.a": {
  137. "title": "Rice crop residues",
  138. "comment": "Rice crop residues",
  139. "alternative_codes": ["1A2a"],
  140. "info": {"gases": ["N2O"]},
  141. "children": [["1.A.2.a.ii", "1.A.2.a.i"]],
  142. },
  143. "1.A.2.b": {
  144. "title": "Rice burning crop residues",
  145. "comment": "Rice burning crop residues",
  146. "alternative_codes": ["1A2b"],
  147. "info": {"gases": ["CH4", "N2O"]},
  148. },
  149. "1.A.2.c": {
  150. "title": "Rice cultivation",
  151. "comment": "Rice cultivation",
  152. "alternative_codes": ["1A2c"],
  153. "info": {"gases": ["CH4"]},
  154. },
  155. "1.A.3": {
  156. "title": "Potatoes",
  157. "comment": "Potatoes",
  158. "alternative_codes": ["1A3"],
  159. "info": {"gases": "N2O"},
  160. "children": [["1.A.3.a"]],
  161. },
  162. "1.A.3.a.i": {
  163. "title": "Potatoes crop residues direct emissions",
  164. "comment": "Potatoes crop residues direct emissions",
  165. "alternative_codes": ["1A3a"],
  166. "info": {"gases": ["N2O"]},
  167. },
  168. "1.A.3.a.ii": {
  169. "title": "Potatoes crop residues indirect emissions",
  170. "comment": "Potatoes crop residues indirect emissions",
  171. "alternative_codes": ["1A3ai"],
  172. "info": {"gases": ["N2O"]},
  173. },
  174. "1.A.3.a": {
  175. "title": "Potatoes crop residues",
  176. "comment": "Potatoes crop residues",
  177. "alternative_codes": ["1A3a"],
  178. "info": {"gases": ["N2O"]},
  179. "children": [["1.A.3.a.ii", "1.A.3.a.i"]],
  180. },
  181. "1.A.4": {
  182. "title": "Millet",
  183. "comment": "Millet",
  184. "alternative_codes": ["1A4"],
  185. "info": {"gases": "N2O"},
  186. "children": [["1.A.4.a"]],
  187. },
  188. "1.A.4.a.i": {
  189. "title": "Millet crop residues direct emissions",
  190. "comment": "Millet crop residues direct emissions",
  191. "alternative_codes": ["1A4a"],
  192. "info": {"gases": ["N2O"]},
  193. },
  194. "1.A.4.a.ii": {
  195. "title": "Millet crop residues indirect emissions",
  196. "comment": "Millet crop residues indirect emissions",
  197. "alternative_codes": ["1A4ai"],
  198. "info": {"gases": ["N2O"]},
  199. },
  200. "1.A.4.a": {
  201. "title": "Millet crop residues",
  202. "comment": "Millet crop residues",
  203. "alternative_codes": ["1A4a"],
  204. "info": {"gases": ["N2O"]},
  205. "children": [["1.A.4.a.ii", "1.A.4.a.i"]],
  206. },
  207. "1.A.5": {
  208. "title": "Barley",
  209. "comment": "Barley",
  210. "alternative_codes": ["1A5"],
  211. "info": {"gases": "N2O"},
  212. "children": [["1.A.5.a"]],
  213. },
  214. "1.A.5.a.i": {
  215. "title": "Barley crop residues direct emissions",
  216. "comment": "Barley crop residues direct emissions",
  217. "alternative_codes": ["1A5a"],
  218. "info": {"gases": ["N2O"]},
  219. },
  220. "1.A.5.a.ii": {
  221. "title": "Barley crop residues indirect emissions",
  222. "comment": "Barley crop residues indirect emissions",
  223. "alternative_codes": ["1A5ai"],
  224. "info": {"gases": ["N2O"]},
  225. },
  226. "1.A.5.a": {
  227. "title": "Barley crop residues",
  228. "comment": "Barley crop residues",
  229. "alternative_codes": ["1A5a"],
  230. "info": {"gases": ["N2O"]},
  231. "children": [["1.A.5.a.ii", "1.A.5.a.i"]],
  232. },
  233. "1.A.6": {
  234. "title": "Maize (corn)",
  235. "comment": "Maize (corn)",
  236. "alternative_codes": ["1A6"],
  237. "info": {"gases": ["CH4", "N2O"]},
  238. "children": [["1.A.6.a", "1.A.6.b"]],
  239. },
  240. "1.A.6.a.i": {
  241. "title": "Maize (corn) crop residues direct emissions",
  242. "comment": "Maize (corn) crop residues direct emissions",
  243. "alternative_codes": ["1A6a"],
  244. "info": {"gases": ["N2O"]},
  245. },
  246. "1.A.6.a.ii": {
  247. "title": "Maize (corn) crop residues indirect emissions",
  248. "comment": "Maize (corn) crop residues indirect emissions",
  249. "alternative_codes": ["1A6ai"],
  250. "info": {"gases": ["N2O"]},
  251. },
  252. "1.A.6.a": {
  253. "title": "Maize (corn) crop residues",
  254. "comment": "Maize (corn) crop residues",
  255. "alternative_codes": ["1A6a"],
  256. "info": {"gases": ["N2O"]},
  257. "children": [["1.A.6.a.ii", "1.A.6.a.i"]],
  258. },
  259. "1.A.6.b": {
  260. "title": "Maize (corn) burning crop residues",
  261. "comment": "Maize (corn) burning crop residues",
  262. "alternative_codes": ["1A6b"],
  263. "info": {"gases": ["CH4", "N2O"]},
  264. },
  265. "1.A.7": {
  266. "title": "Sugar cane",
  267. "comment": "Sugar cane",
  268. "alternative_codes": ["1A7"],
  269. "info": {"gases": ["CH4", "N2O"]},
  270. "children": [["1.A.7.a", "1.A.7.b"]],
  271. },
  272. "1.A.7.a.i": {
  273. "title": "Sugar cane crop residues direct emissions",
  274. "comment": "Sugar cane crop residues direct emissions",
  275. "alternative_codes": ["1A7a"],
  276. "info": {"gases": ["N2O"]},
  277. },
  278. "1.A.7.a.ii": {
  279. "title": "Sugar cane crop residues indirect emissions",
  280. "comment": "Sugar cane crop residues indirect emissions",
  281. "alternative_codes": ["1A7ai"],
  282. "info": {"gases": ["N2O"]},
  283. },
  284. "1.A.7.a": {
  285. "title": "Sugar cane crop residues",
  286. "comment": "Sugar cane crop residues",
  287. "alternative_codes": ["1A7a"],
  288. "info": {"gases": ["N2O"]},
  289. "children": [["1.A.7.a.ii", "1.A.7.a.i"]],
  290. },
  291. "1.A.7.b": {
  292. "title": "Sugar cane burning crop residues",
  293. "comment": "Sugar cane burning crop residues",
  294. "alternative_codes": ["1A7b"],
  295. "info": {"gases": ["CH4", "N2O"]},
  296. },
  297. "1.A.8": {
  298. "title": "Beans, dry",
  299. "comment": "Beans, dry",
  300. "alternative_codes": ["1A8"],
  301. "info": {"gases": "N2O"},
  302. "children": [["1.A.8.a"]],
  303. },
  304. "1.A.8.a.i": {
  305. "title": "Beans, dry crop residues direct emissions",
  306. "comment": "Beans, dry crop residues direct emissions",
  307. "alternative_codes": ["1A8a"],
  308. "info": {"gases": ["N2O"]},
  309. },
  310. "1.A.8.a.ii": {
  311. "title": "Beans, dry crop residues indirect emissions",
  312. "comment": "Beans, dry crop residues indirect emissions",
  313. "alternative_codes": ["1A8ai"],
  314. "info": {"gases": ["N2O"]},
  315. },
  316. "1.A.8.a": {
  317. "title": "Beans, dry crop residues",
  318. "comment": "Beans, dry crop residues",
  319. "alternative_codes": ["1A8a"],
  320. "info": {"gases": ["N2O"]},
  321. "children": [["1.A.8.a.ii", "1.A.8.a.i"]],
  322. },
  323. "1.A.9": {
  324. "title": "Oats",
  325. "comment": "Oats",
  326. "alternative_codes": ["1A9"],
  327. "info": {"gases": "N2O"},
  328. "children": [["1.A.9.a"]],
  329. },
  330. "1.A.9.a.i": {
  331. "title": "Oats crop residues direct emissions",
  332. "comment": "Oats crop residues direct emissions",
  333. "alternative_codes": ["1A9a"],
  334. "info": {"gases": ["N2O"]},
  335. },
  336. "1.A.9.a.ii": {
  337. "title": "Oats crop residues indirect emissions",
  338. "comment": "Oats crop residues indirect emissions",
  339. "alternative_codes": ["1A9ai"],
  340. "info": {"gases": ["N2O"]},
  341. },
  342. "1.A.9.a": {
  343. "title": "Oats crop residues",
  344. "comment": "Oats crop residues",
  345. "alternative_codes": ["1A9a"],
  346. "info": {"gases": ["N2O"]},
  347. "children": [["1.A.9.a.ii", "1.A.9.a.i"]],
  348. },
  349. "1.A.10": {
  350. "title": "Rye",
  351. "comment": "Rye",
  352. "alternative_codes": ["1A10"],
  353. "info": {"gases": "N2O"},
  354. "children": [["1.A.10.a"]],
  355. },
  356. "1.A.10.a.i": {
  357. "title": "Rye crop residues direct emissions",
  358. "comment": "Rye crop residues direct emissions",
  359. "alternative_codes": ["1A10a"],
  360. "info": {"gases": ["N2O"]},
  361. },
  362. "1.A.10.a.ii": {
  363. "title": "Rye crop residues indirect emissions",
  364. "comment": "Rye crop residues indirect emissions",
  365. "alternative_codes": ["1A10ai"],
  366. "info": {"gases": ["N2O"]},
  367. },
  368. "1.A.10.a": {
  369. "title": "Rye crop residues",
  370. "comment": "Rye crop residues",
  371. "alternative_codes": ["1A10a"],
  372. "info": {"gases": ["N2O"]},
  373. "children": [["1.A.10.a.ii", "1.A.10.a.i"]],
  374. },
  375. "1.A.11": {
  376. "title": "Sorghum",
  377. "comment": "Sorghum",
  378. "alternative_codes": ["1A11"],
  379. "info": {"gases": "N2O"},
  380. "children": [["1.A.11.a"]],
  381. },
  382. "1.A.11.a.i": {
  383. "title": "Sorghum crop residues direct emissions",
  384. "comment": "Sorghum crop residues direct emissions",
  385. "alternative_codes": ["1A11a"],
  386. "info": {"gases": ["N2O"]},
  387. },
  388. "1.A.11.a.ii": {
  389. "title": "Sorghum crop residues indirect emissions",
  390. "comment": "Sorghum crop residues indirect emissions",
  391. "alternative_codes": ["1A11ai"],
  392. "info": {"gases": ["N2O"]},
  393. },
  394. "1.A.11.a": {
  395. "title": "Sorghum crop residues",
  396. "comment": "Sorghum crop residues",
  397. "alternative_codes": ["1A11a"],
  398. "info": {"gases": ["N2O"]},
  399. "children": [["1.A.11.a.ii", "1.A.11.a.i"]],
  400. },
  401. "1.A.12": {
  402. "title": "Soya beans",
  403. "comment": "Soya beans",
  404. "alternative_codes": ["1A12"],
  405. "info": {"gases": "N2O"},
  406. "children": [["1.A.12.a"]],
  407. },
  408. "1.A.12.a.i": {
  409. "title": "Soya beans crop residues direct emissions",
  410. "comment": "Soya beans crop residues direct emissions",
  411. "alternative_codes": ["1A12a"],
  412. "info": {"gases": ["N2O"]},
  413. },
  414. "1.A.12.a.ii": {
  415. "title": "Soya beans crop residues indirect emissions",
  416. "comment": "Soya beans crop residues indirect emissions",
  417. "alternative_codes": ["1A12ai"],
  418. "info": {"gases": ["N2O"]},
  419. },
  420. "1.A.12.a": {
  421. "title": "Soya beans crop residues",
  422. "comment": "Soya beans crop residues",
  423. "alternative_codes": ["1A12a"],
  424. "info": {"gases": ["N2O"]},
  425. "children": [["1.A.12.a.ii", "1.A.12.a.i"]],
  426. },
  427. "1.B": {
  428. "title": "Synthetic fertilisers",
  429. "comment": "Synthetic fertilisers",
  430. "alternative_codes": ["1B"],
  431. "info": {"gases": ["N2O"]},
  432. "children": [["1.B.1", "1.B.2"]],
  433. },
  434. "1.B.1": {
  435. "title": "Direct emissions",
  436. "comment": "Direct emissions",
  437. "alternative_codes": ["1B1"],
  438. "info": {"gases": ["N2O"]},
  439. },
  440. "1.B.2": {
  441. "title": "Indirect emissions",
  442. "comment": "Indirect emissions",
  443. "alternative_codes": ["1B2"],
  444. "info": {"gases": ["N2O"]},
  445. "children": [["1.B.2.a", "1.B.2.b"]],
  446. },
  447. "1.B.2.a": {
  448. "title": "Indirect emissions that volatilise",
  449. "comment": "Indirect emissions that volatilise",
  450. "alternative_codes": ["1B2a"],
  451. "info": {"gases": ["N2O"]},
  452. },
  453. "1.B.2.b": {
  454. "title": "Indirect emissions that leach",
  455. "comment": "Indirect emissions that leach",
  456. "alternative_codes": ["1B2b"],
  457. "info": {"gases": ["N2O"]},
  458. },
  459. "2.A": {
  460. "title": "Natural gas",
  461. "comment": "Natural gas",
  462. "alternative_codes": "2A",
  463. "info": {"gases": ["CH4", "N2O", "CO2"]},
  464. },
  465. "2.B": {
  466. "title": "Electricity",
  467. "comment": "Electricity",
  468. "alternative_codes": "2B",
  469. "info": {"gases": ["CH4", "N2O", "CO2"]},
  470. },
  471. "2.C": {
  472. "title": "Coal",
  473. "comment": "Coal",
  474. "alternative_codes": "2C",
  475. "info": {"gases": ["CH4", "N2O", "CO2"]},
  476. },
  477. "2.D": {
  478. "title": "Heat",
  479. "comment": "Heat",
  480. "alternative_codes": "2D",
  481. "info": {"gases": ["CH4", "N2O", "CO2"]},
  482. },
  483. "2.E": {
  484. "title": "Petroleum",
  485. "comment": "Petroleum",
  486. "alternative_codes": "2E",
  487. "info": {"gases": ["CH4", "N2O", "CO2"]},
  488. },
  489. "3.A": {
  490. "title": "Asses",
  491. "comment": "Asses",
  492. "alternative_codes": "3A",
  493. "info": {"gases": ["CH4", "N2O"]},
  494. },
  495. "3.B": {
  496. "title": "Camels",
  497. "comment": "Camels",
  498. "alternative_codes": "3B",
  499. "info": {"gases": ["CH4", "N2O"]},
  500. },
  501. "3.C": {
  502. "title": "Cattle, dairy",
  503. "comment": "Cattle, dairy",
  504. "alternative_codes": "3C",
  505. "info": {"gases": ["CH4", "N2O"]},
  506. },
  507. "3.D": {
  508. "title": "Cattle, non-dairy",
  509. "comment": "Cattle, non-dairy",
  510. "alternative_codes": "3D",
  511. "info": {"gases": ["CH4", "N2O"]},
  512. },
  513. "3.E": {
  514. "title": "Chickens, broilers",
  515. "comment": "Chickens, broilers",
  516. "alternative_codes": "3E",
  517. "info": {"gases": ["N2O"]},
  518. },
  519. "3.F": {
  520. "title": "Chickens, layers",
  521. "comment": "Chickens, layers",
  522. "alternative_codes": "3F",
  523. "info": {"gases": ["N2O"]},
  524. },
  525. "3.G": {
  526. "title": "Goats",
  527. "comment": "Goats",
  528. "alternative_codes": "3G",
  529. "info": {"gases": ["CH4", "N2O"]},
  530. },
  531. "3.H": {
  532. "title": "Horses",
  533. "comment": "Horses",
  534. "alternative_codes": "3H",
  535. "info": {"gases": ["CH4", "N2O"]},
  536. },
  537. "3.I": {
  538. "title": "Mules and hinnies",
  539. "comment": "Mules and hinnies",
  540. "alternative_codes": "3I",
  541. "info": {"gases": ["CH4", "N2O"]},
  542. },
  543. "3.J": {
  544. "title": "Sheep",
  545. "comment": "Sheep",
  546. "alternative_codes": "3J",
  547. "info": {"gases": ["CH4", "N2O"]},
  548. },
  549. "3.K": {
  550. "title": "Llamas",
  551. "comment": "Llamas",
  552. "alternative_codes": "3K",
  553. "info": {"gases": ["CH4", "N2O"]},
  554. },
  555. "3.L": {
  556. "title": "Chickens",
  557. "comment": "Chickens",
  558. "alternative_codes": "3L",
  559. "info": {"gases": ["N2O"]},
  560. },
  561. "3.M": {
  562. "title": "Poultry Birds",
  563. "comment": "Poultry Birds",
  564. "alternative_codes": "3M",
  565. "info": {"gases": ["N2O"]},
  566. },
  567. "3.N": {
  568. "title": "Buffalo",
  569. "comment": "Buffalo",
  570. "alternative_codes": "3N",
  571. "info": {"gases": ["CH4", "N2O"]},
  572. },
  573. "3.O": {
  574. "title": "Ducks",
  575. "comment": "Ducks",
  576. "alternative_codes": "3O",
  577. "info": {"gases": ["N2O"]},
  578. },
  579. "3.P": {
  580. "title": "Swine, breeding",
  581. "comment": "Swine, breeding",
  582. "alternative_codes": "3P",
  583. "info": {"gases": ["CH4", "N2O"]},
  584. },
  585. "3.Q": {
  586. "title": "Swine, market",
  587. "comment": "Swine, market",
  588. "alternative_codes": "3Q",
  589. "info": {"gases": ["CH4", "N2O"]},
  590. },
  591. "3.R": {
  592. "title": "Turkeys",
  593. "comment": "Turkeys",
  594. "alternative_codes": "3R",
  595. "info": {"gases": ["N2O"]},
  596. },
  597. },
  598. }