Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ python3 main.py


# App Project
Se agrego el comando para intalar el entorno virtual

```sh
git clone
Expand Down
Binary file added app/chart_pie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/imgs/Colombia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ def run():
countries = list(map(lambda x: x['Country'], data))
percentages = list(map(lambda x: x['World Population Percentage'], data))
'''


#dataframe
df = pd.read_csv('data.csv')
df = df[df['Continent'] == 'Africa']

countries = df['Country'].values
percentages = df['World Population Percentage'].values
charts.generate_pie_chart(countries, percentages)
percetages = df['World Population Percentage'].values
charts.generate_pie_chart(countries, percetages)


data = read_csv.read_csv('data.csv')
country = input('Type Country => ')
Expand Down
27 changes: 14 additions & 13 deletions app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
contourpy==1.0.5
cycler==0.11.0
fonttools==4.37.4
kiwisolver==1.4.4
matplotlib==3.6.0
numpy==1.23.3
packaging==21.3
pandas==1.5.0
Pillow==9.2.0
pyparsing==3.0.9
python-dateutil==2.8.2
pytz==2022.4
six==1.16.0
contourpy==1.3.1
cycler==0.12.1
fonttools==4.56.0
kiwisolver==1.4.8
matplotlib==3.10.0
numpy==2.2.3
packaging==24.2
pandas==2.2.3
pillow==11.1.0
pyparsing==3.2.1
python-dateutil==2.9.0.post0
pytz==2025.1
six==1.17.0
tzdata==2025.1
10 changes: 0 additions & 10 deletions web-server/Dockerfile

This file was deleted.

9 changes: 0 additions & 9 deletions web-server/docker-compose.yml

This file was deleted.

19 changes: 2 additions & 17 deletions web-server/main.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
import store
from fastapi import FastAPI
from fastapi.responses import HTMLResponse

app = FastAPI()

@app.get('/')
def get_list():
return [1,2,3,]

@app.get('/contact', response_class=HTMLResponse)
def get_list():
return """
<h1>Hola soy una pagina</h1>
<p>soy un parrafo</p>
"""

def run():
store.get_categories()

if __name__ == '__main__':
if __name__ == "__main__":
run()
5 changes: 5 additions & 0 deletions web-server/requeriments.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
certifi==2025.1.31
charset-normalizer==3.4.1
idna==3.10
requests==2.32.3
urllib3==2.3.0
20 changes: 0 additions & 20 deletions web-server/requirements.txt

This file was deleted.

9 changes: 5 additions & 4 deletions web-server/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

def get_categories():
r = requests.get('https://api.escuelajs.co/api/v1/categories')
print(r.status_code)
print(r.text)
print(type(r.text))
categories = r.json()
print(categories)
print(type(categories))

for category in categories:
print(category['name'])
title = category['name']
print(title)