Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
US births
#R version 3.3.2 # Data from https://data.cdc.gov/NCHS/NCHS-Births-and-General-Fertility-Rates-United-Sta/e6fc-ccez # could import with the following two lines # library(jsonlite) # df <- fromJSON("https://data.cdc.gov/resource/tndt-s2gv.json") # Since, library:culr not available, input manually birth_number = as.numeric(c("2718000", "2777000", "2809000", "2840000", "2869000", "2986000", "2965000", "2964000", "2944000", "2948000", "2740000", "2950000", "3055000", "2882000", "2910000", "2979000", "2909000", "2839000", "2802000", "2674000", "2582000", "2618000", "2506000", "2440000", "2307000", "2396000", "2377000", "2355000", "2413000", "2496000", "2466000", "2559000", "2703000", "2989000", "3104000", "2939000", "2858000", "3411000", "3817000", "3637000", "3649000", "3632000", "3820000", "3909000", "3959000", "4071000", "4097000", "4210000", "4300000", "4246000", "4244796", "4257850", "4268326", "4167362", "4098020", "4027490", "3760358", "3606274", "3520959", "3501564", "3600206", "3731386", "3555970", "3258411", "3136965", "3159958", "3144198", "3167788", "3326632", "3333279", "3494398", "3612258", "3629238", "3680537", "3638933", "3669141", "3760561", "3756547", "3809394", "3909510", "4040958", "4158212", "4110907", "4065014", "4000240", "3952767", "3899589", "3891494", "3880894", "3941553", "3959417", "4058814", "4025933", "4021726", "4089950", "4112052", "4138349", "4265555", "4316233", "4247694", "4130665", "3999386", "3953590", "3952841", "3932181", "3988076", "3978497")) year <- as.numeric(c("1909", "1910", "1911", "1912", "1913", "1914", "1915", "1916", "1917", "1918", "1919", "1920", "1921", "1922", "1923", "1924", "1925", "1926", "1927", "1928", "1929", "1930", "1931", "1932", "1933", "1934", "1935", "1936", "1937", "1938", "1939", "1940", "1941", "1942", "1943", "1944", "1945", "1946", "1947", "1948", "1949", "1950", "1951", "1952", "1953", "1954", "1955", "1956", "1957", "1958", "1959", "1960", "1961", "1962", "1963", "1964", "1965", "1966", "1967", "1968", "1969", "1970", "1971", "1972", "1973", "1974", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015")) df <- as.data.frame(cbind(year,birth_number)) plot(x = df$year, xlab = "Year", y = df$birth_number, ylim = c(1.5e6,4.5e6), ylab = "Births" , type = 'h', lwd=2, col = "grey", xaxp = c(1910,2020,22))
run
|
edit
|
history
|
help
0
Change text from ALL CAPS to Title Case
TH1
21-09-2020Intpoli
Simple Linear Regression
jcfatorial
root of a real number (bisection)
factor
31-08-2020-Exemplo Ajuste
Paired t-test [Access Medical Information]
Ch. 5: Cookie Chip Sampling