├── README.md ├── Times_SimSun.ttf ├── data ├── guerry │ ├── .ipynb_checkpoints │ │ └── Guerry_documentation-checkpoint.html │ ├── Guerry_documentation.html │ ├── guerry.dbf │ ├── guerry.geojson │ ├── guerry.prj │ ├── guerry.shp │ └── guerry.shx ├── 上海市POI数据_2018.zip └── 上海市共享单车数据_20180826.zip ├── fig ├── gwr变量.png ├── h18结果.png ├── h18绘图.png ├── h3结果.png ├── h3绘图.png ├── poi统计.png ├── 不同时段分布.png ├── 参考文献.png ├── 变量空间分布.png ├── 时间分布.png ├── 空间分布.png └── 莫兰指数.png ├── set_font.py ├── 城市环境对共享单车的影响分析.ipynb └── 空间数据探索性分析.ipynb /README.md: -------------------------------------------------------------------------------- 1 | # 简介 2 | 3 | 参考文献:[Revealing the Varying Impact of Urban Built Environment on Online Car-Hailing Travel in Spatio-Temporal Dimension: An Exploratory Analysis in Chengdu, China](https://www.mdpi.com/2071-1050/11/5/1336) 4 |
5 | 6 | 2018年8月26日的上海市共享单车的空间分布: 7 |
8 | 9 | - 使用上海市共享单车数据和POI数据,数据时间均为2018年 10 | - 使用逐步回归确定需要的城市环境变量-自变量 11 | - 分别选择3点和18点的共享单车出行数据作为因变量:出行差异大 12 |
13 | - 使用地理加权回归模型进行分析 14 | 15 | # 结果 16 | 17 | 各变量莫兰指数: 18 |
19 | 20 | 3点的结果: 21 |
22 | 23 | 18点的结果: 24 |
25 | 26 | - 很明显,这些变量在空间上对共享单车出行的影响不同 27 | -------------------------------------------------------------------------------- /Times_SimSun.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/Times_SimSun.ttf -------------------------------------------------------------------------------- /data/guerry/.ipynb_checkpoints/Guerry_documentation-checkpoint.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 23 | 24 | 25 |

Guerry

26 |

Data provided "as is", no warranties.
27 | Socioeconomic data for 1830 France, collected by Andre-Michel Guerry.
28 | Data derived from the R package Guerry (Michael Friendly and Stephane Dray).See bottom of page for details on sources. 

29 |

Type = comma separated file
30 | Observations = 85
31 | Variables = 23
32 |

33 | 34 | 35 | 36 | 39 | 42 | 45 | 46 | 47 | 50 | 53 | 56 | 57 | 58 | 61 | 64 | 67 | 68 | 69 | 72 | 76 | 79 | 80 | 81 | 84 | 87 | 90 | 91 | 92 | 95 | 98 | 101 | 102 | 103 | 106 | 109 | 112 | 113 | 114 | 117 | 120 | 123 | 124 | 125 | 128 | 131 | 134 | 135 | 136 | 139 | 142 | 145 | 146 | 147 | 150 | 153 | 156 | 157 | 158 | 161 | 164 | 167 | 168 | 169 | 172 | 175 | 178 | 179 | 180 | 183 | 186 | 189 | 190 | 191 | 194 | 197 | 200 | 201 | 202 | 205 | 208 | 211 | 212 | 213 | 216 | 219 | 222 | 223 | 224 | 227 | 230 | 233 | 234 | 235 | 238 | 241 | 244 | 245 | 246 | 249 | 252 | 255 | 256 | 257 | 260 | 264 | 267 | 268 | 269 | 272 | 275 | 278 | 279 | 280 | 283 | 286 | 289 | 290 | 291 | 294 | 297 | 300 | 301 | 302 |
37 |

Variable

38 |
40 |

Description

41 |
43 |

Source

44 |
48 |

dept

49 |
51 |

Department ID: Standard numbers for the departments, except for Corsica (200)

52 |
54 |


55 |
59 |

Region

60 |
62 |

Region of France ('N'='North', 'S'='South', 'E'='East', 'W'='West', 'C'='Central'). Corsica is coded as NA

63 |
65 |


66 |
70 |

Department

71 |
73 |

Department name: Departments are named according to usage in 1830, but without accents. 

74 |

A factor with levels Ain Aisne Allier ... Vosges Yonne

