August 2017
Beginner to intermediate
334 pages
8h 22m
English
Remember that from the preceding bar graph, the highest number of deaths were caused by cancer in California in 1999. Let's overlay the cancer information on the graphs now. This can be done by merging two pandas DataFrames--the state boundaries dataframe and cancer death in 1999 dataframe--into one dataframe, followed by the GeoPandas plot function with column and cmap specified.
However, one minor issue is that the states in the refined_states dataframe are named under the column NAME instead of STATE. We will have to rename that particular column in refined_states dataframe before we perform the merger. Here is the code:
# Extracting all the cancer data in year 1999 cancer_year1999_df = ...
Read now
Unlock full access