6 releases (3 breaking)
Uses new Rust 2024
new 0.4.1 | May 13, 2025 |
---|---|
0.4.0 | May 13, 2025 |
0.3.1 | May 12, 2025 |
0.2.0 | May 12, 2025 |
0.1.0 | May 11, 2025 |
#2 in #earth
293 downloads per month
4.5MB
world-data
A rust crate containing country shapes as polygons, capital city positions and more.
Usage
fn main() {
let data = world_data::load();
let country_us = data.countries.get("US").unwrap();
println!("{}", country_us.official_name);
let capital_de = data.capitals.get("Berlin").unwrap();
println!("{:#?}", capital_de);
}
Sources
- Country metadata JSON: https://restcountries.com
- Country flags: https://github.com/hampusborgos/country-flags
- geojson files: https://github.com/nvkelso/natural-earth-vector
Dependencies
~8.5MB
~153K SLoC