ITPub博客

首页 > 大数据 > 数据分析 > 最新男女比例公布 光棍有点多

最新男女比例公布 光棍有点多

原创 数据分析 作者:laical 时间:2021-11-24 16:25:55 0 删除 编辑

日前,国家统计局发布《中国统计年鉴2021》(以下称《统计年鉴》)披露了人口等多方面的数据。其中男人比例的公布引起了大家的注意。全国乡村人口性别比为107.91,反映出我国男女人口性别比失衡现象在乡村地区尤为明显,近期热点“暖农村大龄男青年被窝工程”也引起了大家的激烈讨论。

从地区分析,我国 31 个省份乡村人口性别比均大于 100,包括:北京 120.21、山西 110.07、内蒙古 112.26、上海 130.93、浙江 110.82等。另外有 11 个省份城市人口性别比小于 100(女 =100,即女性多于男性),包括:河北 99.02、山西 99.70、内蒙古 99.63、辽宁 97.53、吉林 95.56等,需要更多具体的地区信息,运行下面的程序,可以及时获取相关咨询:

        package main
        import (
            "net/url"
            "net/http"
            "bytes"
            "fmt"
            "io/ioutil"
        )
        // 代理服务器(产品官网 )
        const ProxyServer = "t.16yun.cn:31111"
        type ProxyAuth struct {
            Username string
            Password string
        }
        func (p ProxyAuth) ProxyClient() http.Client {
            var proxyURL *url.URL
            if p.Username != ""&& p.Password!="" {
                proxyURL, _ = url.Parse("http://" + p.Username + ":" + p.Password + "@" + ProxyServer)
            }else{
                proxyURL, _ = url.Parse("http://" + ProxyServer)
            }
            return http.Client{Transport: &http.Transport{Proxy:http.ProxyURL(proxyURL)}}
        }
        func main()  {
            targetURI := "https://www.thepaper.cn/newsDetail_forward_15529051"
            // 初始化 proxy http client
            client := ProxyAuth{"username",  "password"}.ProxyClient()
            request, _ := http.NewRequest("GET", targetURI, bytes.NewBuffer([] byte(``)))
            // 设置Proxy-Tunnel
            // rand.Seed(time.Now().UnixNano())
            // tunnel := rand.Intn(10000)
            // request.Header.Set("Proxy-Tunnel", strconv.Itoa(tunnel) )
            response, err := client.Do(request)
            if err != nil {
                panic("failed to connect: " + err.Error())
            } else {
                bodyByte, err := ioutil.ReadAll(response.Body)
                if err != nil {
                    fmt.Println("读取 Body 时出错", err)
                    return
                }
                response.Body.Close()
                body := string(bodyByte)
                fmt.Println("Response Status:", response.Status)
                fmt.Println("Response Header:", response.Header)
                fmt.Println("Response Body:\n", body)
            }
        }


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69946368/viewspace-2843929/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-09-05

  • 博文量
    9
  • 访问量
    4249