This file contains hidden or 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
pd.set_option('mode.chained_assignment', None) |
This file contains hidden or 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
from cartoframes.viz import Map, Layer, basemaps | |
from cartoframes.viz import Layer, color_continuous_style, color_bins_style, basic_style, color_category_legend | |
_df = average_duration.copy() | |
metric = 'avg_duration_day' | |
origin_county = selected_area_geom.iloc[0]['county_name'] | |
origin_state = selected_area_geom.iloc[0]['state_name'] |
This file contains hidden or 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
ARRAY_TO_STRING(homeContext.fipscode, ',') |
This file contains hidden or 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
SUBSTR(FORMAT("00%d", state_fips ), -2) as state_fips, | |
SUBSTR(FORMAT("00000%d", fips ), -5) as fips, |
This file contains hidden or 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
df.query('a in ["a", "b", "c"]') | |
id_list = ["a", "b", "c"] | |
df.query('a in @id_list') |
This file contains hidden or 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
colors = ['aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', | |
'beige', 'bisque', 'black', 'blanchedalmond', 'blue', | |
'blueviolet', 'brown', 'burlywood', 'cadetblue', | |
'chartreuse', 'chocolate', 'coral', 'cornflowerblue', | |
'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', | |
'darkgoldenrod', 'darkgray', 'darkgrey', 'darkgreen', | |
'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', | |
'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', | |
'darkslateblue', 'darkslategray', 'darkslategrey', | |
'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', |
NewerOlder