US-Medical-Costs Project Feedback Welcome!

Hi everyone! Here is the code for my US Medical Costs projects and I would love any feedback you have. It took me about 3 days to work my way through this one and really decide how I wanted to do this. I found it to be a fun and interesting project to work on! Thanks for your time!

1 Like

I have a few suggestions to improve your project:

  1. Always is a good idea to code functions, but I think that is excessive to write a function to load the csv file and to create the dictionary because thees process you only did 1 time.

  2. You can save work in the region anlysis function if you prove this function:

def count(registro, keyword):
lista_unica =
lista_total =
eventos_por_lista =
for record in registro:
if record[keyword] not in lista_unica:

for data in lista_unica:
    eventos_por_lista.append((data, lista_total.count(data)))
return lista_unica, lista_total, eventos_por_lista

It receives the list wich you wan to iterate ant the field “keyword”, in this case “region”. It returs, the variable eventos_por lista_ returns a tuple with the number of events for option.

  1. Nice job!