Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
henchc committed Oct 3, 2017
1 parent 93d44be commit 8453cb2
Show file tree
Hide file tree
Showing 33 changed files with 9 additions and 362 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"[Dada](https://en.wikipedia.org/wiki/Dada), an art and literature movement which stemmed as a reaction to the physical and psychological trauma wrought by World War I, a conflict unmatched at the time in its scale, death toll, and devastation.\n",
"\n",
"Below is a painting by [Max Ernst](https://en.wikipedia.org/wiki/Max_Ernst), a prominent German Dada artist.\n",
"<img src=\"ernst.jpg\">"
"<img src=\"img/ernst.jpg\">"
]
},
{
Expand Down Expand Up @@ -102,7 +102,7 @@
"source": [
"from htrc_features import FeatureReader\n",
"\n",
"with open(\"paths.txt\", \"r\") as f:\n",
"with open(\"data/paths.txt\", \"r\") as f:\n",
" paths = [os.path.join(\"\", line[:len(line)-1]) for line in f.readlines()]\n",
" f.close()\n",
"\n",
Expand Down Expand Up @@ -615,7 +615,7 @@
}
],
"source": [
"with open('marc-codes.txt', 'r') as f:\n",
"with open('data/marc-codes.txt', 'r') as f:\n",
" raw = f.read()\n",
" \n",
"marc_codes = {line.split('\\t')[0]:line.split('\\t')[1] for line in raw.split('\\n')}\n",
Expand Down Expand Up @@ -1499,7 +1499,7 @@
"outputs": [],
"source": [
"#Saves our current table as a Comma Separated Values file\n",
"locations.to_csv(\"locations_table.csv\")"
"locations.to_csv(\"data/locations_table.csv\")"
]
},
{
Expand All @@ -1510,7 +1510,7 @@
},
"outputs": [],
"source": [
"locations = pd.read_csv(\"locations_table.csv\")\n",
"locations = pd.read_csv(\"data/locations_table.csv\")\n",
"locations = locations.drop([\"Unnamed: 0\"], axis=1)"
]
},
Expand Down Expand Up @@ -1933,7 +1933,7 @@
],
"source": [
"# Reads in a file containing the names of the US states, (and Washington D.C)\n",
"with open('us_states.txt', 'r') as f:\n",
"with open('data/us_states.txt', 'r') as f:\n",
" states = f.read()\n",
" states = states.replace(\"\\n\", \"\")\n",
"states"
Expand Down Expand Up @@ -2527,7 +2527,7 @@
"###############################################################################################################\n",
"\n",
"#Here we are reading in a shape file, which places state boundary information for our Basemap \n",
"us_locations_map.readshapefile(\"us_shapefiles/cb_2016_us_state_20m\", \"us_states\")\n",
"us_locations_map.readshapefile(\"data/us_shapefiles/cb_2016_us_state_20m\", \"us_states\")\n",
"\n",
"#Finding the state names from the shapefiles\n",
"state_names = []\n",
Expand Down Expand Up @@ -2643,7 +2643,7 @@
" plt.annotate(np.array(us_locations[\"Location Name\"])[i], lat_lon, fontsize=7)\n",
"\n",
"#Here we are reading in a shape file, which places state boundary information for our Basemap \n",
"us_locations_map.readshapefile(\"us_shapefiles/cb_2016_us_state_20m\", \"us_states\")\n",
"us_locations_map.readshapefile(\"data/us_shapefiles/cb_2016_us_state_20m\", \"us_states\")\n",
"\n",
"#Finding the state names from the shapefiles\n",
"state_names = []\n",
Expand Down Expand Up @@ -2902,7 +2902,7 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python [default]",
"language": "python",
"name": "python3"
},
Expand Down
99 changes: 0 additions & 99 deletions 03-mapping/Setup Cells.ipynb

This file was deleted.

Loading

0 comments on commit 8453cb2

Please sign in to comment.