Usually in a home the risk factor is not significant. Most fires do not start on the floor material, but those that do iniciate accidentally on the floor the cause is electrical form a power strip or overloaded cord.
For example throwing a cigarette or lighted match on the carpet will result in a small damaged area, instead of ignition since there is not enough heat source to sustain a fire.
By US safety standards Carpets and rugs are designed to resist ignition.
Carpets are not a major fire risk when considering it against ceramic flooring. But you should avoid using carpet in an area like a garage where it could soak up flammable liquids or sustained heat sources.
However there are some cheap carpets from China that do have a higher risk of fire. Be careful with any carpet or rug market as “flammable” or “combustible” like Microfiber Memory Foam Bath Mat.
So carpets are not really a high risk of getting fire, they are usually the last thing to burn. You should really be more concerned when choosing a carpet about the care it needs to have, are you going to clean it up on a regular basis, vacuum it? Floors are usually easier to clean, but carpets do look more beautiful and give a very comfortable look.