data representation on a map

Good Morning,

I need some help to map some data.

I want a representation of data over a City in Canada, New Scotia / Nouvelle Ecosse. this city contains 18 localities, and i have data for the localities. only that!

i just want to show through the color scale, which localities get higher and lower level.

thank you in advance!!

DATA dput:, just copy and paste

c(Annapolis = 3653.30659102977, Antigonish = 3712.62429327225,
Cape Breton = 3882.5346953253, Colchester = 3344.46978128122,
Cumberland = 3446.30699918862, Digby = 3930.25774745529, Guysborough = 4728.91770419482,
Halifax = 4931.01793102624, Hants = 3527.01107669592, Inverness = 4984.12066792489,
Kings = 3418.37679650478, Lunenburg = 4305.09378594679, Pictou = 3480.06548869454,
Queens = 4203.61625560652, Richmond = 4512.80076133288, Shelburne = 4151.03133200078,
Victoria = 5284.46411703385, Yarmouth = 3670.22279543214)

cancensus has files need for mapping. For coloring guides

According to this exemple I gotta know the CMA/CA for Nova Scotia, what is it?
I have my own data to put on the plot, not the census data.
Please, can you be clearer?

You don't need census data.Because simple features are just a data frame with a column for geometry, you can swap them out for your own data, provided it is keyed to your Nova Scotia counties or equivalent subdivision.

See wiki for codes

is there any other way?
the package cancensus is not available for my R version

i tried this way:

CAN.adm1 <- getData("GADM", country = "CAN", level = 1)
CAN.adm2 <- getData("GADM", country = "CAN", level = 2)
NS.adm2 <- subset(CAN.adm2, NAME_1=="Nova Scotia")
NS.adm2$NAME_2 #(to see the list names)
NS.adm2$NAME_2
[1] "Annapolis" "Antigonish" "Cape Breton" "Colchester" "Cumberland" "Digby" "Guysborough" "Halifax"
[9] "Hants" "Inverness" "Kings" "Lunenburg" "Pictou" "Queens" "Richmond" "Shelburne"
[17] "Victoria" "Yarmouth"

this gave me the greographical data of Nova Scotia,
then how can I intertwin the geographical data with my data for each city in Nova Scotia, an plot them?

This is the plot of the area (NS.adm2)
i just want to put the color inside according to the data scale/proportion

i did make it this way. would you mind helping me please?

The vignette explains how to obtain the spatial data by itself and its use in thematic mapping.

cancensus is current and recently updated. The likely reason for a "not available message" is mis-typing the install command

install.packages("cancensus") # right
# install.packages(cancensus) # wrong, no quotes
# install.packages("cansensus") # wrong, misspelled

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.