Module Import alias identifier Import alias Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad Str body If CompareIs NameLoad NameLoad body Assign NameStore ListLoad Str orelse If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore ListLoad Str orelse If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad Call AttributeLoad Str attr NameLoad attr keyword Call AttributeLoad Str attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad SubscriptLoad NameLoad Index Str NameLoad keyword Str Assign NameStore SubscriptLoad NameLoad Index Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str keyword Str Expr Call AttributeLoad NameLoad attr Num Str SubscriptLoad NameLoad Index Str If NameLoad body Assign NameStore Dict For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad Index Str For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad orelse If BoolOpAnd CompareEq NameLoad Str NameLoad body Assign NameStore Call NameLoad GeneratorExp TupleLoad BinOpAdd NameLoad Str NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad Print Str Print Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Index Str attr Num
N/A N/A pandas pd N/A requests N/A API_URL http://api.censusreporter.org/1.0/data/show/{release}?table_ids={table_ids}&geo_ids={geoids} get_data N/A N/A tables geoids release N/A None None latest N/A N/A N/A geoids None N/A N/A geoids N/A 040|01000US N/A N/A N/A isinstance geoids basestring N/A N/A geoids N/A geoids N/A N/A tables None N/A N/A tables N/A B01001 N/A N/A N/A isinstance tables basestring N/A N/A tables N/A tables N/A url N/A N/A API_URL format table_ids N/A N/A N/A N/A , join tables upper geoids N/A N/A , join geoids release release N/A response N/A N/A requests get url N/A N/A N/A response json N/A get_dataframe N/A N/A tables geoids release geo_names col_names include_moe N/A None None latest False False False N/A N/A response N/A get_data tables tables geoids geoids release release N/A frame N/A N/A N/A pd DataFrame from_dict N/A prep_for_pandas N/A response N/A data include_moe orient index N/A frame N/A frame N/A N/A sorted N/A N/A frame columns values N/A geo_names N/A N/A geo N/A N/A N/A pd DataFrame from_dict N/A response N/A geography orient index N/A N/A N/A frame insert 0 name N/A geo N/A name N/A col_names N/A N/A d N/A N/A table_id N/A response N/A tables N/A N/A columns N/A N/A N/A response N/A tables N/A table_id N/A columns N/A column_id columns N/A N/A N/A d N/A column_id N/A N/A columns N/A column_id N/A name N/A frame N/A N/A frame rename columns d N/A frame N/A prep_for_pandas N/A N/A json_data include_moe N/A False N/A N/A Given a dict of dicts as they come from a Census Reporter API call, set it up to be amenable to pandas.DataFrame.from_dict N/A result N/A N/A N/A geoid tables N/A N/A json_data items N/A N/A flat N/A N/A N/A table values N/A N/A tables items N/A N/A N/A kind columns N/A N/A values items N/A N/A N/A kind estimate N/A N/A N/A N/A flat update columns N/A N/A N/A N/A kind error include_moe N/A N/A renamed N/A dict N/A N/A N/A k _moe v N/A N/A k v N/A N/A columns items N/A N/A N/A flat update renamed N/A N/A result N/A geoid flat N/A result N/A N/A N/A __name__ __main__ N/A N/A df N/A get_dataframe N/A Top 10 most populous states N/A N/A N/A N/A N/A N/A df sort B01001001 ascending False N/A B01001001 head 10