-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b74065
commit 7600586
Showing
29 changed files
with
3,531 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
_freeze/blog/2024/07/life tables/index/execute-results/html.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"hash": "47cf275d884bbc1f8a636100b1ea68f3", | ||
"result": { | ||
"engine": "knitr", | ||
"markdown": "---\ntitle: \"charting state demographics\"\ndate: now\ndescription: \"virginia population pyramids\"\nformat:\n html:\n css: styles.css\n code-fold: false\n code-tools: true\n code-overflow: wrap\n code-line-numbers: false\nresources:\n - \"VA_pop_demo_data.txt\"\n#doi: \ncitation: true\ndraft: true\n---\n\n\n\n\n## consider everything that grows\n:::{.callout-note}\nMost of the headings are taken from the verses of Shakespeare's [Sonnet 15](https://www.poetryfoundation.org/poems/45086/sonnet-15-when-i-consider-everything-that-grows)\n:::\n\nPopulation pyramids give us a clear picture of the growth and “health” of a country, its states down to its counties. I came across the pyramids in one of my geography classes while living in Cuba. I thought they were pretty cool because I was obsessed with history^[especially Ancient Egypt, the Bible, and the Roman Empire], thought they were connected to Ancient Egypt, and I could actually see how human movement into and out of existence affected my society and the economy in a very real sense. If the person who sold rice, sugar, flour, meat, or eggs, passed away, well now you have to go without it or find someone else who, taking advantage of the new vacancy, will jack up the prices. My generation saw a considerable decline in the number of children. We just simply didn't have the means to feed and keep multiple kids. Senior citizens, likewise, weren't many because we lacked the resources to effectively deal with naturally-occurring diseases and ailments in the elderly population. Most of my grandparents lived to be 90+, but they were the exception. I could clearly see all of this in the population pyramid of my generation.\n\n\n::: {.cell layout-align=\"center\"}\n\n:::\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\npath <- here::here(\"blog\",\"2024\",\"07\",\"life tables\",\n \"un_cuba.txt\")\ncuba_df <- read.delim(path, sep = \"\") |>\n rename(values = Value) |>\n mutate(values = as.double(format(values, scientific = FALSE)),\n Indicator = as.factor(IndicatorName), .before = Location) |>\n select(-IndicatorId,-IndicatorShortName,\n -IndicatorName,\n -Source,-SourceYear,\n -Author,-LocationId,\n -Iso2,Iso3,\n -TimeId,-VariantId,\n -Variant,-SexId,\n -AgeId,-AgeStart,\n -AgeEnd,-CategoryId,\n -Category,-EstimateTypeId,\n -EstimateType,-EstimateMethodId,\n -EstimateMethod)\n```\n:::\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\nbase_path <- here::here(\"blog\",\"2024\",\"07\",\"life tables\",\"Va_pop_demo_data.txt\")\nva_demo_dat <- read.delim(base_path, sep = \"\\t\")\nva_demo_dat <- va_demo_dat |> \n mutate(age_range = paste(Starting.Age, Ending.Age, \n sep = \"-\")) |>\n mutate(gender = as.factor(Gender))|>\n group_by(Year,gender) |>\n mutate(percent = Total_Population / sum(Total_Population) * 100) |>\n select(-Starting.Age, -Ending.Age, -ID_Gender,\n -ID_Geography,-Slug_Geography, -Gender)\n\nglimpse(va_demo_dat)\n```\n:::\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\nva_dat_2022 <- va_demo_dat |> filter(Year == 2022) |>\n ggplot(aes(percent,age_range, fill = gender)) +\n geom_col() +\n scale_fill_manual(values = va_clrs[c(3,5)])\n```\n:::", | ||
"supporting": [], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
_freeze/blog/2024/07/pyramids/index/execute-results/html.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"hash": "2712a389fb7433f8ed07f7d3a45360cf", | ||
"result": { | ||
"engine": "knitr", | ||
"markdown": "---\ntitle: \"charting state demographics\"\ndate: now\ndescription: \"virginia population pyramids\"\nformat:\n html:\n css: styles.css\n code-fold: false\n code-tools: true\n code-overflow: wrap\n code-line-numbers: false\nresources:\n - \"VA_pop_demo_data.txt\"\n#doi: \ncitation: true\ndraft: true\n---\n\n\n\n\n## consider everything that grows\n:::{.callout-note}\nMost of the headings are taken from the verses of Shakespeare's [Sonnet 15](https://www.poetryfoundation.org/poems/45086/sonnet-15-when-i-consider-everything-that-grows)\n:::\n\nPopulation pyramids give us a clear picture of the growth and “health” of a country, its states down to its counties. I came across the pyramids in one of my geography classes while living in Cuba. I thought they were pretty cool because I was obsessed with history^[especially Ancient Egypt, the Bible, and the Roman Empire.], thought they were connected to Ancient Egypt, and I could actually see how human movement into and out of existence affected my society and the economy in a very real sense. If the person who sold rice, sugar, flour, meat, or eggs, passed away, well now you have to go without it or find someone else who, taking advantage of the new vacancy, will jack up the prices. My generation saw a considerable decline in the number of children. We just simply didn't have the means to feed and keep multiple kids. Senior citizens, likewise, weren't many because we lacked the resources to effectively deal with naturally-occurring diseases and ailments in the elderly population. Most of my grandparents lived to be 90+, but they were the exception. I could clearly see all of this in the population pyramid of my generation.\n\n\n::: {.cell layout-align=\"center\"}\n\n:::\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\npath <- here::here(\"blog\",\"2024\",\"07\",\"pyramids\",\"data\",\n \"un_cuba.txt\")\ncuba_df <- read.delim(path, sep = \"\") |>\n rename(values = Value) |>\n mutate(values = as.double(format(values, scientific = FALSE)),\n Indicator = as.factor(IndicatorName), .before = Location) |>\n select(-IndicatorId,-IndicatorShortName,\n -IndicatorName,\n -Source,-SourceYear,\n -Author,-LocationId,\n -Iso2,-Iso3,\n -TimeId,-VariantId,\n -Variant,-SexId,\n -AgeId,-AgeStart,\n -AgeEnd,-CategoryId,\n -Category,-EstimateTypeId,\n -EstimateType,-EstimateMethodId,\n -EstimateMethod)\n```\n:::\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\nbase_path <- here::here(\"blog\",\"2024\",\"07\",\"pyramids\",\"data\",\"Va_pop_demo_data.txt\")\nva_demo_dat <- read.delim(base_path, sep = \"\\t\")\nva_demo_dat <- va_demo_dat |> \n mutate(age_range = paste(Starting.Age, Ending.Age, \n sep = \"-\")) |>\n mutate(gender = as.factor(Gender))|>\n group_by(Year,gender) |>\n mutate(percent = Total_Population / sum(Total_Population) * 100) |>\n select(-Starting.Age, -Ending.Age, -ID_Gender,\n -ID_Geography,-Slug_Geography, -Gender)\n\nglimpse(va_demo_dat)\n```\n:::\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\nva_dat_2022 <- va_demo_dat |> filter(Year == 2022) |>\n ggplot(aes(percent,age_range, fill = gender)) +\n geom_col() +\n scale_fill_manual(values = va_clrs[c(3,5)])\n```\n:::", | ||
"supporting": [], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.