75 |
77 |


78 |
82 |

Crime_pers

83 |
85 |

Population per Crime against persons.

86 |
88 |

A2 (Compte général, 1825-1830)

89 |
93 |

Crime_prop

94 |
96 |

Population per Crime against property.

97 |
99 |

A2 (Compte général, 1825-1830)

100 |
104 |

Literacy

105 |
107 |

Percent Read & Write: Percent of military conscripts who can read and write.

108 |
110 |

A2 

111 |
115 |

Donations

116 |
118 |

Donations to the poor.

119 |
121 |

A2 (Bulletin des lois)

122 |
126 |

Infants

127 |
129 |

Population per illegitimate birth.

130 |
132 |

A2 (Bureaau des Longitudes, 1817-1821)

133 |
137 |

Suicides

138 |
140 |

Population per suicide.

141 |
143 |

A2 (Compte général, 1827-1830)

144 |
148 |

MainCity

149 |
151 |

Size of principal city ('1:Sm', '2:Med', '3:Lg'), used as a surrogate for poulation density. Large refers to the top 10, small to the bottom 10; all the rest are classed Medium.

152 |
154 |

A1. An ordered factor with levels

155 |
159 |

Wealth

160 |
162 |

Per capita tax on personal property. A ranked index based on taxes on personal and movable property per inhabitant.

163 |
165 |

A1

166 |
170 |

Commerce

171 |
173 |

Commerce and Industry, measured by the rank of the number of patents / population.

174 |
176 |

A1

177 |
181 |

Clergy

182 |
184 |

Distribution of clergy, measured by the rank of the number of Catholic priests in active service / population.

185 |
187 |

A1 (Almanach officiel du clergy, 1829)

188 |
192 |

Crime_parents

193 |
195 |

Crimes against parents, measured by the rank of the ratio of crimes against parents to all crimes– Average for the years 1825-1830.

196 |
198 |

A1 (Compte général)

199 |
203 |

Infanticide

204 |
206 |

Infanticides per capita. A ranked ratio of number of infanticides to population– Average for the years 1825-1830.

207 |
209 |

A1 (Compte général)

210 |
214 |

Donation_clergy

215 |
217 |

Donations to the clergy. A ranked ratio of the number of bequests and donations inter vivios to population– Average for the years 1815-1824.

218 |
220 |

