{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Data Observatory\n", "\n", "CARTO's Data Observatory is a spatial data platfrom that enables data scientists to augment their data and broaden their analyses by using thousands of datasets from around the globe.\n", "\n", "This guide is intended for those who want to start augmenting their data using CARTOframes and wish to explore CARTO's public Data Observatory catalog to find datasets that best fit their use cases and analyses.\n", "For further learning you can also check out the [Data Observatory examples](/developers/cartoframes/examples/#example-data-observatory)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Data Discovery\n", "\n", "The Data Obsevatory data catalog is comprised of thousands of curated spatial datasets. When searching for data the easiest way to find what you are looking for is to make use of a faceted search. A faceted (or hierarchical) search allows you to narrow down search results by applying multiple filters based on the faceted classification of catalog datasets. For more information check the [data discovery example](/developers/cartoframes/examples/#example-discover-a-dataset).\n", "\n", "Datasets are organized in these main hierarchies: country, category, provider and geography (or spatial resolution).\n", "\n", "> The catalog is public and you don't need a CARTO account to search for available datasets. You can access the web version of the catalog [here](https://carto.com/spatial-data-catalog)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Dataset and variables metadata\n", "\n", "The Data Observatory catalog is not only a repository of curated spatial datasets, it also contains valuable information that helps better understand the underlying data of every dataset so you can make an informed decision on what data best fits your problem.\n", "\n", "Some of the augmented metadata you can find for each dataset in the catalog is:\n", "\n", "- `head` and `tail` methods to get a glimpse of the actual data. This helps you to understand the available columns, data types, etc., to start modelling your problem right away.\n", "- `geom_coverage` to visualize on a map the geographical coverage of the data in the `Dataset`.\n", "- `counts`, `fields_by_type` and a full `describe` method with stats of the actual values in the dataset, such as: average, stdev, quantiles, min, max, median for each of the variables of the dataset.\n", "\n", "You don't need a subscription to a dataset to be able to query the augmented metadata, it's publicly available for anyone exploring the Data Observatory catalog.\n", "\n", "Let's review some of that information, starting by getting a glimpse of the ten first or last rows of the actual data of the dataset:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
DWLCYDWLPYHHDCYHHDPYPOPCYPOPPYgeoidVPHCY1do_dateAGECYMED...MARCYDIVORMARCYNEVERMARCYWIDOWRCHCYAMNHSRCHCYASNHSRCHCYBLNHSRCHCYHANHSRCHCYMUNHSRCHCYOTNHSRCHCYWHNHS
010571112932986150016480401304050714422020-01-01 00:00:00+00:0077.40...14942280112002501317
119642069177418772595286804013040507210492020-01-01 00:00:00+00:0076.88...4141606990746875502167
210491101897933158517160401306101824602020-01-01 00:00:00+00:0069.88...312172462554392601313
310841137910940150316160401381750023922020-01-01 00:00:00+00:0071.44...19179268824380801290
468270657459198010390401900432412442020-01-01 00:00:00+00:0072.38...3044195390000902
5880910840869124912840601335110325392020-01-01 00:00:00+00:0076.75...1604031901361921251024
61467153413141467165818000605909951018312020-01-01 00:00:00+00:0074.58...42313649632261011601269
7704753693730107811760606102103913382020-01-01 00:00:00+00:0073.86...117632155337090986
81582169115531650254027950606102360018182020-01-01 00:00:00+00:0068.80...4064530151682631902183
91186126811631234198021760606102360024152020-01-01 00:00:00+00:0068.59...253602235972211001750
\n", "

10 rows × 110 columns

\n", "
" ], "text/plain": [ " DWLCY DWLPY HHDCY HHDPY POPCY POPPY geoid VPHCY1 \\\n", "0 1057 1112 932 986 1500 1648 040130405071 442 \n", "1 1964 2069 1774 1877 2595 2868 040130405072 1049 \n", "2 1049 1101 897 933 1585 1716 040130610182 460 \n", "3 1084 1137 910 940 1503 1616 040138175002 392 \n", "4 682 706 574 591 980 1039 040190043241 244 \n", "5 880 910 840 869 1249 1284 060133511032 539 \n", "6 1467 1534 1314 1467 1658 1800 060590995101 831 \n", "7 704 753 693 730 1078 1176 060610210391 338 \n", "8 1582 1691 1553 1650 2540 2795 060610236001 818 \n", "9 1186 1268 1163 1234 1980 2176 060610236002 415 \n", "\n", " do_date AGECYMED ... MARCYDIVOR MARCYNEVER \\\n", "0 2020-01-01 00:00:00+00:00 77.40 ... 149 4 \n", "1 2020-01-01 00:00:00+00:00 76.88 ... 414 160 \n", "2 2020-01-01 00:00:00+00:00 69.88 ... 31 217 \n", "3 2020-01-01 00:00:00+00:00 71.44 ... 191 79 \n", "4 2020-01-01 00:00:00+00:00 72.38 ... 30 44 \n", "5 2020-01-01 00:00:00+00:00 76.75 ... 160 40 \n", "6 2020-01-01 00:00:00+00:00 74.58 ... 423 136 \n", "7 2020-01-01 00:00:00+00:00 73.86 ... 117 63 \n", "8 2020-01-01 00:00:00+00:00 68.80 ... 406 45 \n", "9 2020-01-01 00:00:00+00:00 68.59 ... 253 60 \n", "\n", " MARCYWIDOW RCHCYAMNHS RCHCYASNHS RCHCYBLNHS RCHCYHANHS RCHCYMUNHS \\\n", "0 228 0 11 20 0 25 \n", "1 699 0 74 68 7 55 \n", "2 246 2 55 43 9 26 \n", "3 268 8 24 38 0 8 \n", "4 195 3 9 0 0 0 \n", "5 319 0 136 19 2 12 \n", "6 496 3 226 10 1 16 \n", "7 215 5 33 7 0 9 \n", "8 301 5 168 26 3 19 \n", "9 223 5 97 22 1 10 \n", "\n", " RCHCYOTNHS RCHCYWHNHS \n", "0 0 1317 \n", "1 0 2167 \n", "2 0 1313 \n", "3 0 1290 \n", "4 0 902 \n", "5 5 1024 \n", "6 0 1269 \n", "7 0 986 \n", "8 0 2183 \n", "9 0 1750 \n", "\n", "[10 rows x 110 columns]" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from cartoframes.data.observatory import Dataset\n", "\n", "dataset = Dataset.get('ags_sociodemogr_a7e14220')\n", "dataset.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Alternatively, you can get the last ten ones with `dataset.tail()`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "An overview of the coverage of the dataset" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", " None\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " \n", "\n", " \n", "\n", " \n", " \n", " \n", " \n", " \n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", "\n", "\n", " Static map image\n", " \n", " \n", "
\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", "
\n", "\n", " \n", "\n", "
\n", "
\n", " :\n", "
\n", " \n", " \n", "
\n", "
\n", "\n", "
\n", " StackTrace\n", "
    \n", "
    \n", "
    \n", "\n", "\n", "\n", "\n", "\n", "\">\n", "\n", "" ], "text/plain": [ "" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset.geom_coverage()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Some stats about the dataset:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "rows 217182.0\n", "cells 23890020.0\n", "null_cells 0.0\n", "null_cells_percent 0.0\n", "dtype: float64" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset.counts()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "float 5\n", "string 2\n", "integer 102\n", "timestamp 1\n", "dtype: int64" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset.fields_by_type()" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    POPCYPOPCYGRPPOPCYGRPIAGECY0004AGECY0509AGECY1014AGECY1519AGECY2024AGECY2529AGECY3034...DWLCYVACNTDWLCYRENTDWLCYOWNEDPOPPYHHDPYDWLPYAGEPYMEDINCPYPCAPINCPYAVEHHINCPYMEDHH
    avg1520.47037.25717.98890.47093.41095.81697.264100.084108.362104.433...49.577211.630383.5581568.307607.559671.85639.89442928.961107309.80179333.276
    max67100.00019752.00012053.0005393.0005294.0005195.0007606.00014804.0005767.0005616.000...6547.00010057.00023676.00075845.00028115.00032640.00087.5003824975.00011127199.000350000.000
    min0.0000.0000.0000.0000.0000.0000.0000.0000.0000.000...0.0000.0000.0000.0000.0000.0000.0000.0000.0000.000
    sum330218663.0008091501.0003906704.00019648543.00020287023.00020809454.00021124098.00021736551.00023534360.00022680873.000...10767170.00045962130.00083301818.000340607958.000131950960.000145914927.0008664364.2009323397645.00023305757123.00017229759532.000
    range67100.00019752.00012053.0005393.0005294.0005195.0007606.00014804.0005767.0005616.000...6547.00010057.00023676.00075845.00028115.00032640.00087.5003824975.00011127199.000350000.000
    stdev1063.417242.869158.20680.44883.38983.518111.783124.41296.42893.590...98.498235.326316.3311141.981413.855446.7697.56731788.70378351.30842620.182
    q1850.0000.0000.00044.00044.00046.00045.00043.00050.00049.000...11.00060.000182.000867.000344.000384.00034.07021680.00055361.00047018.000
    q31454.0000.0000.00083.00086.00089.00087.00086.00098.00095.000...34.000178.000375.0001485.000581.000648.00041.01040582.000101272.00079083.000
    median1125.0000.0000.00062.00063.00065.00064.00062.00071.00069.000...20.000108.000274.0001143.000452.000504.00037.71030563.00076713.00062122.000
    interquartile_range604.0000.0000.00039.00042.00043.00042.00043.00048.00046.000...23.000118.000193.000618.000237.000264.0006.94018902.00045911.00032065.000
    \n", "

    10 rows × 107 columns

    \n", "
    " ], "text/plain": [ " POPCY POPCYGRP POPCYGRPI AGECY0004 \\\n", "avg 1520.470 37.257 17.988 90.470 \n", "max 67100.000 19752.000 12053.000 5393.000 \n", "min 0.000 0.000 0.000 0.000 \n", "sum 330218663.000 8091501.000 3906704.000 19648543.000 \n", "range 67100.000 19752.000 12053.000 5393.000 \n", "stdev 1063.417 242.869 158.206 80.448 \n", "q1 850.000 0.000 0.000 44.000 \n", "q3 1454.000 0.000 0.000 83.000 \n", "median 1125.000 0.000 0.000 62.000 \n", "interquartile_range 604.000 0.000 0.000 39.000 \n", "\n", " AGECY0509 AGECY1014 AGECY1519 AGECY2024 \\\n", "avg 93.410 95.816 97.264 100.084 \n", "max 5294.000 5195.000 7606.000 14804.000 \n", "min 0.000 0.000 0.000 0.000 \n", "sum 20287023.000 20809454.000 21124098.000 21736551.000 \n", "range 5294.000 5195.000 7606.000 14804.000 \n", "stdev 83.389 83.518 111.783 124.412 \n", "q1 44.000 46.000 45.000 43.000 \n", "q3 86.000 89.000 87.000 86.000 \n", "median 63.000 65.000 64.000 62.000 \n", "interquartile_range 42.000 43.000 42.000 43.000 \n", "\n", " AGECY2529 AGECY3034 ... DWLCYVACNT DWLCYRENT \\\n", "avg 108.362 104.433 ... 49.577 211.630 \n", "max 5767.000 5616.000 ... 6547.000 10057.000 \n", "min 0.000 0.000 ... 0.000 0.000 \n", "sum 23534360.000 22680873.000 ... 10767170.000 45962130.000 \n", "range 5767.000 5616.000 ... 6547.000 10057.000 \n", "stdev 96.428 93.590 ... 98.498 235.326 \n", "q1 50.000 49.000 ... 11.000 60.000 \n", "q3 98.000 95.000 ... 34.000 178.000 \n", "median 71.000 69.000 ... 20.000 108.000 \n", "interquartile_range 48.000 46.000 ... 23.000 118.000 \n", "\n", " DWLCYOWNED POPPY HHDPY DWLPY \\\n", "avg 383.558 1568.307 607.559 671.856 \n", "max 23676.000 75845.000 28115.000 32640.000 \n", "min 0.000 0.000 0.000 0.000 \n", "sum 83301818.000 340607958.000 131950960.000 145914927.000 \n", "range 23676.000 75845.000 28115.000 32640.000 \n", "stdev 316.331 1141.981 413.855 446.769 \n", "q1 182.000 867.000 344.000 384.000 \n", "q3 375.000 1485.000 581.000 648.000 \n", "median 274.000 1143.000 452.000 504.000 \n", "interquartile_range 193.000 618.000 237.000 264.000 \n", "\n", " AGEPYMED INCPYPCAP INCPYAVEHH INCPYMEDHH \n", "avg 39.894 42928.961 107309.801 79333.276 \n", "max 87.500 3824975.000 11127199.000 350000.000 \n", "min 0.000 0.000 0.000 0.000 \n", "sum 8664364.200 9323397645.000 23305757123.000 17229759532.000 \n", "range 87.500 3824975.000 11127199.000 350000.000 \n", "stdev 7.567 31788.703 78351.308 42620.182 \n", "q1 34.070 21680.000 55361.000 47018.000 \n", "q3 41.010 40582.000 101272.000 79083.000 \n", "median 37.710 30563.000 76713.000 62122.000 \n", "interquartile_range 6.940 18902.000 45911.000 32065.000 \n", "\n", "[10 rows x 107 columns]" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset.describe()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Every `Dataset` instance in the catalog contains other useful metadata:" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'slug': 'ags_sociodemogr_a7e14220',\n", " 'name': 'Sociodemographics - United States of America (Census Block Group)',\n", " 'description': 'Census and ACS sociodemographic data estimated for the current year and data projected to five years. Projected fields are general aggregates (total population, total households, median age, avg income etc.)',\n", " 'category_id': 'demographics',\n", " 'country_id': 'usa',\n", " 'data_source_id': 'sociodemographics',\n", " 'provider_id': 'ags',\n", " 'geography_name': 'Census Block Group - United States of America',\n", " 'geography_description': None,\n", " 'temporal_aggregation': 'yearly',\n", " 'time_coverage': None,\n", " 'update_frequency': None,\n", " 'is_public_data': False,\n", " 'lang': 'eng',\n", " 'version': '2020',\n", " 'category_name': 'Demographics',\n", " 'provider_name': 'Applied Geographic Solutions',\n", " 'geography_id': 'carto-do.ags.geography_usa_blockgroup_2015',\n", " 'id': 'carto-do.ags.demographics_sociodemographics_usa_blockgroup_2015_yearly_2020'}" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset.to_dict()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "When exploring datasets in the Data Observatory catalog it's very important that you understand clearly what variables are available to enrich your own data.\n", "\n", "For each `Variable` in each dataset, the Data Observatory provides (as it does for datasets) a set of methods and attributes to understand their underlaying data.\n", "\n", "Some of them are:\n", "\n", "- `head` and `tail` methods to get a glimpse of the actual data and start modelling your problem right away.\n", "- `counts`, `quantiles` and a full `describe` method with stats of the actual values in the dataset, such as: average, stdev, quantiles, min, max, median for each of the variables of the dataset.\n", "- an `histogram` plot with the distribution of the values on each variable." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's review some of that augmented metadata for the variables in the AGS population dataset." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ " #'Population (current year)'" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from cartoframes.data.observatory import Variable\n", "\n", "variable = Variable.get('POPCY_4534fac4')\n", "variable" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'slug': 'POPCY_4534fac4',\n", " 'name': 'Total Population',\n", " 'description': 'Population (current year)',\n", " 'db_type': 'INTEGER',\n", " 'agg_method': 'SUM',\n", " 'column_name': 'POPCY',\n", " 'variable_group_id': None,\n", " 'dataset_id': 'carto-do.ags.demographics_sociodemographics_usa_blockgroup_2015_yearly_2020',\n", " 'id': 'carto-do.ags.demographics_sociodemographics_usa_blockgroup_2015_yearly_2020.POPCY'}" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "variable.to_dict()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "There's also some utility methods to understand the underlying data for each variable:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0 1500\n", "1 2595\n", "2 1585\n", "3 1503\n", "4 980\n", "5 1249\n", "6 1658\n", "7 1078\n", "8 2540\n", "9 1980\n", "dtype: int64" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "variable.head()" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "all 217182.000\n", "null 0.000\n", "zero 299.000\n", "extreme 9073.000\n", "distinct 6756.000\n", "outliers 26998.000\n", "null_percent 0.000\n", "zero_percent 0.138\n", "extreme_percent 0.042\n", "distinct_percent 3.111\n", "outliers_percent 0.124\n", "dtype: float64" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "variable.counts()" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "q1 850\n", "q3 1454\n", "median 1125\n", "interquartile_range 604\n", "dtype: int64" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "variable.quantiles()" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAsIAAAHKCAYAAAAJqS0pAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAABOH0lEQVR4nO3dedxt5dz48c+3c5pLGo7mSUpSSZ0i/FQUGRoQyhgZU8gYkngixVOmUMpMKR6J0oAyPKJO6uEpIiVlTGR4jHH9/vhe273O7j6dtfa9d+c+rc/79dqv+95r7/t7X2v+rmtd17WilIIkSZLUN8ss6QJIkiRJS4KJsCRJknrJRFiSJEm9ZCIsSZKkXjIRliRJUi+ZCEuSJKmXTIQlaQIi4qqI2HVJl0OStGgmwpI0goj4SUTsPjTtwIj4BkAp5b6llIsXE2OTiCgRMXeCRZUkLYKJsCTdRZlgS9IdMxGWpAlo1hhHxE4RsSAi/hARv4qI4+vXvlZ/3hoRf4qInSNimYg4IiJuiIhfR8RHI2K1Rtxn1M9uiYjXD/2foyLi0xHx8Yj4A3Bg/d+XRMStEfGLiHhPRCzXiFci4uCI+FFE/DEi/iMiNouIb9byntH8viTdlZgIS9LkvRN4ZynlbsBmwBl1+kPrz7uXUlYppVwCHFhfuwH3BFYB3gMQEVsB7wWeCqwLrAasP/S/9gE+Ddwd+ATwT+AwYC1gZ+DhwMFDf/NIYAfggcCrgJOBpwEbAlsDB4w+65I0e5kIS9Lozqo1rbdGxK1kkjqdfwD3ioi1Sil/K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JfsiHoj8OaIOKaMqQP7bGTTCGkJqgfqlUspf5itMWd7vEnEnO3xasyxja4yiXiTiDnb400iZrMJRh/iTSLmJMqouw4TYUmSJPWST5aTJElSL5kIS5IkqZdMhCVJktRLJsKSJEnqJRNhSZIk9ZKJsCRJknrp/wPIIU40DnNC0wAAAABJRU5ErkJggg==\n", "text/plain": [ "
    " ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "variable.histogram()" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "avg 1520.470\n", "max 67100.000\n", "min 0.000\n", "sum 330218663.000\n", "range 67100.000\n", "stdev 1063.417\n", "q1 850.000\n", "q3 1454.000\n", "median 1125.000\n", "interquartile_range 604.000\n", "dtype: float64" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "variable.describe()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Subscribe to a Dataset in the catalog\n", "\n", "Once you have explored the catalog and have identified a dataset with the variables you need for your analysis and in the right spatial resolution, you can check `is_public_data` to know whether the dataset is freely accessible or you first need to purchase a license. Subscriptions are available for CARTO's Enterprise plan users.\n", "\n", "Subscriptions to datasets allow you to either use them from CARTOframes to enrich your own data or to download them. See the [enrichment guide](/developers/cartoframes/guides/Data-Observatory/#data-enrichment) for more information.\n", "\n", "Let's check out the dataset and geography from our previous example:" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "dataset = Dataset.get('ags_sociodemogr_a7e14220')" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "False" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset.is_public_data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This `dataset` is not public data, which means that you need a subscription to be able to use it to enrich your own data.\n", "\n", "> To subscribe to premium data in the Data Observatory catalog you need an Enterprise CARTO account with access to the Data Observatory." ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "from cartoframes.auth import set_default_credentials\n", "\n", "set_default_credentials('creds.json')" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ ], "source": [ "dataset.subscribe()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Licenses to data in the Data Observatory grant you the right to use the data for the period of one year. Every non-public dataset or geography you want to use to enrich your own data require a valid license.**\n", "\n", "You can check the actual status of your subscriptions directly from the catalog." ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Datasets: [, , , , , , , , ]\n", "Geographies: [, , , ]" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from cartoframes.data.observatory import Catalog\n", "\n", "Catalog().subscriptions()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Data Access\n", "\n", "Now that we have explored some basic information about the Dataset, we will proceed to download a sample of the Dataset into a dataframe so we can operate with it using Python. \n", "\n", "_Note: You'll need your [CARTO Account](https://carto.com/signup) credentials to perform this action._" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "from cartoframes.auth import set_default_credentials\n", "\n", "set_default_credentials('creds.json')" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [], "source": [ "from cartoframes.data.observatory import Dataset\n", "\n", "dataset = Dataset.get('ags_sociodemogr_a7e14220')" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [], "source": [ "# Filter by SQL query\n", "query = \"SELECT * FROM $dataset$ LIMIT 50\"\n", "\n", "dataset_df = dataset.to_dataframe(sql_query=query)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Note about SQL filters**\n", "\n", "Our SQL filtering queries allow for any PostgreSQL and PostGIS operation, so you can filter the rows (by a WHERE condition) or the columns (using the SELECT). Some common examples are filtering the Dataset by bounding box or filtering by column value: \n", "\n", "```\n", "SELECT * FROM $dataset$ WHERE ST_IntersectsBox(geom, -74.044467,40.706128,-73.891345,40.837690)\n", "```\n", "\n", "```\n", "SELECT total_pop, geom FROM $dataset$\n", "```\n", "\n", "A good tool to get the bounding box of a specific area is [bboxfinder.com](http://bboxfinder.com/#0.000000,0.000000,0.000000,0.000000)." ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    BLOCKGROUPPOPCYPOPCYGRPPOPCYGRPIAGECY0004AGECY0509AGECY1014AGECY1519AGECY2024AGECY2529...POPPYHHDPYDWLPYAGEPYMEDINCPYPCAPINCPYAVEHHINCPYMEDHHgeoiddo_dategeom
    0120570140122199900543068...21841324146273.0604292570807704191205701401222020-01-01 00:00:00+00:00POLYGON ((-82.38386 27.68793, -82.38408 27.687...
    1390759768011302900276317325303247206...298970274325.94032716139300961533907597680112020-01-01 00:00:00+00:00POLYGON ((-81.79413 40.56118, -81.79423 40.560...
    26037267100299700656045353263...99144546443.82081355181174144601603726710022020-01-01 00:00:00+00:00POLYGON ((-118.42418 34.05756, -118.42395 34.0...
    3603798001412361003543710...23518018354.670129559168394174999603798001412020-01-01 00:00:00+00:00POLYGON ((-118.26088 33.76850, -118.26070 33.7...
    460750155002144399128172128105202...145892799847.970143367224783125191607501550022020-01-01 00:00:00+00:00POLYGON ((-122.43821 37.78546, -122.43786 37.7...
    \n", "

    5 rows × 111 columns

    \n", "
    " ], "text/plain": [ " BLOCKGROUP POPCY POPCYGRP POPCYGRPI AGECY0004 AGECY0509 AGECY1014 \\\n", "0 120570140122 1999 0 0 5 4 3 \n", "1 390759768011 3029 0 0 276 317 325 \n", "2 60372671002 997 0 0 65 60 45 \n", "3 60379800141 236 10 0 3 5 4 \n", "4 60750155002 1443 99 1 28 17 21 \n", "\n", " AGECY1519 AGECY2024 AGECY2529 ... POPPY HHDPY DWLPY AGEPYMED \\\n", "0 0 6 8 ... 2184 1324 1462 73.060 \n", "1 303 247 206 ... 2989 702 743 25.940 \n", "2 35 32 63 ... 991 445 464 43.820 \n", "3 3 7 10 ... 235 180 183 54.670 \n", "4 28 105 202 ... 1458 927 998 47.970 \n", "\n", " INCPYPCAP INCPYAVEHH INCPYMEDHH geoid do_date \\\n", "0 42925 70807 70419 120570140122 2020-01-01 00:00:00+00:00 \n", "1 32716 139300 96153 390759768011 2020-01-01 00:00:00+00:00 \n", "2 81355 181174 144601 60372671002 2020-01-01 00:00:00+00:00 \n", "3 129559 168394 174999 60379800141 2020-01-01 00:00:00+00:00 \n", "4 143367 224783 125191 60750155002 2020-01-01 00:00:00+00:00 \n", "\n", " geom \n", "0 POLYGON ((-82.38386 27.68793, -82.38408 27.687... \n", "1 POLYGON ((-81.79413 40.56118, -81.79423 40.560... \n", "2 POLYGON ((-118.42418 34.05756, -118.42395 34.0... \n", "3 POLYGON ((-118.26088 33.76850, -118.26070 33.7... \n", "4 POLYGON ((-122.43821 37.78546, -122.43786 37.7... \n", "\n", "[5 rows x 111 columns]" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# First rows of the Dataset sample\n", "dataset_df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can also download the dataset directly to a CSV file" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Data saved: my_dataset.csv\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "To load it as a DataFrame you can do:\n", "\n", " df = pandas.read_csv('my_dataset.csv')\n", "\n" ] } ], "source": [ "query = \"SELECT * FROM $dataset$ LIMIT 50\"\n", "\n", "dataset_df = dataset.to_csv('my_dataset.csv', sql_query=query)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Data Enrichment\n", "\n", "We define enrichment as the process of augmenting your data with new variables by means of a spatial join between your data and a `Dataset` in CARTO's Data Observatory, aggregated at a given spatial resolution, or in other words:\n", "\n", "\"*Enrichment is the process of adding variables to a geometry, which we call the target, (point, line, polygon…) from a spatial (polygon) dataset, which we call the source*\"\n", "\n", "We recommend you also check out the [CARTOframes quickstart guide](/developers/cartoframes/guides/Quickstart/) since it offers a complete example of data discovery and enrichment and also helps you build a simple dashboard to draw conclusions from the resulting data.\n", "\n", "_Note: You'll need your [CARTO Account](https://carto.com/signup) credentials to perform this action._" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "from cartoframes.auth import set_default_credentials\n", "\n", "set_default_credentials('creds.json')" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[ #'Geographic Identifier',\n", " #'Population (current year)',\n", " #'Population in Group Quarters (current year)',\n", " #'Institutional Group Quarters Population (current y...',\n", " #'Population age 0-4 (current year)',\n", " #'Population age 5-9 (current year)',\n", " #'Population age 10-14 (current year)',\n", " #'Population age 15-19 (current year)',\n", " #'Population age 20-24 (current year)',\n", " #'Population age 25-29 (current year)',\n", " #'Population age 30-34 (current year)',\n", " #'Population age 35-39 (current year)',\n", " #'Population age 40-44 (current year)',\n", " #'Population age 45-49 (current year)',\n", " #'Population age 50-54 (current year)',\n", " #'Population age 55-59 (current year)',\n", " #'Population age 60-64 (current year)',\n", " #'Population age 65-69 (current year)',\n", " #'Population age 70-74 (current year)',\n", " #'Population age 75-79 (current year)',\n", " #'Population age 80-84 (current year)',\n", " #'Population age 85+ (current year)',\n", " #'Median Age (current year)',\n", " #'Population male (current year)',\n", " #'Population female (current year)',\n", " #'Non Hispanic White (current year)',\n", " #'Non Hispanic Black (current year)',\n", " #'Non Hispanic American Indian (current year)',\n", " #'Non Hispanic Asian (current year)',\n", " #'Non Hispanic Hawaiian/Pacific Islander (current ye...',\n", " #'Non Hispanic Other Race (current year)',\n", " #'Non Hispanic Multiple Race (current year)',\n", " #'Population Hispanic (current year)',\n", " #'Never Married (current year)',\n", " #'Now Married (current year)',\n", " #'Separated (current year)',\n", " #'Widowed (current year)',\n", " #'Divorced (current year)',\n", " #'Population Age 15+ (current year)',\n", " #'Pop 25+ less than 9th grade (current year)',\n", " #'Pop 25+ 9th-12th grade no diploma (current year)',\n", " #'Pop 25+ HS graduate (current year)',\n", " #'Pop 25+ college no diploma (current year)',\n", " #'Pop 25+ Associate degree (current year)',\n", " #'Pop 25+ Bachelor's degree (current year)',\n", " #'Pop 25+ graduate or prof school degree (current ye...',\n", " #'Population Age 25+ (current year)',\n", " #'Households (current year)',\n", " #'Family Households (current year)',\n", " #'Families married couple w children (current year)',\n", " #'Families male no wife w children (current year)',\n", " #'Families female no husband children (current year)',\n", " #'Average Household Size (current year)',\n", " #'Median Age of Householder (current year)',\n", " #'Households: No Vehicle Available (current year)',\n", " #'Households: One Vehicle Available (current year)',\n", " #'Households: Two or More Vehicles Available (curren...',\n", " #'Per capita income (current year)',\n", " #'Average household Income (current year)',\n", " #'Median household income (current year)',\n", " #'Median family income (current year)',\n", " #'Household Income < $10000 (current year)',\n", " #'Household Income $10000-$14999 (current year)',\n", " #'Household Income $15000-$19999 (current year)',\n", " #'Household Income $20000-$24999 (current year)',\n", " #'Household Income $25000-$29999 (current year)',\n", " #'Household Income $30000-$34999 (current year)',\n", " #'Household Income $35000-$39999 (current year)',\n", " #'Household Income $40000-$44999 (current year)',\n", " #'Household Income $45000-$49999 (current year)',\n", " #'Household Income $50000-$59999 (current year)',\n", " #'Household Income $60000-$74999 (current year)',\n", " #'Household Income $75000-$99999 (current year)',\n", " #'Household Income $100000-$124999 (current year)',\n", " #'Household Income $125000-$149999 (current year)',\n", " #'Household Income $150000-$199999 (current year)',\n", " #'Household Income > $200000 (current year)',\n", " #'Median Household Income: Age < 25 (current year)',\n", " #'Median Household Income: Age 25-34 (current year)',\n", " #'Median Household Income: Age 35-44 (current year)',\n", " #'Median Household Income: Age 45-54 (current year)',\n", " #'Median Household Income: Age 55-64 (current year)',\n", " #'Median Household Income: Age 65-74 (current year)',\n", " #'Median Household Income: Age 75+ (current year)',\n", " #'Population Age 16+ (current year)',\n", " #'Pop 16+ in Armed Forces (current year)',\n", " #'Pop 16+ civilian employed (current year)',\n", " #'Pop 16+ civilian unemployed (current year)',\n", " #'Pop 16+ not in labor force (current year)',\n", " #'Unemployment Rate (current year)',\n", " #'Population In Labor Force (current year)',\n", " #'SPANISH SPEAKING HOUSEHOLDS',\n", " #'LINGUISTICALLY ISOLATED HOUSEHOLDS (NON-ENGLISH SP...',\n", " #'Median Value of Owner Occupied Housing Units',\n", " #'Median Cash Rent',\n", " #'UNITS IN STRUCTURE: 1 DETACHED',\n", " #'UNITS IN STRUCTURE: 20 OR MORE',\n", " #'Housing units (current year)',\n", " #'Housing units vacant (current year)',\n", " #'Occupied units renter (current year)',\n", " #'Occupied units owner (current year)',\n", " #'Population (projected, five yearsA)',\n", " #'Households (projected, five yearsA)',\n", " #'Housing units (projected, five yearsA)',\n", " #'Median Age (projected, five yearsA)',\n", " #'Per capita income (projected, five yearsA)',\n", " #'Average household Income (projected, five yearsA)',\n", " #'Median household income (projected, five yearsA)',\n", " #'Geographical Identifier',\n", " #'First day of time period']" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from cartoframes.data.observatory import Dataset\n", "\n", "dataset = Dataset.get('ags_sociodemogr_a7e14220')\n", "variables = dataset.variables\n", "variables" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The `ags_sociodemogr_f510a947` dataset contains socio-demographic variables aggregated by Census block group level. \n", "\n", "Let's try and find a variable for total population:" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    slugnamedescriptiondb_typeagg_methodcolumn_namevariable_group_iddataset_idid
    1POPCY_4534fac4Total PopulationPopulation (current year)INTEGERSUMPOPCYNonecarto-do.ags.demographics_sociodemographics_us...carto-do.ags.demographics_sociodemographics_us...
    2POPCYGRP_3033ef2ePOPCYGRPPopulation in Group Quarters (current year)INTEGERSUMPOPCYGRPNonecarto-do.ags.demographics_sociodemographics_us...carto-do.ags.demographics_sociodemographics_us...
    3POPCYGRPI_1e42899POPCYGRPIInstitutional Group Quarters Population (curre...INTEGERSUMPOPCYGRPINonecarto-do.ags.demographics_sociodemographics_us...carto-do.ags.demographics_sociodemographics_us...
    84LBFCYPOP16_75363c6fLBFCYPOP16Population Age 16+ (current year)INTEGERSUMLBFCYPOP16carto-do.ags.demographics_sociodemographics_us...carto-do.ags.demographics_sociodemographics_us...carto-do.ags.demographics_sociodemographics_us...
    101POPPY_24dbbb56Total populationPopulation (projected, five yearsA)INTEGERSUMPOPPYNonecarto-do.ags.demographics_sociodemographics_us...carto-do.ags.demographics_sociodemographics_us...
    \n", "
    " ], "text/plain": [ " slug name \\\n", "1 POPCY_4534fac4 Total Population \n", "2 POPCYGRP_3033ef2e POPCYGRP \n", "3 POPCYGRPI_1e42899 POPCYGRPI \n", "84 LBFCYPOP16_75363c6f LBFCYPOP16 \n", "101 POPPY_24dbbb56 Total population \n", "\n", " description db_type agg_method \\\n", "1 Population (current year) INTEGER SUM \n", "2 Population in Group Quarters (current year) INTEGER SUM \n", "3 Institutional Group Quarters Population (curre... INTEGER SUM \n", "84 Population Age 16+ (current year) INTEGER SUM \n", "101 Population (projected, five yearsA) INTEGER SUM \n", "\n", " column_name variable_group_id \\\n", "1 POPCY None \n", "2 POPCYGRP None \n", "3 POPCYGRPI None \n", "84 LBFCYPOP16 carto-do.ags.demographics_sociodemographics_us... \n", "101 POPPY None \n", "\n", " dataset_id \\\n", "1 carto-do.ags.demographics_sociodemographics_us... \n", "2 carto-do.ags.demographics_sociodemographics_us... \n", "3 carto-do.ags.demographics_sociodemographics_us... \n", "84 carto-do.ags.demographics_sociodemographics_us... \n", "101 carto-do.ags.demographics_sociodemographics_us... \n", "\n", " id \n", "1 carto-do.ags.demographics_sociodemographics_us... \n", "2 carto-do.ags.demographics_sociodemographics_us... \n", "3 carto-do.ags.demographics_sociodemographics_us... \n", "84 carto-do.ags.demographics_sociodemographics_us... \n", "101 carto-do.ags.demographics_sociodemographics_us... " ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "vdf = variables.to_dataframe()\n", "vdf[vdf['name'].str.contains('pop', case=False, na=False)]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can store the variable instance we need by searching the Catalog by its `slug`, in this case `POPCY_4534fac4`:" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'slug': 'POPCY_4534fac4',\n", " 'name': 'Total Population',\n", " 'description': 'Population (current year)',\n", " 'db_type': 'INTEGER',\n", " 'agg_method': 'SUM',\n", " 'column_name': 'POPCY',\n", " 'variable_group_id': None,\n", " 'dataset_id': 'carto-do.ags.demographics_sociodemographics_usa_blockgroup_2015_yearly_2020',\n", " 'id': 'carto-do.ags.demographics_sociodemographics_usa_blockgroup_2015_yearly_2020.POPCY'}" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "variable = Variable.get('POPCY_4534fac4')\n", "variable.to_dict()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The `POPCY` variable contains the `SUM` of the population per blockgroup for the year 2019. Let's enrich our stores DataFrame with that variable." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Enrich points\n", "\n", "Let's start by loading the geocoded Starbucks stores:" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    cartodb_idfield_1nameaddressrevenuegeometry
    010Franklin Ave & Eastern Pkwy341 Eastern Pkwy,Brooklyn, NY 112381321040.772POINT (-73.95901 40.67109)
    121607 Brighton Beach Ave607 Brighton Beach Avenue,Brooklyn, NY 112351268080.418POINT (-73.96122 40.57796)
    23265th St & 18th Ave6423 18th Avenue,Brooklyn, NY 112041248133.699POINT (-73.98976 40.61912)
    343Bay Ridge Pkwy & 3rd Ave7419 3rd Avenue,Brooklyn, NY 112091185702.676POINT (-74.02744 40.63152)
    454Caesar's Bay Shopping Center8973 Bay Parkway,Brooklyn, NY 112141148427.411POINT (-74.00098 40.59321)
    \n", "
    " ], "text/plain": [ " cartodb_id field_1 name \\\n", "0 1 0 Franklin Ave & Eastern Pkwy \n", "1 2 1 607 Brighton Beach Ave \n", "2 3 2 65th St & 18th Ave \n", "3 4 3 Bay Ridge Pkwy & 3rd Ave \n", "4 5 4 Caesar's Bay Shopping Center \n", "\n", " address revenue \\\n", "0 341 Eastern Pkwy,Brooklyn, NY 11238 1321040.772 \n", "1 607 Brighton Beach Avenue,Brooklyn, NY 11235 1268080.418 \n", "2 6423 18th Avenue,Brooklyn, NY 11204 1248133.699 \n", "3 7419 3rd Avenue,Brooklyn, NY 11209 1185702.676 \n", "4 8973 Bay Parkway,Brooklyn, NY 11214 1148427.411 \n", "\n", " geometry \n", "0 POINT (-73.95901 40.67109) \n", "1 POINT (-73.96122 40.57796) \n", "2 POINT (-73.98976 40.61912) \n", "3 POINT (-74.02744 40.63152) \n", "4 POINT (-74.00098 40.59321) " ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from geopandas import read_file\n", "\n", "stores_gdf = read_file('http://libs.cartocdn.com/cartoframes/files/starbucks_brooklyn_geocoded.geojson')\n", "stores_gdf.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Alternatively, you can load data in any geospatial format supported by GeoPandas or CARTO." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As we can see, for each store we have its name, address, the total revenue by year and a `geometry` column indicating the location of the store. This is important because for the enrichment service to work, we need a DataFrame with a geometry column encoded as a [shapely](https://pypi.org/project/Shapely/) object.\n", "\n", "We can now create a new `Enrichment` instance, and since the `stores_gdf` dataset represents store locations (points), we can use the `enrich_points` function passing as arguments the stores DataFrame and a list of `Variables` (that we have a valid subscription from the Data Observatory catalog for).\n", "\n", "In this case we are only enriching one variable (the total population), but we could enrich a list of them." ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    cartodb_idfield_1nameaddressrevenuegeometryPOPCYdo_area
    010Franklin Ave & Eastern Pkwy341 Eastern Pkwy,Brooklyn, NY 112381321040.772POINT (-73.95901 40.67109)260859840.197
    121607 Brighton Beach Ave607 Brighton Beach Avenue,Brooklyn, NY 112351268080.418POINT (-73.96122 40.57796)179260150.637
    23265th St & 18th Ave6423 18th Avenue,Brooklyn, NY 112041248133.699POINT (-73.98976 40.61912)73338950.619
    343Bay Ridge Pkwy & 3rd Ave7419 3rd Avenue,Brooklyn, NY 112091185702.676POINT (-74.02744 40.63152)115557353.293
    454Caesar's Bay Shopping Center8973 Bay Parkway,Brooklyn, NY 112141148427.411POINT (-74.00098 40.59321)2266188379.243
    \n", "
    " ], "text/plain": [ " cartodb_id field_1 name \\\n", "0 1 0 Franklin Ave & Eastern Pkwy \n", "1 2 1 607 Brighton Beach Ave \n", "2 3 2 65th St & 18th Ave \n", "3 4 3 Bay Ridge Pkwy & 3rd Ave \n", "4 5 4 Caesar's Bay Shopping Center \n", "\n", " address revenue \\\n", "0 341 Eastern Pkwy,Brooklyn, NY 11238 1321040.772 \n", "1 607 Brighton Beach Avenue,Brooklyn, NY 11235 1268080.418 \n", "2 6423 18th Avenue,Brooklyn, NY 11204 1248133.699 \n", "3 7419 3rd Avenue,Brooklyn, NY 11209 1185702.676 \n", "4 8973 Bay Parkway,Brooklyn, NY 11214 1148427.411 \n", "\n", " geometry POPCY do_area \n", "0 POINT (-73.95901 40.67109) 2608 59840.197 \n", "1 POINT (-73.96122 40.57796) 1792 60150.637 \n", "2 POINT (-73.98976 40.61912) 733 38950.619 \n", "3 POINT (-74.02744 40.63152) 1155 57353.293 \n", "4 POINT (-74.00098 40.59321) 2266 188379.243 " ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from cartoframes.data.observatory import Enrichment\n", "\n", "enriched_stores_gdf = Enrichment().enrich_points(stores_gdf, [variable])\n", "enriched_stores_gdf.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Once the enrichment finishes, we can see there is a new column in our DataFrame called `POPCY` with population projected for the year 2019, from the US Census block group which contains each one of our Starbucks stores. The enrichment process also provides an extra column called `do_area` with the information of the area in square meters covered by the polygons in the source dataset we are using to enrich our data." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Enrich polygons\n", "\n", "Next, let's do a second enrichment, but this time using a DataFrame with areas of influence calculated using the [CARTOframes isochrones](/developers/cartoframes/reference/#heading-Isolines) service to obtain the polygon around each store that covers the area within an 8, 17 and 25 minute walk." ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    data_rangelower_data_rangerange_labelgeometry
    050008 min.MULTIPOLYGON (((-73.95959 40.67571, -73.95971 ...
    1100050017 min.POLYGON ((-73.95988 40.68110, -73.95863 40.681...
    21500100025 min.POLYGON ((-73.95986 40.68815, -73.95711 40.688...
    350008 min.MULTIPOLYGON (((-73.96185 40.58321, -73.96231 ...
    4100050017 min.MULTIPOLYGON (((-73.96684 40.57483, -73.96830 ...
    \n", "
    " ], "text/plain": [ " data_range lower_data_range range_label \\\n", "0 500 0 8 min. \n", "1 1000 500 17 min. \n", "2 1500 1000 25 min. \n", "3 500 0 8 min. \n", "4 1000 500 17 min. \n", "\n", " geometry \n", "0 MULTIPOLYGON (((-73.95959 40.67571, -73.95971 ... \n", "1 POLYGON ((-73.95988 40.68110, -73.95863 40.681... \n", "2 POLYGON ((-73.95986 40.68815, -73.95711 40.688... \n", "3 MULTIPOLYGON (((-73.96185 40.58321, -73.96231 ... \n", "4 MULTIPOLYGON (((-73.96684 40.57483, -73.96830 ... " ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "aoi_gdf = read_file('http://libs.cartocdn.com/cartoframes/files/starbucks_brooklyn_isolines.geojson')\n", "aoi_gdf.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this case we have a DataFrame which, for each index in the `stores_gdf`, contains a polygon of the areas of influence around each store at 8, 17 and 25 minute walking intervals. Again the `geometry` is encoded as a `shapely` object.\n", "\n", "In this case, the `Enrichment` service provides an `enrich_polygons` function, which in its basic version, works in the same way as the `enrich_points` function. It just needs a DataFrame with polygon geometries and a list of variables to enrich:" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    data_rangelower_data_rangerange_labelgeometryPOPCY
    050008 min.MULTIPOLYGON (((-73.95959 40.67571, -73.95971 ...21893.522
    1100050017 min.POLYGON ((-73.95988 40.68110, -73.95863 40.681...60463.830
    21500100025 min.POLYGON ((-73.95986 40.68815, -73.95711 40.688...111036.740
    350008 min.MULTIPOLYGON (((-73.96185 40.58321, -73.96231 ...23118.114
    4100050017 min.MULTIPOLYGON (((-73.96684 40.57483, -73.96830 ...29213.000
    \n", "
    " ], "text/plain": [ " data_range lower_data_range range_label \\\n", "0 500 0 8 min. \n", "1 1000 500 17 min. \n", "2 1500 1000 25 min. \n", "3 500 0 8 min. \n", "4 1000 500 17 min. \n", "\n", " geometry POPCY \n", "0 MULTIPOLYGON (((-73.95959 40.67571, -73.95971 ... 21893.522 \n", "1 POLYGON ((-73.95988 40.68110, -73.95863 40.681... 60463.830 \n", "2 POLYGON ((-73.95986 40.68815, -73.95711 40.688... 111036.740 \n", "3 MULTIPOLYGON (((-73.96185 40.58321, -73.96231 ... 23118.114 \n", "4 MULTIPOLYGON (((-73.96684 40.57483, -73.96830 ... 29213.000 " ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from cartoframes.data.observatory import Enrichment\n", "\n", "enriched_aoi_gdf = Enrichment().enrich_polygons(aoi_gdf, [variable])\n", "enriched_aoi_gdf.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We now have a new column in our areas of influence DataFrame, `SUM_POPCY`, which represents the `SUM` of the total population in the Census block groups that instersect with each polygon in our DataFrame." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### How enrichment works" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's take a deeper look into what happens under the hood when you execute a polygon enrichment.\n", "\n", "Imagine we have polygons representing municipalities, in blue, each of which have a population attribute, and we want to find out the population inside the green circle.\n", "\n", "\"Polygon" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We don’t know how the population is distributed inside these municipalities. They are probably concentrated in cities somewhere, but, since we don’t know where they are, our best guess is to assume that the population is evenly distributed in the municipality (i.e. every point inside the municipality has the same population density).\n", "\n", "Population is an extensive property (it grows with area), so we can subset it (a region inside the municipality will always have a smaller population than the whole municipality), and also aggregate it by summing.\n", "\n", "In this case, we’d calculate the population inside each part of the circle that intersects with a municipality." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Default aggregation methods**\n", "\n", "In the Data Observatory, we suggest a default aggregation method for certain fields. However, some fields don’t have a clear best method, and some just can’t be aggregated. In these cases, we leave the `agg_method` field blank and let the user choose the method that best fits their needs." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.5" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "184021e57bcc406885fdb9651b8188e2": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "8756ca8a4dd54a3a9acbfc7b87e710ab": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 2 }