吴裕雄--天生自然 python数据分析:加纳卫生设施数据分析
2024-09-01 16:59:54
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) # Any results you write to the current directory are saved as output.
import matplotlib.pyplot as plt
import seaborn as sns %matplotlib inline
path = "F:\\kaggleDataSet\\"
facility_tiers = pd.read_csv(path + os.listdir(path)[1])
facility_tiers.head()
facility_gh = pd.read_csv(path + os.listdir(path)[0])
facility_gh.head()
plt.figure(figsize=(12, 4))
ax = sns.countplot(facility_gh['Region'])
plt.title('Distribution of Regions')
plt.figure(figsize=(20, 6))
ax = sns.countplot(facility_gh['Ownership'])
plt.title('Distribution of Ownership')
from mpl_toolkits.basemap import Basemap fig = plt.figure()
m = Basemap(projection='cyl', llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=90, resolution='c',lat_ts=True)
m.drawcoastlines()
m.fillcontinents(color='#04BAE3', lake_color='#FFFFFF')
m.drawcountries()
m.drawmapboundary(fill_color='#FFFFFF') mloc = m(facility_gh['Latitude'].tolist(), facility_gh['Longitude'].tolist())
m.scatter(mloc[1], mloc[0], color='red', lw=3, alpha=0.3, zorder=5)
最新文章
- Linux 文件与目录管理
- C# Winform学习---MDI窗体的设计,PictureBox控件(图片上一页下一页),Timer控件,MenuStrip控件
- 公共代码参考(httpclient)
- R语言Data Frame数据框常用操作
- Centos: 修改 yum安装的mysql路径
- jquery 常用的备忘
- (DFS)hdoj1175:连连看
- Python 基础【第二篇】python操作模式
- ubantu下重启apache
- eclipse4.2 UI换回 3.6版本的UI
- Eclipse 枚举类报错
- 常见的XSS攻击代码
- 【BZOJ1857】传送带(三分)
- 【默认加入持久化机制,防止消息丢失,v0.0.3】对RabbitMQ.Client进行一下小小的包装,绝对实用方便
- aqua data studio 连接db2
- canvas简易画板。
- Nagios 系统监控
- Xshell使用笔记
- ArcGis Python脚本——批量添加字段
- HDU1875 畅通工程再续【最小生成树】
热门文章
- 追踪tracking
- python中__call__方法
- python获取当前的日期和时间
- dubbo的超时处理和配置覆盖
- 学习spring第四天
- Kubernetes系列三:二进制安装Kubernetes环境
- Chapter1. The Electromagnetic Model (Field and Wave Electromagnetics. Second Edition) David K. Cheng
- Codeforces Educational Round 81 解题报告
- python解一元一次方程
- opencv处理图像