The StarThinker project will no longer receive new solution contributions from the Google team.
Please read the full StarThinker Open Source Support Ends At Google article for more details.



All

analytics Census Data Normalized

Convert given census table to percent of population, normalizing it.



lock_openGet Access listGit Hub sourcePython menu_bookColab airAirflow



Instructions

Specify the geography, year, and span that make up the census table names.
Not every combination of geography, year, and span exists or contains all the required fields.
Every time the query runs it will overwrite the table.

Details

Open Source YES
Age July 6, 2020 (2 years, 6 months)
Authors kenjora@google.com
Shedule Days Configured by user.
Shedule Hours Configured by user.
[
    {
        "census": {
            "auth": {
                "field": {
                    "name": "auth",
                    "kind": "authentication",
                    "order": 0,
                    "default": "service",
                    "description": "Credentials used for writing data."
                }
            },
            "normalize": {
                "census_geography": {
                    "field": {
                        "name": "census_geography",
                        "kind": "choice",
                        "order": 1,
                        "default": "zip_codes",
                        "description": "Census table to get data from.",
                        "choices": [
                            "zip_codes",
                            "state",
                            "zcta5",
                            "schooldistrictunified",
                            "puma",
                            "place",
                            "county",
                            "congressionaldistrict",
                            "censustract",
                            "cbsa"
                        ]
                    }
                },
                "census_year": {
                    "field": {
                        "name": "census_year",
                        "kind": "choice",
                        "order": 2,
                        "default": "2018",
                        "description": "Census table to get data from.",
                        "choices": [
                            2018,
                            2017,
                            2016,
                            2015,
                            2014,
                            2013,
                            2012,
                            2011,
                            2010,
                            2009,
                            2008,
                            2007
                        ]
                    }
                },
                "census_span": {
                    "field": {
                        "name": "census_span",
                        "kind": "choice",
                        "order": 3,
                        "default": "5yr",
                        "description": "Census table to get data from.",
                        "choices": [
                            "1yr",
                            "3yr",
                            "5yr"
                        ]
                    }
                }
            },
            "to": {
                "dataset": {
                    "field": {
                        "name": "dataset",
                        "kind": "string",
                        "order": 4,
                        "default": "",
                        "description": "Existing BigQuery dataset."
                    }
                },
                "type": {
                    "field": {
                        "name": "type",
                        "kind": "choice",
                        "order": 5,
                        "default": "table",
                        "description": "Write Census_Percent as table or view.",
                        "choices": [
                            "table",
                            "view"
                        ]
                    }
                }
            }
        }
    }
]


Run This Workflow In Minutes On Google Cloud

Everything from a quick Google Cloud UI to reference developer code for your team in one GitHub repository.

Deployment Stepslaunch Developer Guidebuild UI How Tolaptop