diff --git a/Data_Extraction_Output.zip b/Data_Extraction_Output.zip new file mode 100644 index 0000000..4f44095 Binary files /dev/null and b/Data_Extraction_Output.zip differ diff --git a/Project2_API.ipynb b/Project2_API.ipynb new file mode 100644 index 0000000..c2eb23c --- /dev/null +++ b/Project2_API.ipynb @@ -0,0 +1,834 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "715327f7-9895-4d46-9d29-25eecbd12824", + "metadata": {}, + "outputs": [], + "source": [ + "import requests\n", + "from bs4 import BeautifulSoup\n", + "import pandas as pd\n", + "# from pprint import pprint\n", + "# from lxml import html\n", + "# from lxml.html import fromstring\n", + "# import urllib.request\n", + "# from urllib.request import urlopen\n", + "# import random\n", + "import re\n", + "# import scrapy" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "38659742-f17b-4a6d-9d21-cc3fa48612c5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "response = requests.get('https://collectionapi.metmuseum.org/public/collection/v1/departments')\n", + "response" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "a9f766ea-1ff9-449f-b76d-8e0205a6e279", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "b'{\"departments\":[{\"departmentId\":1,\"displayName\":\"American Decorative Arts\"},{\"departmentId\":3,\"displayName\":\"Ancient Near Eastern Art\"},{\"departmentId\":4,\"displayName\":\"Arms and Armor\"},{\"departmentId\":5,\"displayName\":\"Arts of Africa, Oceania, and the Americas\"},{\"departmentId\":6,\"displayName\":\"Asian Art\"},{\"departmentId\":7,\"displayName\":\"The Cloisters\"},{\"departmentId\":8,\"displayName\":\"The Costume Institute\"},{\"departmentId\":9,\"displayName\":\"Drawings and Prints\"},{\"departmentId\":10,\"displayName\":\"Egyptian Art\"},{\"departmentId\":11,\"displayName\":\"European Paintings\"},{\"departmentId\":12,\"displayName\":\"European Sculpture and Decorative Arts\"},{\"departmentId\":13,\"displayName\":\"Greek and Roman Art\"},{\"departmentId\":14,\"displayName\":\"Islamic Art\"},{\"departmentId\":15,\"displayName\":\"The Robert Lehman Collection\"},{\"departmentId\":16,\"displayName\":\"The Libraries\"},{\"departmentId\":17,\"displayName\":\"Medieval Art\"},{\"departmentId\":18,\"displayName\":\"Musical Instruments\"},{\"departmentId\":19,\"displayName\":\"Photographs\"},{\"departmentId\":21,\"displayName\":\"Modern Art\"}]}'" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "response.content" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "60377405-ca48-4259-ba0b-3495d5723c83", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'departments': [{'departmentId': 1,\n", + " 'displayName': 'American Decorative Arts'},\n", + " {'departmentId': 3, 'displayName': 'Ancient Near Eastern Art'},\n", + " {'departmentId': 4, 'displayName': 'Arms and Armor'},\n", + " {'departmentId': 5,\n", + " 'displayName': 'Arts of Africa, Oceania, and the Americas'},\n", + " {'departmentId': 6, 'displayName': 'Asian Art'},\n", + " {'departmentId': 7, 'displayName': 'The Cloisters'},\n", + " {'departmentId': 8, 'displayName': 'The Costume Institute'},\n", + " {'departmentId': 9, 'displayName': 'Drawings and Prints'},\n", + " {'departmentId': 10, 'displayName': 'Egyptian Art'},\n", + " {'departmentId': 11, 'displayName': 'European Paintings'},\n", + " {'departmentId': 12,\n", + " 'displayName': 'European Sculpture and Decorative Arts'},\n", + " {'departmentId': 13, 'displayName': 'Greek and Roman Art'},\n", + " {'departmentId': 14, 'displayName': 'Islamic Art'},\n", + " {'departmentId': 15, 'displayName': 'The Robert Lehman Collection'},\n", + " {'departmentId': 16, 'displayName': 'The Libraries'},\n", + " {'departmentId': 17, 'displayName': 'Medieval Art'},\n", + " {'departmentId': 18, 'displayName': 'Musical Instruments'},\n", + " {'departmentId': 19, 'displayName': 'Photographs'},\n", + " {'departmentId': 21, 'displayName': 'Modern Art'}]}" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "json_departments = response.json()\n", + "json_departments" + ] + }, + { + "cell_type": "code", + "execution_count": 249, + "id": "a19214e6-7626-43a9-b9dd-e8f6bae72f2d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'departmentId': 1, 'displayName': 'American Decorative Arts'},\n", + " {'departmentId': 3, 'displayName': 'Ancient Near Eastern Art'},\n", + " {'departmentId': 4, 'displayName': 'Arms and Armor'},\n", + " {'departmentId': 5,\n", + " 'displayName': 'Arts of Africa, Oceania, and the Americas'},\n", + " {'departmentId': 6, 'displayName': 'Asian Art'},\n", + " {'departmentId': 7, 'displayName': 'The Cloisters'},\n", + " {'departmentId': 8, 'displayName': 'The Costume Institute'},\n", + " {'departmentId': 9, 'displayName': 'Drawings and Prints'},\n", + " {'departmentId': 10, 'displayName': 'Egyptian Art'},\n", + " {'departmentId': 11, 'displayName': 'European Paintings'},\n", + " {'departmentId': 12, 'displayName': 'European Sculpture and Decorative Arts'},\n", + " {'departmentId': 13, 'displayName': 'Greek and Roman Art'},\n", + " {'departmentId': 14, 'displayName': 'Islamic Art'},\n", + " {'departmentId': 15, 'displayName': 'The Robert Lehman Collection'},\n", + " {'departmentId': 16, 'displayName': 'The Libraries'},\n", + " {'departmentId': 17, 'displayName': 'Medieval Art'},\n", + " {'departmentId': 18, 'displayName': 'Musical Instruments'},\n", + " {'departmentId': 19, 'displayName': 'Photographs'},\n", + " {'departmentId': 21, 'displayName': 'Modern Art'}]" + ] + }, + "execution_count": 249, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "departments = json_departments.get('departments')\n", + "departments" + ] + }, + { + "cell_type": "code", + "execution_count": 250, + "id": "545580bd-2a10-4459-8fca-a05d66532d80", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "list" + ] + }, + "execution_count": 250, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type(departments)" + ] + }, + { + "cell_type": "code", + "execution_count": 254, + "id": "fcf69dc2-6cdf-4c2e-b06f-1f46949c2bdf", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1,\n", + " 'American Decorative Arts',\n", + " 3,\n", + " 'Ancient Near Eastern Art',\n", + " 4,\n", + " 'Arms and Armor',\n", + " 5,\n", + " 'Arts of Africa, Oceania, and the Americas',\n", + " 6,\n", + " 'Asian Art',\n", + " 7,\n", + " 'The Cloisters',\n", + " 8,\n", + " 'The Costume Institute',\n", + " 9,\n", + " 'Drawings and Prints',\n", + " 10,\n", + " 'Egyptian Art',\n", + " 11,\n", + " 'European Paintings',\n", + " 12,\n", + " 'European Sculpture and Decorative Arts',\n", + " 13,\n", + " 'Greek and Roman Art',\n", + " 14,\n", + " 'Islamic Art',\n", + " 15,\n", + " 'The Robert Lehman Collection',\n", + " 16,\n", + " 'The Libraries',\n", + " 17,\n", + " 'Medieval Art',\n", + " 18,\n", + " 'Musical Instruments',\n", + " 19,\n", + " 'Photographs',\n", + " 21,\n", + " 'Modern Art']" + ] + }, + "execution_count": 254, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "departments_list = [value for book in json_departments['departments'] for value in book.values()]\n", + "departments_list" + ] + }, + { + "cell_type": "code", + "execution_count": 255, + "id": "1a385117-99ae-4132-bd3d-d551b9cfabfc", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "list" + ] + }, + "execution_count": 255, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type(departments_list)" + ] + }, + { + "cell_type": "code", + "execution_count": 275, + "id": "a92e3dd8-ecb3-4cbf-a2c4-b52d2d167813", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21]" + ] + }, + "execution_count": 275, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "department_num = [num for num in departments_list if isinstance(num, (int,float))]\n", + "department_num" + ] + }, + { + "cell_type": "code", + "execution_count": 276, + "id": "be4ca82a-4537-4e86-a009-68993bf5f778", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['American Decorative Arts',\n", + " 'Ancient Near Eastern Art',\n", + " 'Arms and Armor',\n", + " 'Arts of Africa, Oceania, and the Americas',\n", + " 'Asian Art',\n", + " 'The Cloisters',\n", + " 'The Costume Institute',\n", + " 'Drawings and Prints',\n", + " 'Egyptian Art',\n", + " 'European Paintings',\n", + " 'European Sculpture and Decorative Arts',\n", + " 'Greek and Roman Art',\n", + " 'Islamic Art',\n", + " 'The Robert Lehman Collection',\n", + " 'The Libraries',\n", + " 'Medieval Art',\n", + " 'Musical Instruments',\n", + " 'Photographs',\n", + " 'Modern Art']" + ] + }, + "execution_count": 276, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "department_name = list(filter(lambda x: x not in index, departments_list))\n", + "department_name" + ] + }, + { + "cell_type": "code", + "execution_count": 328, + "id": "7b14e46d-8b8b-4eea-a620-e49b506574d1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Department
1American Decorative Arts
3Ancient Near Eastern Art
4Arms and Armor
5Arts of Africa, Oceania, and the Americas
6Asian Art
7The Cloisters
8The Costume Institute
9Drawings and Prints
10Egyptian Art
11European Paintings
12European Sculpture and Decorative Arts
13Greek and Roman Art
14Islamic Art
15The Robert Lehman Collection
16The Libraries
17Medieval Art
18Musical Instruments
19Photographs
21Modern Art
\n", + "
" + ], + "text/plain": [ + " Department\n", + "1 American Decorative Arts\n", + "3 Ancient Near Eastern Art\n", + "4 Arms and Armor\n", + "5 Arts of Africa, Oceania, and the Americas\n", + "6 Asian Art\n", + "7 The Cloisters\n", + "8 The Costume Institute\n", + "9 Drawings and Prints\n", + "10 Egyptian Art\n", + "11 European Paintings\n", + "12 European Sculpture and Decorative Arts\n", + "13 Greek and Roman Art\n", + "14 Islamic Art\n", + "15 The Robert Lehman Collection\n", + "16 The Libraries\n", + "17 Medieval Art\n", + "18 Musical Instruments\n", + "19 Photographs\n", + "21 Modern Art" + ] + }, + "execution_count": 328, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "departments_df= pd.DataFrame(department_name,department_num )\n", + "departments_df.columns = ['Department']\n", + "departments_df" + ] + }, + { + "cell_type": "code", + "execution_count": 335, + "id": "fa887750-c036-4264-ba96-44b0bb23d687", + "metadata": {}, + "outputs": [], + "source": [ + "departments_df.to_excel('project2-A.xlsx')" + ] + }, + { + "cell_type": "code", + "execution_count": 329, + "id": "81d0bea9-380a-4105-b872-5decc10055c6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 329, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#https://collectionapi.metmuseum.org/public/collection/v1/objects?departmentIds=3|9|12\n", + "objects_response = requests.get('https://collectionapi.metmuseum.org/public/collection/v1/objects?departmentIds=11')\n", + "objects_response" + ] + }, + { + "cell_type": "code", + "execution_count": 330, + "id": "4e3b8f8b-7035-496f-9806-82de782ed7a4", + "metadata": {}, + "outputs": [], + "source": [ + "objects_jason = objects_response.json()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 331, + "id": "1e599564-5de5-4d01-8a0c-876eea885ec3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[435657,\n", + " 435658,\n", + " 435659,\n", + " 435660,\n", + " 435661,\n", + " 435662,\n", + " 435663,\n", + " 435664,\n", + " 435665,\n", + " 435666,\n", + " 435668,\n", + " 435669,\n", + " 435670,\n", + " 435671,\n", + " 435672]" + ] + }, + "execution_count": 331, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "objects_list = objects_jason.get('objectIDs')\n", + "objects_list[:15]" + ] + }, + { + "cell_type": "code", + "execution_count": 339, + "id": "15893592-0e20-46cf-b21f-c086a0b7a2ed", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2619" + ] + }, + "execution_count": 339, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "objects_response_dep = len(objects_list)\n", + "objects_response_dep" + ] + }, + { + "cell_type": "code", + "execution_count": 363, + "id": "898793a9-6fb6-4306-947c-03128aa8fa5d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'Content-Type': 'application/json; charset=UTF-8', 'Vary': 'Origin', 'Access-Control-Allow-Origin': '*', 'X-Powered-By': 'ARR/3.0', 'Date': 'Sat, 03 Dec 2022 00:36:35 GMT', 'Set-Cookie': 'visid_incap_1662004=Qb1BHM8bTMSFWFIv9Ro2AOSZimMAAAAAQUIPAAAAAAAyZEGvIlKMgcLwfKGtGylh; expires=Sat, 02 Dec 2023 07:27:10 GMT; HttpOnly; path=/; Domain=.metmuseum.org, incap_ses_1059_1662004=b3Y4OJnimAVTJyTqD1OyDhSaimMAAAAAn5hQaFvoxtIiiEgBamf3hw==; path=/; Domain=.metmuseum.org', 'X-CDN': 'Imperva', 'Content-Encoding': 'gzip', 'Transfer-Encoding': 'chunked', 'X-Iinfo': '7-83399806-83399808 NNYY CT(63 134 0) RT(1670027795286 16) q(0 0 0 0) r(7 7) U12'}" + ] + }, + "execution_count": 363, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import time\n", + "object_response = requests.get('https://collectionapi.metmuseum.org/public/collection/v1/objects/437133')\n", + "h_object_response = object_response.headers\n", + "h_object_response" + ] + }, + { + "cell_type": "code", + "execution_count": 313, + "id": "f771df7a-9f8c-4217-8f35-a47d4d4bda6f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'objectID': 437133,\n", + " 'isHighlight': True,\n", + " 'accessionNumber': '67.241',\n", + " 'accessionYear': '1967',\n", + " 'isPublicDomain': False,\n", + " 'primaryImage': '',\n", + " 'primaryImageSmall': '',\n", + " 'additionalImages': [],\n", + " 'constituents': [{'constituentID': 162135,\n", + " 'role': 'Artist',\n", + " 'name': 'Claude Monet',\n", + " 'constituentULAN_URL': 'http://vocab.getty.edu/page/ulan/500019484',\n", + " 'constituentWikidata_URL': 'https://www.wikidata.org/wiki/Q296',\n", + " 'gender': ''}],\n", + " 'department': 'European Paintings',\n", + " 'objectName': 'Painting',\n", + " 'title': 'Garden at Sainte-Adresse',\n", + " 'culture': '',\n", + " 'period': '',\n", + " 'dynasty': '',\n", + " 'reign': '',\n", + " 'portfolio': '',\n", + " 'artistRole': 'Artist',\n", + " 'artistPrefix': '',\n", + " 'artistDisplayName': 'Claude Monet',\n", + " 'artistDisplayBio': 'French, Paris 1840–1926 Giverny',\n", + " 'artistSuffix': '',\n", + " 'artistAlphaSort': 'Monet, Claude',\n", + " 'artistNationality': 'French',\n", + " 'artistBeginDate': '1840',\n", + " 'artistEndDate': '1926',\n", + " 'artistGender': '',\n", + " 'artistWikidata_URL': 'https://www.wikidata.org/wiki/Q296',\n", + " 'artistULAN_URL': 'http://vocab.getty.edu/page/ulan/500019484',\n", + " 'objectDate': '1867',\n", + " 'objectBeginDate': 1867,\n", + " 'objectEndDate': 1867,\n", + " 'medium': 'Oil on canvas',\n", + " 'dimensions': '38 5/8 x 51 1/8 in. (98.1 x 129.9 cm)',\n", + " 'measurements': [{'elementName': 'Overall',\n", + " 'elementDescription': None,\n", + " 'elementMeasurements': {'Height': 98.1, 'Width': 129.9}},\n", + " {'elementName': 'Frame',\n", + " 'elementDescription': None,\n", + " 'elementMeasurements': {'Depth': 12.7,\n", + " 'Height': 133.3503,\n", + " 'Width': 166.3703}}],\n", + " 'creditLine': 'Purchase, special contributions and funds given or bequeathed by friends of the Museum, 1967',\n", + " 'geographyType': '',\n", + " 'city': '',\n", + " 'state': '',\n", + " 'county': '',\n", + " 'country': '',\n", + " 'region': '',\n", + " 'subregion': '',\n", + " 'locale': '',\n", + " 'locus': '',\n", + " 'excavation': '',\n", + " 'river': '',\n", + " 'classification': 'Paintings',\n", + " 'rightsAndReproduction': '',\n", + " 'linkResource': '',\n", + " 'metadataDate': '2022-11-30T04:47:42.047Z',\n", + " 'repository': 'Metropolitan Museum of Art, New York, NY',\n", + " 'objectURL': 'https://www.metmuseum.org/art/collection/search/437133',\n", + " 'tags': [{'term': 'Gardens',\n", + " 'AAT_URL': 'http://vocab.getty.edu/page/aat/300008090',\n", + " 'Wikidata_URL': 'https://www.wikidata.org/wiki/Q1107656'},\n", + " {'term': 'Men',\n", + " 'AAT_URL': 'http://vocab.getty.edu/page/aat/300025928',\n", + " 'Wikidata_URL': 'https://www.wikidata.org/wiki/Q8441'},\n", + " {'term': 'Women',\n", + " 'AAT_URL': 'http://vocab.getty.edu/page/aat/300025943',\n", + " 'Wikidata_URL': 'https://www.wikidata.org/wiki/Q467'},\n", + " {'term': 'Seas',\n", + " 'AAT_URL': 'http://vocab.getty.edu/page/aat/300008694',\n", + " 'Wikidata_URL': 'https://www.wikidata.org/wiki/Q165'},\n", + " {'term': 'Boats',\n", + " 'AAT_URL': 'http://vocab.getty.edu/page/aat/300178749',\n", + " 'Wikidata_URL': 'https://www.wikidata.org/wiki/Q35872'}],\n", + " 'objectWikidata_URL': 'https://www.wikidata.org/wiki/Q432253',\n", + " 'isTimelineWork': True,\n", + " 'GalleryNumber': '818'}" + ] + }, + "execution_count": 313, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "object_details = object_response.json()\n", + "object_details" + ] + }, + { + "cell_type": "code", + "execution_count": 319, + "id": "4a7e3a72-8d06-4021-86a0-377276103fe1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['Garden at Sainte-Adresse',\n", + " 'Claude Monet',\n", + " 'French, Paris 1840–1926 Giverny',\n", + " 'European Paintings']" + ] + }, + "execution_count": 319, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "keys ='title', 'artistDisplayName','artistDisplayBio','department'\n", + "values = list( map(object_details.get, keys) )\n", + "values\n", + "# values = ['bear', 'castle']" + ] + }, + { + "cell_type": "code", + "execution_count": 326, + "id": "e04810c6-fef7-4e7c-9975-ab90ddd2c4eb", + "metadata": {}, + "outputs": [], + "source": [ + "items = 'Title: ', 'Artist: ', 'Artist short bio:', 'Department: '" + ] + }, + { + "cell_type": "code", + "execution_count": 327, + "id": "409428a4-39ef-46df-829b-50bfc9e99672", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Materpiece info
Title:Garden at Sainte-Adresse
Artist:Claude Monet
Artist short bio:French, Paris 1840–1926 Giverny
Department:European Paintings
\n", + "
" + ], + "text/plain": [ + " Materpiece info\n", + "Title: Garden at Sainte-Adresse\n", + "Artist: Claude Monet\n", + "Artist short bio: French, Paris 1840–1926 Giverny\n", + "Department: European Paintings" + ] + }, + "execution_count": 327, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "object_df= pd.DataFrame(values, items)\n", + "object_df.columns = ['Materpiece info']\n", + "object_df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 336, + "id": "c70f97e0-3848-4aad-bf9b-cbec59159e66", + "metadata": {}, + "outputs": [], + "source": [ + "object_df.to_excel('project2-B.xlsx')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "55bf7886-975d-4c4f-8658-56f5e6ff14c2", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/README_data_extraction.md b/README_data_extraction.md new file mode 100644 index 0000000..c25c7dd --- /dev/null +++ b/README_data_extraction.md @@ -0,0 +1,9 @@ +The Metropolitan Museum of Art Collection API + +Elegí la API del MET porque se me hizo interesante poder acceder a la información de todas las obras que tiene este museo que es enorme. + +La documentación de la API es corta y sin muchas restricciones asì que no tuve problema para enviar las solicitudes. + +El enfoque de la extracción es de lo general a lo partícular, por ejemplo, primero extraje los departamentos o salas en las que se divide el museo, después quise contar el número de objetos de cada sala para después buscar una obra en particular que pueda mostrar en 5 puntos la información más importante de la misma. + +El resultado fue interesante aunque considero que necesito practicar mas con pandas porque fue lo más difícil para mí, \ No newline at end of file