ClimateInequality / PrjCEC

China Environment Children
1 stars 0 forks source link

tabfig: Visualize changes for regions/provinces #37

Open FanWangEcon opened 7 months ago

FanWangEcon commented 7 months ago

Visualize changes for regions/provicnes

Show in table and figure changes in temperature exposure for the average child in different regions/provinces.

Outputs

Tabule A1 and A2, region/provinces-by-region-group are rows, and different temperatures are columns

Table A1 considers three hotter temperature levels, 32, 35 and 38. First two grouped together as Strong heat stress. Table A2 considers three less hot heat thresholds, 23, 26, 29, the latter two grouped as moderate heat stress. The table jointly emphasize that for different locations, different thresholds might be relevant, depending on prior share of time above, and changes.

Figure A outputs:

Algorithm

Step 1 Generate data structures for outputs

To implement the outputs:

  1. Generate and load four data files with the same structure for region-or-province/year 2 by 2 combos
  2. Stack outputs together to single file
  3. Reshape time/year from long to wide
  4. Generate points changes and percentage change columns, out as input for Figure B adn C.
  5. Reshape temperature levels from long to wide, locations as rows, out as input for Table A1 and A2 with separately selected temperature levels.

Note parts (1) through (4) follow from step 1 of #34.

Step 2, generate Table A1 and A2

Single file that generate both tables, given similarity.

  1. Select three points interval temp levels
  2. All regions, vs province by region comparisons
  3. Count by group
  4. Format columns, decimals, percentage signs, etc
  5. Generate table, with column names, groupings, and standard code blocks
FanWangEcon commented 7 months ago

Central: Anhui,Henan,Hubei,Hunan,Jiangxi,Shanxi Eastern: Beijing,Fujian,Guangdong,Hainan,Hebei,Jiangsu,Shandong,Shanghai,Tianjin,Zhejiang Northeastern: Heilongjiang,Jilin,Liaoning Western: Chongqing,Gansu,Guangxi,Guizhou,Inner Mongolia,Ningxia,Qinghai,Shaanxi,Sichuan,Tibet,Xinjiang,Yunnan