Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tabfig: Visualize changes for regions/provinces #37

Open
FanWangEcon opened this issue Feb 7, 2024 · 1 comment
Open

tabfig: Visualize changes for regions/provinces #37

FanWangEcon opened this issue Feb 7, 2024 · 1 comment
Assignees
Labels

Comments

@FanWangEcon
Copy link
Member

FanWangEcon commented Feb 7, 2024

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

  • rows: regions first, than provinces by regional groups
  • row-groups: Regional groupings
  • col 1-4: One temperature level
  • col 5-8: Another temperature level
  • col 9-12: Another temperature level
  • col 1/5/9: level in 1980
  • col 2/6/10: level in 2020
  • col 3/7/11: percentage points chnages
  • col 4/8/12: percentage change

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:

  • Kai existing figure replicate

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 FanWangEcon self-assigned this Feb 7, 2024
@FanWangEcon
Copy link
Member Author

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

FanWangEcon added a commit that referenced this issue Feb 10, 2024
- Code for generating input files for table 1a, 1b, and potential figures.
- Code for generating and output text friles for:
    - Table 1a, higher heat burden thresholds as columns table
    - Table 1b, slightly lower heat burden thresholds as columns table
FanWangEcon added a commit that referenced this issue Feb 20, 2024
- Figure a input file, but not connected to prior figure code
- Minor wording changes for tables
FanWangEcon added a commit that referenced this issue Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant