{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Lab 4\n", "(Prof. Carlos J. Costa)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "text=['{\"coordinates\": [-9.175, 38.701], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.175, 38.701], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.097068, 38.778466], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.14373, 38.70523], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.148443, 38.735188], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.152295, 38.737911], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.13828, 38.71383], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.1409, 38.75832], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.13416, 38.73736], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.09235, 38.774289], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.13608, 38.75784], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.15885, 38.75231], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.17526, 38.76014], \"type\": \"Point\"}',\n", "'{\"coordinates\": [-9.137337, 38.756487], \"type\": \"Point\"}' ]\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Create two lists one longitude and the other latitude." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**1.** Remove , ] and [ from text[0] and store in text_0" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**2.** Convert text_0 into a list" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**3.** Longtude is listText_0[1] and latitude is listText_0[2]" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**4.** Now Put all togeher" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.8.5" } }, "nbformat": 4, "nbformat_minor": 4 }