Source: A1 (Bull. des lois, ordunn. d'autorisation)

221 |
225 |

Lottery

226 |
228 |

Per capita wager on Royal Lottery. Ranked ratio of the proceeds bet on the royal lottery to population— Average for the years 1822-1826.

229 |
231 |

A1 (Compte rendus par le ministre des finances)

232 |
236 |

Desertion

237 |
239 |

Military disertion, ratio of the number of young soldiers accused of desertion to the force of the military contingent, minus the deficit produced by the insufficiency of available billets– Average of the years 1825-1827.

240 |
242 |

A1 (Compte du ministere du guerre, 1829 etat V)

243 |
247 |

Instruction

248 |
250 |

Instruction. Ranks recorded from Guerry's map of Instruction. Note: this is inversely related to Literacy (as defined here)

251 |
253 |


254 |
258 |

Prostitutes

259 |
261 |

Prostitutes in Paris.

262 |

Number of prostitutes registered in Paris from 1816 to 1834, classified by the department of their birth

263 |
265 |

Source: Parent-Duchatelet (1836), De la prostitution en Paris

266 |
270 |

Distance

271 |
273 |

Distance to Paris (km). Distance of each department centroid to the centroid of the Seine (Paris)

274 |
276 |

Source: cakculated from department centroids

277 |
281 |

Area

282 |
284 |

Area (1000 km^2).

285 |
287 |

Angeville (1836)

288 |
292 |

Pop1831

293 |
295 |

1831 population. Population in 1831

296 |
298 |

taken from Angeville (1836), Essai sur la Statistique de la Population français, in 1000s

299 |
303 |

Prepared by Center for Spatial Data Science. Last updated February 13, 2017.

304 |

Details

305 |

Note that most of the variables (e.g., Crime_pers) are scaled so that more is “better”. 

306 |

Values for the quantitative variables displayed on Guerry's maps were taken from Table A2 in the English translation of Guerry (1833) by Whitt and Reinking. Values for the ranked variables were taken from Table A1, with some corrections applied. The maximum is indicated by rank 1, and the minimum by rank 86. 

307 |

Sources

308 |

Angeville, A. (1836). Essai sur la Statistique de la Population francaise Paris: F. Doufour. 

309 |

Guerry, A.-M. (1833). Essai sur la statistique morale de la France Paris: Crochard. English translation: Hugh P. Whitt and Victor W. Reinking, Lewiston, N.Y. : Edwin Mellen Press, 2002. 

310 |

Parent-Duchatelet, A. (1836). De la prostitution dans la ville de Paris, 3rd ed, 1857, p. 32, 36 

311 |

References

312 |

Dray, S. and Jombart, T. (2011). A Revisit Of Guerry's Data: Introducing Spatial Constraints In Multivariate Analysis. The Annals of Applied Statistics, Vol. 5, No. 4, 2278-2299. http://arxiv.org/pdf/1202.6485.pdf, DOI: 10.1214/10-AOAS356. 

313 |

Brunsdon, C. and Dykes, J. (2007). Geographically weighted visualization: interactive graphics for scale-varying exploratory analysis. Geographical Information Science Research Conference (GISRUK 07), NUI Maynooth, Ireland, April, 2007. 

314 |

Friendly, M. (2007). A.-M. Guerry's Moral Statistics of France: Challenges for Multivariable Spatial Analysis. Statistical Science, 22, 368-399. 

315 |

Friendly, M. (2007). Data from A.-M. Guerry, Essay on the Moral Statistics of France (1833), http://datavis.ca/gallery/guerry/guerrydat.html. 

316 |

See Also

317 |

The Guerry package for maps of France: gfrance and related data. 

318 |


319 | 320 | 321 | -------------------------------------------------------------------------------- /data/guerry/Guerry_documentation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 23 | 24 | 25 |

Guerry

26 |

Data provided "as is", no warranties.
27 | Socioeconomic data for 1830 France, collected by Andre-Michel Guerry.
28 | Data derived from the R package Guerry (Michael Friendly and Stephane Dray).See bottom of page for details on sources. 

29 |

Type = comma separated file
30 | Observations = 85
31 | Variables = 23
32 |

33 | 34 | 35 | 36 | 39 | 42 | 45 | 46 | 47 | 50 | 53 | 56 | 57 | 58 | 61 | 64 | 67 | 68 | 69 | 72 | 76 | 79 | 80 | 81 | 84 | 87 | 90 | 91 | 92 | 95 | 98 | 101 | 102 | 103 | 106 | 109 | 112 | 113 | 114 | 117 | 120 | 123 | 124 | 125 | 128 | 131 | 134 | 135 | 136 | 139 | 142 | 145 | 146 | 147 | 150 | 153 | 156 | 157 | 158 | 161 | 164 | 167 | 168 | 169 | 172 | 175 | 178 | 179 | 180 | 183 | 186 | 189 | 190 | 191 | 194 | 197 | 200 | 201 | 202 | 205 | 208 | 211 | 212 | 213 | 216 | 219 | 222 | 223 | 224 | 227 | 230 | 233 | 234 | 235 | 238 | 241 | 244 | 245 | 246 | 249 | 252 | 255 | 256 | 257 | 260 | 264 | 267 | 268 | 269 | 272 | 275 | 278 | 279 | 280 | 283 | 286 | 289 | 290 | 291 | 294 | 297 | 300 | 301 | 302 |
37 |

Variable

38 |
40 |

Description

41 |
43 |

Source

44 |
48 |

dept

49 |
51 |

Department ID: Standard numbers for the departments, except for Corsica (200)

52 |
54 |


55 |
59 |

Region

60 |
62 |

Region of France ('N'='North', 'S'='South', 'E'='East', 'W'='West', 'C'='Central'). Corsica is coded as NA

63 |
65 |


66 |
70 |

Department

71 |
73 |

Department name: Departments are named according to usage in 1830, but without accents. 

74 |

A factor with levels Ain Aisne Allier ... Vosges Yonne

75 |
77 |


78 |
82 |

Crime_pers

83 |
85 |

Population per Crime against persons.

86 |
88 |

A2 (Compte général, 1825-1830)

89 |
93 |

Crime_prop

94 |
96 |

Population per Crime against property.

97 |
99 |

A2 (Compte général, 1825-1830)

100 |
104 |

Literacy

105 |
107 |

Percent Read & Write: Percent of military conscripts who can read and write.

108 |
110 |

A2 

111 |
115 |

Donations

116 |
118 |

Donations to the poor.

119 |
121 |

A2 (Bulletin des lois)

122 |
126 |

Infants

127 |
129 |

Population per illegitimate birth.

130 |
132 |

A2 (Bureaau des Longitudes, 1817-1821)

133 |
137 |

Suicides

138 |
140 |

Population per suicide.

141 |
143 |

A2 (Compte général, 1827-1830)

144 |
148 |

MainCity

149 |
151 |

Size of principal city ('1:Sm', '2:Med', '3:Lg'), used as a surrogate for poulation density. Large refers to the top 10, small to the bottom 10; all the rest are classed Medium.

152 |
154 |

A1. An ordered factor with levels

155 |
159 |

Wealth

160 |
162 |

Per capita tax on personal property. A ranked index based on taxes on personal and movable property per inhabitant.

163 |
165 |

A1

166 |
170 |

Commerce

171 |
173 |

Commerce and Industry, measured by the rank of the number of patents / population.

174 |
176 |

A1

177 |
181 |

Clergy

182 |
184 |

Distribution of clergy, measured by the rank of the number of Catholic priests in active service / population.

185 |
187 |

A1 (Almanach officiel du clergy, 1829)

188 |
192 |

Crime_parents

193 |
195 |

Crimes against parents, measured by the rank of the ratio of crimes against parents to all crimes– Average for the years 1825-1830.

196 |
198 |

A1 (Compte général)

199 |
203 |

Infanticide

204 |
206 |

Infanticides per capita. A ranked ratio of number of infanticides to population– Average for the years 1825-1830.

207 |
209 |

A1 (Compte général)

210 |
214 |

Donation_clergy

215 |
217 |

Donations to the clergy. A ranked ratio of the number of bequests and donations inter vivios to population– Average for the years 1815-1824.

218 |
220 |

Source: A1 (Bull. des lois, ordunn. d'autorisation)

221 |
225 |

Lottery

226 |
228 |

Per capita wager on Royal Lottery. Ranked ratio of the proceeds bet on the royal lottery to population— Average for the years 1822-1826.

229 |
231 |

A1 (Compte rendus par le ministre des finances)

232 |
236 |

Desertion

237 |
239 |

Military disertion, ratio of the number of young soldiers accused of desertion to the force of the military contingent, minus the deficit produced by the insufficiency of available billets– Average of the years 1825-1827.

240 |
242 |

A1 (Compte du ministere du guerre, 1829 etat V)

243 |
247 |

Instruction

248 |
250 |

Instruction. Ranks recorded from Guerry's map of Instruction. Note: this is inversely related to Literacy (as defined here)

251 |
253 |


254 |
258 |

Prostitutes

259 |
261 |

Prostitutes in Paris.

262 |

Number of prostitutes registered in Paris from 1816 to 1834, classified by the department of their birth

263 |
265 |

Source: Parent-Duchatelet (1836), De la prostitution en Paris

266 |
270 |

Distance

271 |
273 |

Distance to Paris (km). Distance of each department centroid to the centroid of the Seine (Paris)

274 |
276 |

Source: cakculated from department centroids

277 |
281 |

Area

282 |
284 |

Area (1000 km^2).

285 |
287 |

Angeville (1836)

288 |
292 |

Pop1831

293 |
295 |

1831 population. Population in 1831

296 |
298 |

taken from Angeville (1836), Essai sur la Statistique de la Population français, in 1000s

299 |
303 |

Prepared by Center for Spatial Data Science. Last updated February 13, 2017.

304 |

Details

305 |

Note that most of the variables (e.g., Crime_pers) are scaled so that more is “better”. 

306 |

Values for the quantitative variables displayed on Guerry's maps were taken from Table A2 in the English translation of Guerry (1833) by Whitt and Reinking. Values for the ranked variables were taken from Table A1, with some corrections applied. The maximum is indicated by rank 1, and the minimum by rank 86. 

307 |

Sources

308 |

Angeville, A. (1836). Essai sur la Statistique de la Population francaise Paris: F. Doufour. 

309 |

Guerry, A.-M. (1833). Essai sur la statistique morale de la France Paris: Crochard. English translation: Hugh P. Whitt and Victor W. Reinking, Lewiston, N.Y. : Edwin Mellen Press, 2002. 

310 |

Parent-Duchatelet, A. (1836). De la prostitution dans la ville de Paris, 3rd ed, 1857, p. 32, 36 

311 |

References

312 |

Dray, S. and Jombart, T. (2011). A Revisit Of Guerry's Data: Introducing Spatial Constraints In Multivariate Analysis. The Annals of Applied Statistics, Vol. 5, No. 4, 2278-2299. http://arxiv.org/pdf/1202.6485.pdf, DOI: 10.1214/10-AOAS356. 

313 |

Brunsdon, C. and Dykes, J. (2007). Geographically weighted visualization: interactive graphics for scale-varying exploratory analysis. Geographical Information Science Research Conference (GISRUK 07), NUI Maynooth, Ireland, April, 2007. 

314 |

Friendly, M. (2007). A.-M. Guerry's Moral Statistics of France: Challenges for Multivariable Spatial Analysis. Statistical Science, 22, 368-399. 

315 |

Friendly, M. (2007). Data from A.-M. Guerry, Essay on the Moral Statistics of France (1833), http://datavis.ca/gallery/guerry/guerrydat.html. 

316 |

See Also

317 |

The Guerry package for maps of France: gfrance and related data. 

318 |


319 | 320 | 321 | -------------------------------------------------------------------------------- /data/guerry/guerry.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/data/guerry/guerry.dbf -------------------------------------------------------------------------------- /data/guerry/guerry.prj: -------------------------------------------------------------------------------- 1 | PROJCS["NTF_Paris_Lambert_zone_II",GEOGCS["GCS_NTF_Paris",DATUM["D_NTF",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Paris",2.33722917],UNIT["grad",0.01570796326794897]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["latitude_of_origin",52],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.99987742],PARAMETER["false_easting",600000],PARAMETER["false_northing",2200000],UNIT["Meter",1],PARAMETER["standard_parallel_1",52]] -------------------------------------------------------------------------------- /data/guerry/guerry.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/data/guerry/guerry.shp -------------------------------------------------------------------------------- /data/guerry/guerry.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/data/guerry/guerry.shx -------------------------------------------------------------------------------- /data/上海市POI数据_2018.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/data/上海市POI数据_2018.zip -------------------------------------------------------------------------------- /data/上海市共享单车数据_20180826.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/data/上海市共享单车数据_20180826.zip -------------------------------------------------------------------------------- /fig/gwr变量.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/fig/gwr变量.png -------------------------------------------------------------------------------- /fig/h18结果.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/fig/h18结果.png -------------------------------------------------------------------------------- /fig/h18绘图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/fig/h18绘图.png -------------------------------------------------------------------------------- /fig/h3结果.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/fig/h3结果.png -------------------------------------------------------------------------------- /fig/h3绘图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/fig/h3绘图.png -------------------------------------------------------------------------------- /fig/poi统计.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/fig/poi统计.png -------------------------------------------------------------------------------- /fig/不同时段分布.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/fig/不同时段分布.png -------------------------------------------------------------------------------- /fig/参考文献.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/fig/参考文献.png -------------------------------------------------------------------------------- /fig/变量空间分布.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/fig/变量空间分布.png -------------------------------------------------------------------------------- /fig/时间分布.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/fig/时间分布.png -------------------------------------------------------------------------------- /fig/空间分布.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/fig/空间分布.png -------------------------------------------------------------------------------- /fig/莫兰指数.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GISer2000/gwr_bike_analysis/83f773ae091a275a533bbafaff8987b2924852b5/fig/莫兰指数.png -------------------------------------------------------------------------------- /set_font.py: -------------------------------------------------------------------------------- 1 | # set_font.py 2 | from matplotlib.font_manager import FontProperties 3 | from matplotlib import font_manager 4 | from matplotlib import rcParams 5 | 6 | def set_chinese_font(font_path): 7 | font_manager.fontManager.addfont(font_path) 8 | prop = font_manager.FontProperties(fname=font_path) 9 | rcParams['font.family'] = 'sans-serif' 10 | rcParams['font.sans-serif'] = prop.get_name() 11 | rcParams['axes.unicode_minus'] = False 12 | 13 | # # if __name__ == "__main__": 14 | # # Provide the path to your font file 15 | # custom_font_path = '../Times_SimSun.ttf' 16 | # set_font(custom_font_path) --------------------------------------------------------------------------------