Skip to content

Commit

Permalink
minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
ozak committed Dec 7, 2024
1 parent d9d444c commit f41a960
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion notebooks/GIS with Python 2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
" #lines = textwrap.wrap(text, **kw)\n",
" return \"\\n\".join(line.center(cwidth) for line in lines)\n",
"\n",
"def MyChloropleth(mydf, myfile='', myvar='',\n",
"def MyChoropleth(mydf, myfile='', myvar='',\n",
" mylegend='',\n",
" k=5,\n",
" extent=[-180, -90, 180, 90],\n",
Expand Down
8 changes: 4 additions & 4 deletions notebooks/GIS with Python 3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
" #lines = textwrap.wrap(text, **kw)\n",
" return \"\\n\".join(line.center(cwidth) for line in lines)\n",
"\n",
"def MyChloropleth(mydf, myfile='', myvar='',\n",
"def MyChoropleth(mydf, myfile='', myvar='',\n",
" mylegend='',\n",
" k=5,\n",
" extent=[-180, -90, 180, 90],\n",
Expand Down Expand Up @@ -4290,7 +4290,7 @@
"source": [
"cmap = mpl.colors.ListedColormap(['blue', 'red'])\n",
"mylegend = center_wrap([\"Visa Requirements\", \"For Colombian Citizens\"], cwidth=32, width=32)\n",
"MyChloropleth(mydf=col_visa, myfile='col_visa', myvar='visa_req', mylegend=mylegend, k=1, bbox_to_anchor=(0.25, 0.3),\n",
"MyChoropleth(mydf=col_visa, myfile='col_visa', myvar='visa_req', mylegend=mylegend, k=1, bbox_to_anchor=(0.25, 0.3),\n",
" edgecolor='white', facecolor='lightgray', cmap=cmap, scheme='UserDefined', bins=[0,1], legend_labels=['NO', 'YES'],\n",
" save=False)"
]
Expand Down Expand Up @@ -5049,7 +5049,7 @@
"col_visa = countries.merge(visadf, left_on='NAME_ES', right_on='PAIS')\n",
"cmap = mpl.colors.ListedColormap(['blue', 'red'])\n",
"mylegend = center_wrap([\"Visa Requirements\", \"For Colombian Citizens\"], cwidth=32, width=32)\n",
"MyChloropleth(mydf=col_visa, myfile='col_visa', myvar='visa_req', mylegend=mylegend, k=1, bbox_to_anchor=(0.25, 0.3),\n",
"MyChoropleth(mydf=col_visa, myfile='col_visa', myvar='visa_req', mylegend=mylegend, k=1, bbox_to_anchor=(0.25, 0.3),\n",
" edgecolor='white', facecolor='lightgray', cmap=cmap, scheme='UserDefined', bins=[0,1], legend_labels=['NO', 'YES'],\n",
" save=False)"
]
Expand Down Expand Up @@ -8335,7 +8335,7 @@
"col_visa = countries.merge(visadf, left_on='NAME_ES', right_on='countries_matched')\n",
"cmap = mpl.colors.ListedColormap(['blue', 'red'])\n",
"mylegend = center_wrap([\"Visa Requirements\", \"For Colombian Citizens\"], cwidth=32, width=32)\n",
"MyChloropleth(mydf=col_visa, myfile='col_visa', myvar='visa_req', mylegend=mylegend, k=1, bbox_to_anchor=(0.25, 0.3),\n",
"MyChoropleth(mydf=col_visa, myfile='col_visa', myvar='visa_req', mylegend=mylegend, k=1, bbox_to_anchor=(0.25, 0.3),\n",
" edgecolor='white', facecolor='lightgray', cmap=cmap, scheme='UserDefined', bins=[0,1], legend_labels=['NO', 'YES'],\n",
" save=False)"
]
Expand Down
8 changes: 4 additions & 4 deletions notebooks/GIS with Python.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2583,7 +2583,7 @@
" #lines = textwrap.wrap(text, **kw)\n",
" return \"\\n\".join(line.center(cwidth) for line in lines)\n",
"\n",
"def MyChloropleth(mydf=pwt.loc[pwt.year==2010], myfile='GDPpc2010', myvar='rgdpe_pc',\n",
"def MyChoropleth(mydf=pwt.loc[pwt.year==2010], myfile='GDPpc2010', myvar='rgdpe_pc',\n",
" mylegend='GDP per capita 2010',\n",
" k=5,\n",
" extent=[-180, -90, 180, 90],\n",
Expand Down Expand Up @@ -2696,7 +2696,7 @@
"gdppc = countries.merge(gdppc, left_on='ADM0_A3', right_on='countrycode')\n",
"gdppc = gdppc.dropna(subset=['rgdpe_pc'])\n",
"mylegend = center_wrap([\"GDP per capita in \" + str(year)], cwidth=32, width=32)\n",
"MyChloropleth(mydf=gdppc, myfile='PWT_GDP_' + str(year), myvar='rgdpe_pc', mylegend=mylegend, k=10, scheme='Quantiles', save=True)"
"MyChoropleth(mydf=gdppc, myfile='PWT_GDP_' + str(year), myvar='rgdpe_pc', mylegend=mylegend, k=10, scheme='Quantiles', save=True)"
]
},
{
Expand Down Expand Up @@ -2725,7 +2725,7 @@
"gdppc = countries.merge(gdppc, left_on='ADM0_A3', right_on='countrycode')\n",
"gdppc = gdppc.dropna(subset=['rgdpe_pc'])\n",
"mylegend = center_wrap([\"GDP per capita in \" + str(year)], cwidth=32, width=32)\n",
"MyChloropleth(mydf=gdppc, myfile='PWT_GDP_' + str(year), myvar='rgdpe_pc', mylegend=mylegend, k=10, scheme='Quantiles', save=True)"
"MyChoropleth(mydf=gdppc, myfile='PWT_GDP_' + str(year), myvar='rgdpe_pc', mylegend=mylegend, k=10, scheme='Quantiles', save=True)"
]
},
{
Expand Down Expand Up @@ -2754,7 +2754,7 @@
"gdppc = countries.merge(gdppc, left_on='ADM0_A3', right_on='countrycode')\n",
"gdppc = gdppc.dropna(subset=['pop'])\n",
"mylegend = center_wrap([\"Population in \" + str(year)], cwidth=32, width=32)\n",
"MyChloropleth(mydf=gdppc, myfile='PWT_POP_' + str(year), myvar='pop', mylegend=mylegend, k=10, scheme='Quantiles', save=True)"
"MyChoropleth(mydf=gdppc, myfile='PWT_POP_' + str(year), myvar='pop', mylegend=mylegend, k=10, scheme='Quantiles', save=True)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion notebooks/GIS-with-Python-2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
" #lines = textwrap.wrap(text, **kw)\n",
" return \"\\n\".join(line.center(cwidth) for line in lines)\n",
"\n",
"def MyChloropleth(mydf, myfile='', myvar='',\n",
"def MyChoropleth(mydf, myfile='', myvar='',\n",
" mylegend='',\n",
" k=5,\n",
" extent=[-180, -90, 180, 90],\n",
Expand Down
8 changes: 4 additions & 4 deletions notebooks/GIS-with-Python-3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
" #lines = textwrap.wrap(text, **kw)\n",
" return \"\\n\".join(line.center(cwidth) for line in lines)\n",
"\n",
"def MyChloropleth(mydf, myfile='', myvar='',\n",
"def MyChoropleth(mydf, myfile='', myvar='',\n",
" mylegend='',\n",
" k=5,\n",
" extent=[-180, -90, 180, 90],\n",
Expand Down Expand Up @@ -4290,7 +4290,7 @@
"source": [
"cmap = mpl.colors.ListedColormap(['blue', 'red'])\n",
"mylegend = center_wrap([\"Visa Requirements\", \"For Colombian Citizens\"], cwidth=32, width=32)\n",
"MyChloropleth(mydf=col_visa, myfile='col_visa', myvar='visa_req', mylegend=mylegend, k=1, bbox_to_anchor=(0.25, 0.3),\n",
"MyChoropleth(mydf=col_visa, myfile='col_visa', myvar='visa_req', mylegend=mylegend, k=1, bbox_to_anchor=(0.25, 0.3),\n",
" edgecolor='white', facecolor='lightgray', cmap=cmap, scheme='UserDefined', bins=[0,1], legend_labels=['NO', 'YES'],\n",
" save=False)"
]
Expand Down Expand Up @@ -5049,7 +5049,7 @@
"col_visa = countries.merge(visadf, left_on='NAME_ES', right_on='PAIS')\n",
"cmap = mpl.colors.ListedColormap(['blue', 'red'])\n",
"mylegend = center_wrap([\"Visa Requirements\", \"For Colombian Citizens\"], cwidth=32, width=32)\n",
"MyChloropleth(mydf=col_visa, myfile='col_visa', myvar='visa_req', mylegend=mylegend, k=1, bbox_to_anchor=(0.25, 0.3),\n",
"MyChoropleth(mydf=col_visa, myfile='col_visa', myvar='visa_req', mylegend=mylegend, k=1, bbox_to_anchor=(0.25, 0.3),\n",
" edgecolor='white', facecolor='lightgray', cmap=cmap, scheme='UserDefined', bins=[0,1], legend_labels=['NO', 'YES'],\n",
" save=False)"
]
Expand Down Expand Up @@ -8335,7 +8335,7 @@
"col_visa = countries.merge(visadf, left_on='NAME_ES', right_on='countries_matched')\n",
"cmap = mpl.colors.ListedColormap(['blue', 'red'])\n",
"mylegend = center_wrap([\"Visa Requirements\", \"For Colombian Citizens\"], cwidth=32, width=32)\n",
"MyChloropleth(mydf=col_visa, myfile='col_visa', myvar='visa_req', mylegend=mylegend, k=1, bbox_to_anchor=(0.25, 0.3),\n",
"MyChoropleth(mydf=col_visa, myfile='col_visa', myvar='visa_req', mylegend=mylegend, k=1, bbox_to_anchor=(0.25, 0.3),\n",
" edgecolor='white', facecolor='lightgray', cmap=cmap, scheme='UserDefined', bins=[0,1], legend_labels=['NO', 'YES'],\n",
" save=False)"
]
Expand Down
8 changes: 4 additions & 4 deletions notebooks/GIS-with-Python.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2583,7 +2583,7 @@
" #lines = textwrap.wrap(text, **kw)\n",
" return \"\\n\".join(line.center(cwidth) for line in lines)\n",
"\n",
"def MyChloropleth(mydf=pwt.loc[pwt.year==2010], myfile='GDPpc2010', myvar='rgdpe_pc',\n",
"def MyChoropleth(mydf=pwt.loc[pwt.year==2010], myfile='GDPpc2010', myvar='rgdpe_pc',\n",
" mylegend='GDP per capita 2010',\n",
" k=5,\n",
" extent=[-180, -90, 180, 90],\n",
Expand Down Expand Up @@ -2696,7 +2696,7 @@
"gdppc = countries.merge(gdppc, left_on='ADM0_A3', right_on='countrycode')\n",
"gdppc = gdppc.dropna(subset=['rgdpe_pc'])\n",
"mylegend = center_wrap([\"GDP per capita in \" + str(year)], cwidth=32, width=32)\n",
"MyChloropleth(mydf=gdppc, myfile='PWT_GDP_' + str(year), myvar='rgdpe_pc', mylegend=mylegend, k=10, scheme='Quantiles', save=True)"
"MyChoropleth(mydf=gdppc, myfile='PWT_GDP_' + str(year), myvar='rgdpe_pc', mylegend=mylegend, k=10, scheme='Quantiles', save=True)"
]
},
{
Expand Down Expand Up @@ -2725,7 +2725,7 @@
"gdppc = countries.merge(gdppc, left_on='ADM0_A3', right_on='countrycode')\n",
"gdppc = gdppc.dropna(subset=['rgdpe_pc'])\n",
"mylegend = center_wrap([\"GDP per capita in \" + str(year)], cwidth=32, width=32)\n",
"MyChloropleth(mydf=gdppc, myfile='PWT_GDP_' + str(year), myvar='rgdpe_pc', mylegend=mylegend, k=10, scheme='Quantiles', save=True)"
"MyChoropleth(mydf=gdppc, myfile='PWT_GDP_' + str(year), myvar='rgdpe_pc', mylegend=mylegend, k=10, scheme='Quantiles', save=True)"
]
},
{
Expand Down Expand Up @@ -2754,7 +2754,7 @@
"gdppc = countries.merge(gdppc, left_on='ADM0_A3', right_on='countrycode')\n",
"gdppc = gdppc.dropna(subset=['pop'])\n",
"mylegend = center_wrap([\"Population in \" + str(year)], cwidth=32, width=32)\n",
"MyChloropleth(mydf=gdppc, myfile='PWT_POP_' + str(year), myvar='pop', mylegend=mylegend, k=10, scheme='Quantiles', save=True)"
"MyChoropleth(mydf=gdppc, myfile='PWT_POP_' + str(year), myvar='pop', mylegend=mylegend, k=10, scheme='Quantiles', save=True)"
]
},
{
Expand Down

0 comments on commit f41a960

Please sign in to comment.