Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
kburchfiel committed May 16, 2022
1 parent a9da47b commit 61db321
Showing 1 changed file with 17 additions and 141 deletions.
158 changes: 17 additions & 141 deletions us_diocese_mapper_V6.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4254,157 +4254,33 @@
"df_cd.to_csv('counties_by_diocese.csv')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Finding mean latitude and longitude points for each diocese (in order to determnie where to plot the diocese name)"
]
},
{
"cell_type": "code",
"execution_count": 126,
"execution_count": 127,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[42.015123,\n",
" 41.848482,\n",
" 41.87262,\n",
" 41.860063,\n",
" 41.869928,\n",
" 41.85759,\n",
" 41.867252,\n",
" 41.862274,\n",
" 41.869523,\n",
" 41.882324,\n",
" 41.888447,\n",
" 41.90609,\n",
" 41.938713,\n",
" 41.953301,\n",
" 41.948012,\n",
" 41.953739,\n",
" 41.972743,\n",
" 41.992418,\n",
" 42.008168,\n",
" 42.002192,\n",
" 42.006605,\n",
" 42.041603,\n",
" 42.314094,\n",
" 42.336444,\n",
" 42.348536,\n",
" 42.358584,\n",
" 42.365305,\n",
" 42.381282,\n",
" 42.415998,\n",
" 42.462391,\n",
" 42.479613,\n",
" 42.486731,\n",
" 42.506456,\n",
" 42.509336,\n",
" 42.510767,\n",
" 42.554611,\n",
" 42.56759,\n",
" 42.588556,\n",
" 42.594318,\n",
" 42.608499,\n",
" 42.623026,\n",
" 42.631034,\n",
" 42.64381,\n",
" 42.674481,\n",
" 42.718653,\n",
" 42.729211,\n",
" 42.751496,\n",
" 42.784941,\n",
" 42.811718,\n",
" 42.8176,\n",
" 42.824379,\n",
" 42.834282,\n",
" 42.845016,\n",
" 42.87222,\n",
" 42.880664,\n",
" 43.052469,\n",
" 43.077651,\n",
" 43.075303,\n",
" 43.082543,\n",
" 43.088445,\n",
" 43.227333,\n",
" 43.23448,\n",
" 43.230649,\n",
" 43.241048,\n",
" 43.255174,\n",
" 43.246903,\n",
" 43.258328,\n",
" 43.260091,\n",
" 43.305159,\n",
" 43.304165,\n",
" 43.325175,\n",
" 43.330705,\n",
" 44.095939,\n",
" 44.0504,\n",
" 44.070089,\n",
" 43.486677,\n",
" 43.339826,\n",
" 43.228115,\n",
" 43.241635,\n",
" 43.214684,\n",
" 43.217772,\n",
" 43.221403,\n",
" 43.248165,\n",
" 43.253979,\n",
" 43.728703,\n",
" 43.808481,\n",
" 43.771387,\n",
" 43.743855,\n",
" 43.725329,\n",
" 43.690214,\n",
" 43.652451,\n",
" 43.642599,\n",
" 43.621687,\n",
" 43.587036,\n",
" 43.568087,\n",
" 43.5772,\n",
" 43.59077,\n",
" 43.604848,\n",
" 43.62449,\n",
" 43.628333,\n",
" 43.609777,\n",
" 43.599235,\n",
" 43.579373,\n",
" 43.56495,\n",
" 43.53496,\n",
" 43.523174,\n",
" 42.837558,\n",
" 42.834093,\n",
" 42.813856,\n",
" 42.80192,\n",
" 42.746019,\n",
" 42.745851,\n",
" 42.086134,\n",
" 42.049624,\n",
" 42.049966,\n",
" 41.97798,\n",
" 42.005488,\n",
" 42.078106,\n",
" 42.078778,\n",
" 42.127293,\n",
" 42.176992,\n",
" 42.163365,\n",
" 42.162134,\n",
" 42.170386,\n",
" 42.096589,\n",
" 42.114346,\n",
" 42.169225,\n",
" 42.14492,\n",
" 42.146475,\n",
" 42.121484,\n",
" 42.015123]"
]
},
"execution_count": 126,
"metadata": {},
"output_type": "execute_result"
"name": "stdout",
"output_type": "stream",
"text": [
"-74.61811626717558 42.75728092366412\n"
]
}
],
"source": [
"coord_list = str(diocese_boundaries.iloc[0,0]).replace('POLYGON ((', '').replace('))', '').split(', ')\n",
"coord_list = str(diocese_boundaries.iloc[0,diocese_boundaries.columns.get_loc('geometry')]).replace('POLYGON ((', '').replace('))', '').split(', ')\n",
"lon_list = [float(entry.split(' ')[0]) for entry in coord_list]\n",
"lat_list = [float(entry.split(' ')[1]) for entry in coord_list]\n",
"lat_list"
"mean_lon = np.mean(lon_list)\n",
"mean_lat = np.mean(lat_list)\n",
"print(mean_lon, mean_lat)"
]
},
{
Expand Down

0 comments on commit 61db321

Please sign in to comment.