You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`yarn install`| Install or reinstall dependencies |
59
+
|`yarn dev`| Start local preview server |
60
+
|`yarn build`| Build your static site, generating `./dist`|
61
+
|`yarn deploy`| Deploy your project to Observable |
62
+
|`yarn clean`| Clear the local data loader cache |
63
+
|`yarn observable`| Run commands like `observable help`|
64
64
65
65
## GPT-4 reference
66
66
@@ -93,14 +93,14 @@ Example plot of this data: https://s13.gifyu.com/images/SCGH2.gif (code here: ht
93
93
94
94
Example visualization: live demo here - https://jaanli.github.io/american-community-survey/ (visualization code [here](https://github.com/jaanli/american-community-survey/))
## Usage for 2022 ACS Public Use Microdata Sample (PUMS) Data
124
124
125
125
To retrieve the list of URLs from the Census Bureau's server and download and extract the archives for all of the 50 states' PUMS files, run the following:
126
+
127
+
```
128
+
cd data_processing
129
+
dbt run --select "public_use_microdata_sample.list_urls" \
Then execute these generated SQL queries using 1 thread (you can adjust this number to be higher depending on the available processor cores on your system):
@@ -284,12 +318,12 @@ Check that you can execute a SQL query against these files:
284
318
```
285
319
duckdb -c "SELECT COUNT(*) FROM '~/data/american_community_survey/*individual_people_united_states*2021.parquet'"
286
320
```
287
-
1. Create a data visualization using the compressed parquet files by adding to the `american_community_survey/models/public_use_microdata_sample/figures` directory, and using examples from here https://github.com/jaanli/american-community-survey/ or here https://github.com/jaanli/lonboard/blob/example-american-community-survey/examples/american-community-survey.ipynb
321
+
6. Create a data visualization using the compressed parquet files by adding to the `data_processing/models/public_use_microdata_sample/figures` directory, and using examples from here https://github.com/jaanli/american-community-survey/ or here https://github.com/jaanli/lonboard/blob/example-american-community-survey/examples/american-community-survey.ipynb
288
322
289
-
To save time, there is a bash script with these steps in `scripts/process_one_year_of_american_community_survey_data.sh` that can be used as follows:
323
+
To save time, there is a bash script with these steps in `scripts/process_one_year_of_data_processing_data.sh` that can be used as follows:
Copy file name to clipboardexpand all lines: data_processing/models/public_use_microdata_sample/generated/2022/enum_types_mapped_renamed/housing_units_alabama_enum_mapped_renamed_2022.sql
+2-2
Original file line number
Diff line number
Diff line change
@@ -905,7 +905,7 @@ CASE FYRBLTP
905
905
WGTP78::VARCHARAS"Housing Weight replicate 78",
906
906
WGTP79::VARCHARAS"Housing Weight replicate 79",
907
907
WGTP80::VARCHARAS"Housing Weight replicate 80",
908
-
FROM read_csv('/Users/me/data/american_community_survey/2022/1-Year/csv_hal/psam_h01.csv',
908
+
FROM read_csv('~/data/american_community_survey/2022/1-Year/csv_hal/psam_h01.csv',
Copy file name to clipboardexpand all lines: data_processing/models/public_use_microdata_sample/generated/2022/enum_types_mapped_renamed/housing_units_alaska_enum_mapped_renamed_2022.sql
+2-2
Original file line number
Diff line number
Diff line change
@@ -905,7 +905,7 @@ CASE FYRBLTP
905
905
WGTP78::VARCHARAS"Housing Weight replicate 78",
906
906
WGTP79::VARCHARAS"Housing Weight replicate 79",
907
907
WGTP80::VARCHARAS"Housing Weight replicate 80",
908
-
FROM read_csv('/Users/me/data/american_community_survey/2022/1-Year/csv_hak/psam_h02.csv',
908
+
FROM read_csv('~/data/american_community_survey/2022/1-Year/csv_hak/psam_h02.csv',
Copy file name to clipboardexpand all lines: data_processing/models/public_use_microdata_sample/generated/2022/enum_types_mapped_renamed/housing_units_arizona_enum_mapped_renamed_2022.sql
+2-2
Original file line number
Diff line number
Diff line change
@@ -905,7 +905,7 @@ CASE FYRBLTP
905
905
WGTP78::VARCHARAS"Housing Weight replicate 78",
906
906
WGTP79::VARCHARAS"Housing Weight replicate 79",
907
907
WGTP80::VARCHARAS"Housing Weight replicate 80",
908
-
FROM read_csv('/Users/me/data/american_community_survey/2022/1-Year/csv_haz/psam_h04.csv',
908
+
FROM read_csv('~/data/american_community_survey/2022/1-Year/csv_haz/psam_h04.csv',
Copy file name to clipboardexpand all lines: data_processing/models/public_use_microdata_sample/generated/2022/enum_types_mapped_renamed/housing_units_arkansas_enum_mapped_renamed_2022.sql
+2-2
Original file line number
Diff line number
Diff line change
@@ -905,7 +905,7 @@ CASE FYRBLTP
905
905
WGTP78::VARCHARAS"Housing Weight replicate 78",
906
906
WGTP79::VARCHARAS"Housing Weight replicate 79",
907
907
WGTP80::VARCHARAS"Housing Weight replicate 80",
908
-
FROM read_csv('/Users/me/data/american_community_survey/2022/1-Year/csv_har/psam_h05.csv',
908
+
FROM read_csv('~/data/american_community_survey/2022/1-Year/csv_har/psam_h05.csv',
Copy file name to clipboardexpand all lines: data_processing/models/public_use_microdata_sample/generated/2022/enum_types_mapped_renamed/housing_units_california_enum_mapped_renamed_2022.sql
+2-2
Original file line number
Diff line number
Diff line change
@@ -905,7 +905,7 @@ CASE FYRBLTP
905
905
WGTP78::VARCHARAS"Housing Weight replicate 78",
906
906
WGTP79::VARCHARAS"Housing Weight replicate 79",
907
907
WGTP80::VARCHARAS"Housing Weight replicate 80",
908
-
FROM read_csv('/Users/me/data/american_community_survey/2022/1-Year/csv_hca/psam_h06.csv',
908
+
FROM read_csv('~/data/american_community_survey/2022/1-Year/csv_hca/psam_h06.csv',
Copy file name to clipboardexpand all lines: data_processing/models/public_use_microdata_sample/generated/2022/enum_types_mapped_renamed/housing_units_colorado_enum_mapped_renamed_2022.sql
+2-2
Original file line number
Diff line number
Diff line change
@@ -905,7 +905,7 @@ CASE FYRBLTP
905
905
WGTP78::VARCHARAS"Housing Weight replicate 78",
906
906
WGTP79::VARCHARAS"Housing Weight replicate 79",
907
907
WGTP80::VARCHARAS"Housing Weight replicate 80",
908
-
FROM read_csv('/Users/me/data/american_community_survey/2022/1-Year/csv_hco/psam_h08.csv',
908
+
FROM read_csv('~/data/american_community_survey/2022/1-Year/csv_hco/psam_h08.csv',
Copy file name to clipboardexpand all lines: data_processing/models/public_use_microdata_sample/generated/2022/enum_types_mapped_renamed/housing_units_connecticut_enum_mapped_renamed_2022.sql
+2-2
Original file line number
Diff line number
Diff line change
@@ -905,7 +905,7 @@ CASE FYRBLTP
905
905
WGTP78::VARCHARAS"Housing Weight replicate 78",
906
906
WGTP79::VARCHARAS"Housing Weight replicate 79",
907
907
WGTP80::VARCHARAS"Housing Weight replicate 80",
908
-
FROM read_csv('/Users/me/data/american_community_survey/2022/1-Year/csv_hct/psam_h09.csv',
908
+
FROM read_csv('~/data/american_community_survey/2022/1-Year/csv_hct/psam_h09.csv',
0 commit comments